CN104462536A - File access method and device - Google Patents

File access method and device Download PDF

Info

Publication number
CN104462536A
CN104462536A CN201410817742.3A CN201410817742A CN104462536A CN 104462536 A CN104462536 A CN 104462536A CN 201410817742 A CN201410817742 A CN 201410817742A CN 104462536 A CN104462536 A CN 104462536A
Authority
CN
China
Prior art keywords
storage
file destination
initial
moment
memory device
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
CN201410817742.3A
Other languages
Chinese (zh)
Other versions
CN104462536B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201410817742.3A priority Critical patent/CN104462536B/en
Publication of CN104462536A publication Critical patent/CN104462536A/en
Application granted granted Critical
Publication of CN104462536B publication Critical patent/CN104462536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices

Abstract

The embodiment of the invention discloses a file access method and device. The file access method comprises the following steps of receiving access requests aiming at target files, determining an initial storage device and an initial storage moment T1 of the target files, further determining a cold storage server corresponding to the initial storage device according to the initial storage device of the target files, obtaining the vernier moment T2 of the cold storage server, determining the current storage device of the target files according to the size relation of T1 and T2, and having access to the target files according to the determined current storage device of the target files. By the adoption of the technical scheme of the file access method and device, if the target files have already been shifted to the cold storage server, hot storage server resources do not need to be consumed, and the access speed of the files actually stored in the cold storage server is increased.

Description

A kind of file access method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of file access method and device.
Background technology
The video source file that the editor of video website or external user are uploaded, be stored in storage server, production server access video source file, and after carrying out the video production process such as transcoding, editor, examination & verification to it, could generate and can carry out in terminal the video resource play.In actual applications, recent video source file, its visit capacity is larger, and the visit capacity of early stage video source file is less.So, usually storage server is divided into hot storage server and cold storage server, and using the initial storage server of video source file as hot storage server, video source file on the hot storage server of periodic monitoring, early stage video source file is moved on cold storage server from hot storage server, namely on hot storage server, only retains recent video source file.Video source file is carried out cold and hot Separate Storage, and mainly because compared to cold storage server, hot storage server needs to process more request of access, one general configuration is higher, maintenance cost is also higher, after doing cold and hot Separate Storage process, can reduce maintenance cost to video source file.
Apply this cold and hot Separate Storage mode store video source file, when having made video production demand, the initial storage path of video source file and actual storage path may and inconsistent, so produce server when conducting interviews to video source file, can according to the initial storage path of this video source file, first go to search in corresponding hot storage server, if do not found, then go to search in the cold storage server of making an appointment.
This access method Problems existing is, even if video source file is not stored in hot storage server, production server also needs to arrive first in hot storage server to be searched, and search procedure consumes hot storage server resource, reduces the access speed to this video source file.
Summary of the invention
For solving the problem, the embodiment of the invention discloses a kind of file access method and device.Technical scheme is as follows:
A kind of file access method, comprising:
Receive the request of access for file destination;
Determine initial memory device and the initial storage moment T1 of described file destination; Wherein, described initial memory device is hot storage server, and the described initial storage moment is: the storage moment on initial memory device;
According to the initial memory device of described file destination, determine the cold storage server with this initial memory device with corresponding relation further;
Obtain the vernier moment T2 of described cold storage server, the vernier moment of described cold storage server is: in this cold storage server, has the initial storage moment of the file in initial storage moment the latest;
According to the magnitude relationship of T1 and T2, determine the current storage devices of described file destination;
According to the current storage devices of determined file destination, described file destination is conducted interviews.
In a kind of embodiment of the present invention, the described magnitude relationship according to T1 and T2, determine the current storage devices of described file destination, comprising:
Judge whether T1 is greater than T2;
If so, then determine that the current storage devices of described file destination is: the initial memory device of described file destination;
Otherwise, determine that the current storage devices of described file destination is: with the initial memory device at described file destination place, there is the cold storage server of corresponding relation.
In a kind of embodiment of the present invention, the described current storage devices according to determined file destination, conducts interviews to described file destination, comprising:
When the current storage devices of determined file destination is initial memory device, determine that the current store path of described file destination is: the initial storage path of described file destination;
When the current storage devices of determined file destination is cold storage server, determine that the current store path of described file destination is: the path of the mark of this cold storage server being replaced the initial memory device mark in the initial storage path of described file destination;
Current store path according to determined file destination accesses described file destination;
Wherein, described initial storage path is determined according to the request of access of the file destination received, and at least comprises initial memory device mark in described initial storage path; In file migration process, the bibliographic structure in hot and cold storage server is consistent.
In a kind of embodiment of the present invention, in the storage directory title of described file destination in initial memory device, carry the storage time information of this file destination on this initial memory device;
The described initial storage moment T1 determining described file destination, comprising:
Obtain the initial storage routing information of described file destination;
From the initial storage routing information of described file destination, extract the storage directory title of this file;
According to the storage directory naming rule preset, the storage directory title extracted is resolved, determines the initial storage moment T1 of described file destination.
In a kind of embodiment of the present invention, described default storage directory naming rule is the storage moment according to file, according to the time, month, day part catalogue file is stored.
A kind of file access device, comprising:
Request of access receiver module, for receiving the request of access for file destination;
First determination module, for determining initial memory device and the initial storage moment T1 of described file destination; Wherein, described initial memory device is hot storage server, and the described initial storage moment is: the storage moment on initial memory device;
Second determination module, for the initial memory device of described file destination determined according to described first determination module, determines the cold storage server with this initial memory device with corresponding relation further;
Vernier moment acquisition module, for obtaining the vernier moment T2 of the cold storage server that described second determination module is determined, the vernier moment of described cold storage server is: in this cold storage server, has the initial storage moment of the file in initial storage moment the latest;
3rd determination module, for the magnitude relationship according to T1 and T2, determines the current storage devices of described file destination;
File access module, for the current storage devices according to the determined file destination of described 3rd determination module, conducts interviews to described file destination.
In a kind of embodiment of the present invention, described 3rd determination module, comprising:
Judge submodule, for judging whether T1 is greater than T2;
First determines submodule, for when the judged result of described judgement submodule is for being, determines that the current storage devices of described file destination is: the initial memory device of described file destination;
Second determines submodule, for when the judged result of described judgement submodule is no, determines that the current storage devices of described file destination is: have the cold storage server of corresponding relation with the initial memory device at described file destination place.
In a kind of embodiment of the present invention, described file access module, specifically for:
When the current storage devices of determined file destination is initial memory device, determine that the current store path of described file destination is: the initial storage path of described file destination;
When the current storage devices of determined file destination is cold storage server, determine that the current store path of described file destination is: the path of the mark of this cold storage server being replaced the initial memory device mark in the initial storage path of described file destination;
Current store path according to determined file destination accesses described file destination;
Wherein, described initial storage path is determined according to the request of access of the file destination received, and at least comprises initial memory device mark in described initial storage path; In file migration process, the bibliographic structure in hot and cold storage server is consistent.
In a kind of embodiment of the present invention, described first determination module, comprising:
Initial storage routing information obtains submodule, for in the storage directory title of described file destination in initial memory device, when carrying the storage time information of this file destination on this initial memory device, obtain the initial storage routing information of described file destination;
Storage directory title extracts submodule, for from the initial storage routing information of described file destination, extracts the storage directory title of this file;
The initial storage moment determines submodule, for according to the storage directory naming rule preset, resolves, determine the initial storage moment T1 of described file destination to the storage directory title extracted.
In a kind of embodiment of the present invention, described default storage directory naming rule is the storage moment according to file, according to the time, month, day part catalogue file is stored.
The technical scheme that the embodiment of the present invention provides, after receiving the request of access for file destination, can determine initial memory device and the initial storage moment of this file destination.Because the initial memory device of each file is hot storage server, and hot storage server and cold storage server have corresponding relation, by this corresponding relation, the cold storage server corresponding with this initial memory device can be determined further.File in cold storage server moves and obtains from hot storage server, after each migration task completes, the vernier moment of cold storage server will be set in this cold storage server, there is the initial storage moment of the file in initial storage moment the latest, so the vernier moment of the initial storage moment of file destination and determined cold storage server is compared, the current storage devices of this file destination can be determined, thus according to the current storage devices of file destination, it is conducted interviews.The technical scheme that the application embodiment of the present invention provides, if file destination has moved on cold storage server, then by the current storage devices of determined file destination, just can conduct interviews to file destination, do not need initial memory device, instant heating storage server is searched, does not need chargeable heat storage server resource like this, improve the access speed of the file of actual storage in cold storage server.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the implementing procedure figure of a kind of file access method in the embodiment of the present invention;
Fig. 2 is video production system structural representation in the embodiment of the present invention;
Fig. 3 is the structural representation of a kind of file access device in the embodiment of the present invention.
Embodiment
First be described a kind of file access method that the embodiment of the present invention provides, the method can comprise the following steps:
Receive the request of access for file destination;
Determine initial memory device and the initial storage moment T1 of described file destination; Wherein, described initial memory device is hot storage server, and the described initial storage moment is: the storage moment on initial memory device;
According to the initial memory device of described file destination, determine the cold storage server with this initial memory device with corresponding relation further;
Obtain the vernier moment T2 of described cold storage server, the vernier moment of described cold storage server is: in this cold storage server, has the initial storage moment of the file in initial storage moment the latest;
According to the magnitude relationship of T1 and T2, determine the current storage devices of described file destination;
According to the current storage devices of determined file destination, described file destination is conducted interviews.
The executive agent of above step is the server conducted interviews to the file in storage server (hot storage server or cold storage server), as, in video production process, need the production server that the video file in storage server is conducted interviews, or, according to the request of access of user, to the access services device that the file in storage server conducts interviews.It should be noted that, storage server can be one or more server, and the hot storage server of multiple stage forms hot storage cluster, and the cold storage server of multiple stage forms cold storage cluster.
The technical scheme that the embodiment of the present invention provides, after receiving the request of access for file destination, can determine initial memory device and the initial storage moment of this file destination.Because the initial memory device of each file is hot storage server, and hot storage server and cold storage server have corresponding relation, by this corresponding relation, the cold storage server corresponding with this initial memory device can be determined further.File in cold storage server moves and obtains from hot storage server, after each migration task completes, the vernier moment of cold storage server will be set in this cold storage server, there is the initial storage moment of the file in initial storage moment the latest, so the vernier moment of the initial storage moment of file destination and determined cold storage server is compared, the current storage devices of this file destination can be determined, thus according to the current storage devices of file destination, it is conducted interviews.The technical scheme that the application embodiment of the present invention provides, if file destination has moved on cold storage server, then by the current storage devices of determined file destination, just can conduct interviews to file destination, do not need initial memory device, instant heating storage server is searched, does not need chargeable heat storage server resource like this, improve the access speed of the file of actual storage in cold storage server.
Technical scheme in the embodiment of the present invention is understood better in order to make those skilled in the art, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Shown in Fig. 1, be the implementing procedure figure of a kind of file access method that the embodiment of the present invention provides, the method can comprise the following steps:
S110: receive the request of access for file destination;
File destination, is stored in storage server (hot storage server or cold storage server).For the simple video production system of shown in Fig. 2, this video production system includes storage administration platform 210, produces server 220, hot storage server 230 and cold storage server 240, when needs are produced video file, storage administration platform 210 can send request of access for file destination to producing server 220, and producing server 220 can conduct interviews to the file stored in hot storage server 230 and cold storage server 240.After production server receives the request of access for file destination, continue to perform following steps.
For convenience of description, to the explanation of following steps all for the video production system shown in Fig. 2.
S120: the initial memory device and the initial storage moment T1 that determine described file destination;
Wherein, described initial memory device is hot storage server, and the described initial storage moment is: the storage moment on initial memory device.
When there being files passe, first file is stored on hot storage server, so the initial memory device of file is hot storage server.In storing process, can the initial memory device of log file and initial storage moment.As in video production system, storage administration platform can log file initial memory device and initial storage moment, when starting video production task, storage administration platform send for initial memory device and the initial storage moment that can carry file destination in the request of access of file destination, by this request of access, produce initial memory device and initial storage moment that server can determine file destination.
Or, when files passe is to hot storage server, builds the initial storage path of this file, in initial storage path, can storage device identification be comprised, can also comprise and store moment mark.This initial storage routing information can be carried in for the request of access of file destination, thus according to this information, initial memory device and the initial storage moment of file destination can be determined.
In one embodiment of the invention, in the storage directory title of described file destination in initial memory device, carry the storage time information of this file destination on this initial memory device;
Determine the method for the initial storage moment T1 of described file destination, can comprise the following steps:
First step: the initial storage routing information obtaining described file destination;
Second step: from the initial storage routing information of described file destination, extract the storage directory title of this file;
3rd step: according to the storage directory naming rule preset, the storage directory title extracted is resolved, determines the initial storage moment T1 of described file destination.
In actual applications, the storage directory being stored in the file in storage server can according to the storage moment of file, according to the time, month, day part catalogue file is stored, can also be directly storage directory by the storage moment of file.Storage directory as file is 2014/01/01/dd.mp4, and the initial storage moment of this file known is on January 1st, 2014; Or the storage directory of file is 20140701/dd.mp4, the initial storage moment of this file known is on July 1st, 2014.
The storage moment of file can also to be converted to after specific format as storage directory, after extracting this storage directory title, then to be reduced to the moment according to specific format, thus to determine the initial storage moment of file destination.
S130: according to the initial memory device of described file destination, determines the cold storage server with this initial memory device with corresponding relation further;
Hot storage server and cold storage server have one to one or many-to-one corresponding relation, a namely corresponding cold storage server of hot storage server, or the corresponding cold storage server of the hot storage server of multiple stage.After step S120 determines the initial memory device of file destination, by this corresponding relation, the cold storage server with the initial memory device of file destination with corresponding relation can be determined further.
For ease of understanding, for the video production system shown in Fig. 2, the process that file migrates to cold storage server from hot storage server is briefly described.
In video production system, record the corresponding relation of hot storage server and cold storage server in storage administration platform 210, when namely each cold storage server is enabled, it is corresponding with the hot storage server of which platform.Within the system, storage administration platform 210 a Main Function rising be: the state of all hot storage server file of periodic monitoring, if monitor on certain hot storage server and have more outmoded file, file before such as x month, then start migration task, these outmoded files are migrated to cold storage server corresponding to storage server hot with this from the hot storage server at its place.In transition process, keep cold and hot storage server bibliographic structure consistent.If there is the failed file of migration, can through repeatedly moving trial, until All Files moves successfully, or, after repeatedly moving trial, still have the file that cannot move, then can mark this file, manually be moved by operation personnel.
Known by the above explanation to transition process, when current need to conduct interviews to file destination when, this file destination may not be stored in its initial memory device, on instant heating storage server, has likely been migrated on cold storage server.Produce mutual by with storage administration platform 210 of server 220, easily can know the cold storage server with determined initial memory device with corresponding relation.
S140: the vernier moment T2 obtaining described cold storage server;
The vernier moment of described cold storage server is: in this cold storage server, has the initial storage moment of the file in initial storage moment the latest.
Each cold storage server has enables moment and vernier moment, enables the moment and fixes, and is exactly that it starts to receive the moment of to move the file of coming from hot storage server, the vernier moment, the task to be migrated such as to need complete and arranges.
For ease of understanding, be described for the transition process described in step S130.
After storage administration platform 210 starts migration task, multiple mirror back-up instrument (as rsync) can be dispatched, concurrent migration is carried out to qualified file, because the varying in size of file, so required migration duration is different.Only have and confirm that All Files is all after Successful migration, just arranges the vernier moment of cold storage server, makes the initial storage moment in the cold storage server of this vernier moment and this with the file in initial storage moment the latest identical.This vernier moment can show, in this cold storage server, the initial storage moment of All Files is all not later than this vernier moment.Such as, the vernier moment of certain cold storage server is on January 1st, 2014, shows, the initial storage moment of the file stored in this cold storage server is all not later than on January 1st, 2014.
S150: according to the magnitude relationship of T1 and T2, determines the current storage devices of described file destination;
As previously mentioned, the vernier moment of cold storage server can show, in this cold storage server, the initial storage moment of All Files is all not later than this vernier moment.Based on this, by the magnitude relationship of the initial storage moment T1 of file destination and the vernier moment T2 of cold storage server, the current storage devices of file destination can be determined.
Determine that the method for the current storage devices of file destination can comprise the following steps:
Step one: judge whether T1 is greater than T2, if so, then perform step 2, otherwise perform step 3;
Step 2: determine that the current storage devices of described file destination is: the initial memory device of described file destination;
Step 3: determine that the current storage devices of described file destination is: with the initial memory device at described file destination place, there is the cold storage server of corresponding relation.
S160: according to the current storage devices of determined file destination, conducts interviews to described file destination.
After determining the current storage devices of file destination, the current store path of file destination can be determined further, thus file destination is conducted interviews.
In a kind of embodiment of the present invention,
When the current storage devices of determined file destination is initial memory device, determine that the current store path of described file destination is: the initial storage path of described file destination;
When the current storage devices of determined file destination is cold storage server, determine that the current store path of described file destination is: the path of the mark of this cold storage server being replaced the initial memory device mark in the initial storage path of described file destination;
Current store path according to determined file destination accesses described file destination;
Wherein, described initial storage path is determined according to the request of access of the file destination received, and at least comprises initial memory device mark in described initial storage path; In file migration process, the bibliographic structure in hot and cold storage server is consistent.
The structure in initial storage path can be: { storage device identification }/{ particular location of file in memory device }, such as, the initial storage path of file is: sh-ugc1/aa/bb/cc/aabbcc.mp4, show that this file initial storage is on the hot storage server being designated sh-ugc1, the particular location on this hot storage server is aa/bb/cc.If the cold storage server that initial memory device sh-ugc1 is corresponding is wh-ugc1, by performing above-mentioned steps, when the current storage devices determining file destination is initial memory device, then can determine that the current store path of file destination is still sh-ugc1/aa/bb/cc/aabbcc.mp4; When the current storage devices determining file destination is cold storage server, then can determine that the current store path of file destination is wh-ugc1/aa/bb/cc/aabbcc.mp4, this is the initial memory device replaced in initial storage path by the mark wh-ugc1 of this cold storage server and identifies the path after sh-ugc1.
The technical scheme that the embodiment of the present invention provides, after receiving the request of access for file destination, can determine initial memory device and the initial storage moment of this file destination.Because the initial memory device of each file is hot storage server, and hot storage server and cold storage server have corresponding relation, by this corresponding relation, the cold storage server corresponding with this initial memory device can be determined further.File in cold storage server moves and obtains from hot storage server, after each migration task completes, the vernier moment of cold storage server will be set in this cold storage server, there is the initial storage moment of the file in initial storage moment the latest, so the vernier moment of the initial storage moment of file destination and determined cold storage server is compared, the current storage devices of this file destination can be determined, thus according to the current storage devices of file destination, it is conducted interviews.The technical scheme that the application embodiment of the present invention provides, if file destination has moved on cold storage server, then by the current storage devices of determined file destination, just can conduct interviews to file destination, do not need initial memory device, instant heating storage server is searched, does not need chargeable heat storage server resource like this, improve the access speed of the file of actual storage in cold storage server.
Corresponding to embodiment of the method above, the embodiment of the invention also discloses a kind of file access device, shown in Figure 3, this device can comprise with lower module:
Request of access receiver module 310, for receiving the request of access for file destination;
First determination module 320, for determining initial memory device and the initial storage moment T1 of described file destination; Wherein, described initial memory device is hot storage server, and the described initial storage moment is: the storage moment on initial memory device;
Second determination module 330, for the initial memory device of described file destination determined according to described first determination module 310, determines the cold storage server with this initial memory device with corresponding relation further;
Vernier moment acquisition module 340, for obtaining the vernier moment T2 of the cold storage server that described second determination module 330 is determined, the vernier moment of described cold storage server is: in this cold storage server, has the initial storage moment of the file in initial storage moment the latest;
3rd determination module 350, for the magnitude relationship according to T1 and T2, determines the current storage devices of described file destination;
File access module 360, for the current storage devices according to the determined file destination of described 3rd determination module 350, conducts interviews to described file destination.
In a kind of embodiment of the present invention, described 3rd determination module 350, can comprise following submodule:
Judge submodule, for judging whether T1 is greater than T2;
First determines submodule, for when the judged result of described judgement submodule is for being, determines that the current storage devices of described file destination is: the initial memory device of described file destination;
Second determines submodule, for when the judged result of described judgement submodule is no, determines that the current storage devices of described file destination is: have the cold storage server of corresponding relation with the initial memory device at described file destination place.
In a kind of embodiment of the present invention, described file access module 360, specifically for:
When the current storage devices of determined file destination is initial memory device, determine that the current store path of described file destination is: the initial storage path of described file destination;
When the current storage devices of determined file destination is cold storage server, determine that the current store path of described file destination is: the path of the mark of this cold storage server being replaced the initial memory device mark in the initial storage path of described file destination;
Current store path according to determined file destination accesses described file destination;
Wherein, described initial storage path is determined according to the request of access of the file destination received, and at least comprises initial memory device mark in described initial storage path; In file migration process, the bibliographic structure in hot and cold storage server is consistent.
In a kind of embodiment of the present invention, described first determination module 320, can comprise following submodule:
Initial storage routing information obtains submodule, for in the storage directory title of described file destination in initial memory device, when carrying the storage time information of this file destination on this initial memory device, obtain the initial storage routing information of described file destination;
Storage directory title extracts submodule, for from the initial storage routing information of described file destination, extracts the storage directory title of this file;
The initial storage moment determines submodule, for according to the storage directory naming rule preset, resolves, determine the initial storage moment T1 of described file destination to the storage directory title extracted.
In a kind of embodiment of the present invention, described default storage directory naming rule is the storage moment according to file, according to the time, month, day part catalogue file is stored.
The device that the embodiment of the present invention provides, after receiving the request of access for file destination, can determine initial memory device and the initial storage moment of this file destination.Because the initial memory device of each file is hot storage server, and hot storage server and cold storage server have corresponding relation, by this corresponding relation, the cold storage server corresponding with this initial memory device can be determined further.File in cold storage server moves and obtains from hot storage server, after each migration task completes, the vernier moment of cold storage server will be set in this cold storage server, there is the initial storage moment of the file in initial storage moment the latest, so the vernier moment of the initial storage moment of file destination and determined cold storage server is compared, the current storage devices of this file destination can be determined, thus according to the current storage devices of file destination, it is conducted interviews.The device that the application embodiment of the present invention provides, if file destination has moved on cold storage server, then by the current storage devices of determined file destination, just can conduct interviews to file destination, do not need initial memory device, instant heating storage server is searched, does not need chargeable heat storage server resource like this, improve the access speed of the file of actual storage in cold storage server.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
Each embodiment in this instructions all adopts relevant mode to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of step realized in said method embodiment is that the hardware that can carry out instruction relevant by program has come, described program can be stored in computer read/write memory medium, here the alleged storage medium obtained, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. a file access method, is characterized in that, comprising:
Receive the request of access for file destination;
Determine initial memory device and the initial storage moment T1 of described file destination; Wherein, described initial memory device is hot storage server, and the described initial storage moment is: the storage moment on initial memory device;
According to the initial memory device of described file destination, determine the cold storage server with this initial memory device with corresponding relation further;
Obtain the vernier moment T2 of described cold storage server, the vernier moment of described cold storage server is: in this cold storage server, has the initial storage moment of the file in initial storage moment the latest;
According to the magnitude relationship of T1 and T2, determine the current storage devices of described file destination;
According to the current storage devices of determined file destination, described file destination is conducted interviews.
2. method according to claim 1, is characterized in that, the described magnitude relationship according to T1 and T2, determines the current storage devices of described file destination, comprising:
Judge whether T1 is greater than T2;
If so, then determine that the current storage devices of described file destination is: the initial memory device of described file destination;
Otherwise, determine that the current storage devices of described file destination is: with the initial memory device at described file destination place, there is the cold storage server of corresponding relation.
3. method according to claim 1, is characterized in that, the described current storage devices according to determined file destination, conducts interviews to described file destination, comprising:
When the current storage devices of determined file destination is initial memory device, determine that the current store path of described file destination is: the initial storage path of described file destination;
When the current storage devices of determined file destination is cold storage server, determine that the current store path of described file destination is: the path of the mark of this cold storage server being replaced the initial memory device mark in the initial storage path of described file destination;
Current store path according to determined file destination accesses described file destination;
Wherein, described initial storage path is determined according to the request of access of the file destination received, and at least comprises initial memory device mark in described initial storage path; In file migration process, the bibliographic structure in hot and cold storage server is consistent.
4. method according to claim 1, is characterized in that, in the storage directory title of described file destination in initial memory device, carries the storage time information of this file destination on this initial memory device;
The described initial storage moment T1 determining described file destination, comprising:
Obtain the initial storage routing information of described file destination;
From the initial storage routing information of described file destination, extract the storage directory title of this file;
According to the storage directory naming rule preset, the storage directory title extracted is resolved, determines the initial storage moment T1 of described file destination.
5. method according to claim 4, is characterized in that, described default storage directory naming rule is the storage moment according to file, according to the time, month, day part catalogue file is stored.
6. a file access device, is characterized in that, comprising:
Request of access receiver module, for receiving the request of access for file destination;
First determination module, for determining initial memory device and the initial storage moment T1 of described file destination; Wherein, described initial memory device is hot storage server, and the described initial storage moment is: the storage moment on initial memory device;
Second determination module, for the initial memory device of described file destination determined according to described first determination module, determines the cold storage server with this initial memory device with corresponding relation further;
Vernier moment acquisition module, for obtaining the vernier moment T2 of the cold storage server that described second determination module is determined, the vernier moment of described cold storage server is: in this cold storage server, has the initial storage moment of the file in initial storage moment the latest;
3rd determination module, for the magnitude relationship according to T1 and T2, determines the current storage devices of described file destination;
File access module, for the current storage devices according to the determined file destination of described 3rd determination module, conducts interviews to described file destination.
7. device according to claim 6, is characterized in that, described 3rd determination module, comprising:
Judge submodule, for judging whether T1 is greater than T2;
First determines submodule, for when the judged result of described judgement submodule is for being, determines that the current storage devices of described file destination is: the initial memory device of described file destination;
Second determines submodule, for when the judged result of described judgement submodule is no, determines that the current storage devices of described file destination is: have the cold storage server of corresponding relation with the initial memory device at described file destination place.
8. device according to claim 6, is characterized in that, described file access module, specifically for:
When the current storage devices of determined file destination is initial memory device, determine that the current store path of described file destination is: the initial storage path of described file destination;
When the current storage devices of determined file destination is cold storage server, determine that the current store path of described file destination is: the path of the mark of this cold storage server being replaced the initial memory device mark in the initial storage path of described file destination;
Current store path according to determined file destination accesses described file destination;
Wherein, described initial storage path is determined according to the request of access of the file destination received, and at least comprises initial memory device mark in described initial storage path; In file migration process, the bibliographic structure in hot and cold storage server is consistent.
9. device according to claim 6, is characterized in that, described first determination module, comprising:
Initial storage routing information obtains submodule, for in the storage directory title of described file destination in initial memory device, when carrying the storage time information of this file destination on this initial memory device, obtain the initial storage routing information of described file destination;
Storage directory title extracts submodule, for from the initial storage routing information of described file destination, extracts the storage directory title of this file;
The initial storage moment determines submodule, for according to the storage directory naming rule preset, resolves, determine the initial storage moment T1 of described file destination to the storage directory title extracted.
10. device according to claim 9, is characterized in that, described default storage directory naming rule is the storage moment according to file, according to the time, month, day part catalogue file is stored.
CN201410817742.3A 2014-12-24 2014-12-24 A kind of file access method and device Active CN104462536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410817742.3A CN104462536B (en) 2014-12-24 2014-12-24 A kind of file access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410817742.3A CN104462536B (en) 2014-12-24 2014-12-24 A kind of file access method and device

Publications (2)

Publication Number Publication Date
CN104462536A true CN104462536A (en) 2015-03-25
CN104462536B CN104462536B (en) 2018-08-07

Family

ID=52908571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410817742.3A Active CN104462536B (en) 2014-12-24 2014-12-24 A kind of file access method and device

Country Status (1)

Country Link
CN (1) CN104462536B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5504882A (en) * 1994-06-20 1996-04-02 International Business Machines Corporation Fault tolerant data storage subsystem employing hierarchically arranged controllers
CN101464868A (en) * 2007-12-17 2009-06-24 鸿富锦精密工业(深圳)有限公司 Working performance maintaining system and method for computer high-load operation system
CN101673192A (en) * 2009-10-26 2010-03-17 北京世纪互联宽带数据中心有限公司 Method for time-sequence data processing, device and system therefor
CN101741830A (en) * 2009-11-09 2010-06-16 深圳市同洲电子股份有限公司 Method, system, client and server for realizing multi-client data synchronization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5504882A (en) * 1994-06-20 1996-04-02 International Business Machines Corporation Fault tolerant data storage subsystem employing hierarchically arranged controllers
CN101464868A (en) * 2007-12-17 2009-06-24 鸿富锦精密工业(深圳)有限公司 Working performance maintaining system and method for computer high-load operation system
CN101673192A (en) * 2009-10-26 2010-03-17 北京世纪互联宽带数据中心有限公司 Method for time-sequence data processing, device and system therefor
CN101741830A (en) * 2009-11-09 2010-06-16 深圳市同洲电子股份有限公司 Method, system, client and server for realizing multi-client data synchronization

Also Published As

Publication number Publication date
CN104462536B (en) 2018-08-07

Similar Documents

Publication Publication Date Title
CN107660284B (en) Search improvement based on machine learning
CN102693302B (en) Quick file comparison method, system and client side
US9697225B2 (en) Method for synchronizing file
US20120046770A1 (en) Apparatus and methods for creation, collection, and dissemination of instructional content modules using mobile devices
CN104980809A (en) Barrage processing method and apparatus
EP3136655B1 (en) Multimedia display method, device and equipment
JP2009277219A (en) Management of media file from two or more resource
CN101849216A (en) Method and apparatus for wireless digital content management
US20130219050A1 (en) Cloud service access apparatus, cloud service access method, and cloud service access system
CN110245145A (en) Structure synchronization method and apparatus of the relevant database to Hadoop database
CN102752294B (en) Method and system for synchronizing data of multiple terminals on basis of equipment capacity
CN104488248A (en) File synchronization method, server and terminal
CN104767767A (en) Method, device and system for sharing Internet access data and network equipment
CN103945259A (en) Online video playing method and device
CN103942209A (en) Data processing method
CN105760380A (en) Database query method, device and system
CN104853251A (en) Online collection method and device for multimedia data
CN106155925A (en) A kind of method and device obtaining data
CN109145053A (en) Data processing method and device, client, server
CN104951481A (en) Method and device for managing database connection
CN105812469A (en) Address book synchronization method and device
CN105765570A (en) Music identification
US20130054527A1 (en) Terminal, server, and method for synchronizing application
CN104917754A (en) Video data sending and receiving methods, servers and clients
CN106294700A (en) The storage of a kind of daily record and read method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant