CN101707684A - Method, device and system for dispatching Cache - Google Patents

Method, device and system for dispatching Cache Download PDF

Info

Publication number
CN101707684A
CN101707684A CN200910235456A CN200910235456A CN101707684A CN 101707684 A CN101707684 A CN 101707684A CN 200910235456 A CN200910235456 A CN 200910235456A CN 200910235456 A CN200910235456 A CN 200910235456A CN 101707684 A CN101707684 A CN 101707684A
Authority
CN
China
Prior art keywords
data block
cache node
cache
described data
terminal
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
CN200910235456A
Other languages
Chinese (zh)
Other versions
CN101707684B (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 Orient View Technology Co Ltd
Original Assignee
Beijing Orient View 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 Orient View Technology Co Ltd filed Critical Beijing Orient View Technology Co Ltd
Priority to CN200910235456.5A priority Critical patent/CN101707684B/en
Publication of CN101707684A publication Critical patent/CN101707684A/en
Application granted granted Critical
Publication of CN101707684B publication Critical patent/CN101707684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method, a device and a system for dispatching Cache, belonging to the field of a cable television. The method comprises the following steps: a file management system (FMS) is used for receiving the request for acquiring a data block coming from a terminal, and an identification code ID of the data block is carried by the request; the FMS can search local Cache nodes according to the ID; if the data block corresponding to the ID is searched out, the FMS returns the data block to the terminal; if the data block is not searched out, the FMS finds out the Cache nodes for caching the data block from a network according to the ID; if the Cache nodes are found out, the data block is acquired from the Cache nodes and sent to the terminal; if the Cache nodes are not found out, a physical device storing the data block is found out; the local Cache node receives the data block sent by the Cache node corresponding to the physical device and caches the data block; and the FMS acquires the data block from the local Cache node, and then the data block is returned to the terminal. The invention can improve the efficiency for data access.

Description

A kind of method, equipment and system of Cache scheduling
Technical field
The present invention relates to the cable TV field, particularly a kind of method, equipment and system of Cache scheduling.
Background technology
In the cable TV field, the content caching that user capture is frequent when visiting identical data, can be visited physical equipment in Cache, but adopts based on Cache dispatching technique visit Cache, thereby has improved access speed.
Adopt the Cache of file system self to come broadcast content is carried out buffer memory at present, file system is that unit carries out buffer memory to data with the page or leaf, and the size of page or leaf is 1KB.Wherein, file system adopts with the page or leaf way access Cache of the Cache scheduling that is the unit, be specially: when terminal during to the file system requests page data, file system is dispatched this page data from the Cache of self, if be cached with the data of this page among the Cache, then return this page data to terminal, if do not have among the Cache, then from physical equipment, read this page data, this page data is buffered among the Cache, return this page data to terminal simultaneously.
In realizing process of the present invention, the inventor finds that there is following problem at least in prior art:
The first, along with the fast development of cable TV, the increase of the data volume of user capture, and use the efficient of going to visit the data among the Cache as the method for the Cache scheduling of unit can't satisfy the requirement of high-throughput with page or leaf.
The second, the data that need when terminal are in the Cache of file system self, obtain data among the Cache of other that file system can not be from network, thereby reduce efficiency for data access.
Summary of the invention
In order to improve efficiency for data access, the embodiment of the invention provides a kind of method, equipment and system of Cache scheduling.Described technical scheme is as follows:
A kind of method of Cache scheduling, described method comprises:
The identification code ID of data block is carried in the request that file management system FMS receives self terminal to obtain data block in the described request;
Described FMS searches local Cache node according to described ID;
If find out the data block of described ID correspondence, described FMS returns described data block and gives terminal;
If do not find out described data block, described FMS searches the Cache node of the described data block of buffer memory according to described ID from network, if find out the Cache node, obtains described data block and give terminal from described Cache node; If do not find out the Cache node, find out the physical equipment of the described data block of storage; Described local Cache node receives the described data block of the Cache node transmission of described physical equipment correspondence, the described data block of buffer memory; Described FMS obtains described data block and returns to terminal from described local Cache node.
Described local Cache node receives the described data block of the Cache node transmission of described physical equipment correspondence, and the described data block of buffer memory specifically comprises:
Described local Cache node receives the described data block of the Cache node transmission of described physical equipment correspondence, judges the described data block of buffer memory of self whether also having living space;
If no, it is low and do not have the shared space of operated data block to reclaim access times, the reallocation space, with described data-block cache in the space of described distribution;
If have, allocation space, with described data-block cache in the space of described distribution.
Describedly from network, search the Cache node of the described data block of buffer memory,, from described Cache node, obtain described data block and give terminal, specifically comprise if find out the Cache node according to described ID:
According to the Cache node of the described data block of buffer memory in the described ID Network Search, if find out a plurality of Cache nodes, then select the minimum Cache node of load, from the Cache node of described selection, read described data block and return to terminal;
If find out a Cache node, from described Cache node, read described data block and return to terminal.
Described method also comprises:
Accessed Cache node writes down the accessed number of times of described data block.
Described method also comprises:
When the data block in the arbitrary Cache node in the network just be not operated, described Cache node was that the time is fallen into disuse in described data block setting, and the described time of falling into disuse is used to write down described data block does not have the operated time;
Correspondingly, described recovery access times are low and do not have the shared space of operated data block, specifically comprise:
The shared space of data block that the priority reclamation access times are low and the time of falling into disuse is grown.
A kind of equipment of Cache scheduling, described equipment comprises:
Receiver module is used to the request that receives self terminal to obtain data block, carries the identification code ID of data block in the described request;
First searches module, is used for searching local Cache node according to described ID;
First returns module, if be used for finding out the data block of described ID correspondence, then return described data block and gives terminal;
Second searches module, if be used for not finding out described data block, searches the Cache node of the described data block of buffer memory according to described ID from network, if find out the Cache node, obtains described data block and give terminal from described Cache node; If do not find out the Cache node, find out the physical equipment of the described data block of storage; After the described data block of described local Cache nodal cache, from described local Cache node, obtain described data block and return to terminal from the Cache node of described physical equipment correspondence.
Described second searches module, if specifically be used for not finding out described data block, Cache node according to the described data block of buffer memory in the described ID Network Search, if find out a plurality of Cache nodes, then select the minimum Cache node of load, from the Cache node of described selection, read described data block and return to terminal; If find out a Cache node, from described Cache node, read described data block and return to terminal; If do not find out the Cache node, find out the physical equipment of the described data block of storage; After the described data block of described local Cache nodal cache, from described local Cache node, obtain described data block and return to terminal from the Cache node of described physical equipment correspondence.
A kind of system of Cache scheduling, described system comprises:
The equipment of Cache scheduling is used to the request that receives self terminal to obtain data block, carries the identification code ID of data block in the described request; Search local Cache node according to described ID; If find out the data block of described ID correspondence, then return described data block and give terminal; If do not find out described data block, from network, search the Cache node of the described data block of buffer memory according to described ID, if find out the Cache node, from described Cache node, obtain described data block and give terminal; If do not find out the Cache node, find out the physical equipment of the described data block of storage; After the described data block of described local Cache nodal cache, from described local Cache node, obtain described data block and return to terminal from the Cache node of described physical equipment correspondence;
Accessed Cache node is used for equipment when described Cache scheduling and finds out described local Cache node when being cached with described data block, returns described data block and gives terminal; When the equipment of described Cache scheduling finds out the Cache node of the described data block of buffer memory in the network, return described data block and give terminal; When described local Cache node receives described data block from the Cache node of described physical equipment correspondence, the described data block of buffer memory, and return described data block and give terminal.
Described Cache node specifically comprises:
Second returns module, is used for equipment when described Cache scheduling and finds out described local Cache node when being cached with described data block, returns described data block and gives terminal; When the equipment of described Cache scheduling finds out the Cache node of the described data block of buffer memory in the network, return described data block and give terminal;
Judge module is used for working as the described data block that described local Cache node receives the Cache node transmission of described physical equipment correspondence, judges the described data block of buffer memory of self whether also having living space;
The 3rd returns module, judge and do not have if be used for described judge module, it is low and do not have a shared space of operated data block, reallocation space to reclaim access times, described data-block cache in the space of described distribution, and is returned described data block and given terminal;
The 4th returns module, has judged if be used for described judge module, and allocation space in the space of described distribution, and is returned described data-block cache described data block and given terminal.
Described Cache node also comprises:
Logging modle is used to write down the accessed number of times of described data block.
Described Cache node also comprises:
Module is set, is used for falling into disuse the time for described data block setting when the data block in arbitrary Cache node of network just has not been operated, the described time of falling into disuse is used to write down described data block does not have the operated time;
Correspondingly,
The described the 3rd returns module, judge and do not have if specifically be used for described judge module, the priority reclamation access times are low and fall into disuse the long shared space of data block of time, reallocation space, described data-block cache in the space of described distribution, and is returned described data block and given terminal.
In embodiments of the present invention, according to the ID of the data block of carrying in the request that comes self terminal, search local Cache node, if find out data block, then directly return this data block, if do not have, then from network, search data block, and return this data block according to this ID.Because with the data block is that the data in the Cache node are dispatched by unit, thereby improved the efficient of visiting the data in the Cache node; Because the Cache node in the network is shared data all, thereby whether the data of working as user capture can obtain data, thereby further improve efficiency for data access or not in local Cache node from network C ache node.
Description of drawings
Fig. 1 is a kind of Udp radio network structural representation that the embodiment of the invention 1 provides;
Fig. 2 is the method flow diagram of a kind of building high-speed shared network of providing of the embodiment of the invention 1;
Fig. 3 is a kind of high speed shared network structural representation that the embodiment of the invention 1 provides;
Fig. 4 is the method flow diagram of a kind of Cache scheduling that provides of the embodiment of the invention 2;
Fig. 5 is the method flow diagram of a kind of Cache scheduling that provides of the embodiment of the invention 3;
Fig. 6 is the device structure schematic diagram of a kind of Cache scheduling that provides of the embodiment of the invention 4;
Fig. 7 is the system configuration schematic diagram of a kind of Cache scheduling that provides of the embodiment of the invention 5.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Embodiment 1
Be illustrated in figure 1 as a kind of Udp (User Datagram Protocol, User Datagram Protoco (UDP)) radio network, the Udp radio network is a kind of cable video network, in the Udp radio network, be provided with the Cache node, the Cache node is a cache device, is used for the frequent content of cache user visit, and its memory size can be 32GB or 64GB etc., wherein, the Cache node is also shared the data of oneself in the Udp radio network.In the Udp radio network, also be provided with physical equipment, physical equipment is a hard disc equipment, be a kind of server that is used to store cable video, all be provided with a local Cache node in each physical equipment, this this locality Cache node is used for the frequent content of buffer memory physical equipment user capture.When visit data, at first visit the Cache node, if the content that will not visit in the Cache node visits again local physical equipment, so, can improve access speed.If can will carry out point-to-point connection by high-speed data channel between all the Cache nodes in the Udp radio network, with realization all the Cache nodes in the Udp radio network are formed the shared network of a high speed, thereby can improve the speed of user capture content.
Based on foregoing description, the embodiment of the invention provides a kind of method of building high-speed shared network, this method is built up a point-to-point high speed shared network with all the Cache groups of nodes in the Udp radio network, present embodiment is that example describes to set up high-speed data channel between Cache node in the Udp radio network and the 2nd Cache node, when any two Cache nodes in the Udp radio network are set up high-speed data channel by the method for a Cache node and the 2nd Cache high-speed data channel that node is built, just set up out the high speed shared network, as shown in Figure 2, this method comprises:
Step 101: when a Cache node joins in the Udp radio network, the one Cache node is to Udp radio network broadcasting high-speed data channel information, this high-speed data channel information comprises the IP (Internet Protocol, Internet protocol) of a Cache node and port etc.;
Wherein, a Cache node is certain node in the Udp radio network, and a Cache node can become the high-speed data channel information package form of heartbeat packet, and then is broadcast in the udp broadcast network.
Step 102: the 2nd Cache node receives the high-speed data channel information of a Cache node broadcasts from the Udp radio network;
Wherein, the 2nd Cache node also is certain node in the Udp radio network.
Step 103: the 2nd Cache node judges whether to have set up high-speed data channel with a Cache node according to the high-speed data channel information that receives, if not, and execution in step 104, if, execution in step 105;
Wherein, the Cache node is set up high-speed data channel by information such as IP and ports with another Cache node.
Particularly, the 2nd Cache node reads information such as the IP that comprises and port from the high-speed data channel information that receives, according to information such as IP that reads and ports, from all high-speed data channels of self having set up, search, if from all high-speed data channels of having set up, do not find out and all identical high-speed data channels of information such as IP that reads and port, then do not set up high-speed data channel between the 2nd a Cache node and the Cache node, otherwise, set up high-speed data channel between the 2nd a Cache node and the Cache node.
Step 104: the 2nd Cache node is created a high-speed data channel between himself and a Cache node;
Wherein, the 2nd Cache node is set up high-speed data channel by TCP (Transmission Control Protocol, a transmission control protocol) agreement and a Cache node.
Step 105: the 2nd Cache node is directly lost the high-speed data channel information of reception.
Wherein, each Cache node of other in the Udp radio network receives the high-speed data channel information of a Cache node broadcasts from the Udp radio network, and all sets up high-speed data channel with a Cache node as stated above.
Wherein, each Cache node in the Udp radio network is all pressed a Cache node and broadcast high-speed data channel information in the Udp radio network, high-speed data channel between foundation and other each Cache nodes, the high speed shared network formed by the Cache node, high speed shared network have as shown in Figure 3 just been obtained.
Wherein, when a new Cache node will add the high speed shared network, this node at first added the Udp radio network, again by the method foundation of a Cache node and the high-speed data channel between each the Cache node in the high speed shared network.In addition, each the Cache node in the high speed shared network promptly store the one-to-one relationship between the data block ID corresponding with it in the Cache node, and the size of data block is generally 8Mb with the unit storage data of data block.
Embodiment 2
As shown in Figure 4, the embodiment of the invention provides a kind of Cache the method for scheduling, and the Cache node in the high speed shared network that this method is set up embodiment 1 is dispatched, and comprising:
The ID of data block is carried in the request that step 201:FMS receives self terminal to obtain data block in this request;
Step 202:FMS searches local Cache node according to this ID, if find out the data block of this ID correspondence, then execution in step 203, if do not find out this data block, then execution in step 204;
Step 203:FMS obtains this data block from local Cache node, and returns this data block and give terminal, EO;
Step 204:FMS searches the Cache node of this data block of buffer memory according to this ID from network, if find out the Cache node, and execution in step 205, otherwise, execution in step 206;
Step 205:FMS obtains this data block and gives terminal, EO from the Cache node of searching;
Step 206:FMS finds out the physical equipment of this data block of storage;
Step 207: local Cache node receives this data block of the Cache node transmission of this physical equipment correspondence, this data block of buffer memory;
Step 208:FMS obtains this data block and returns to terminal, EO from local Cache node.
Wherein, each the Cache node in the network is all shared the content of himself, when in the local Cache node not during the data block of this ID correspondence, can find out this data block from network.
In embodiments of the present invention, according to the ID of the data block of carrying in the request that comes self terminal, search local Cache node, if find out data block, then directly return this data block, if do not have, then from network, search data block, and return this data block according to this ID.Because with the data block is that the data in the Cache node are dispatched by unit, thereby improved the efficient of visiting the data in the Cache node; Because the Cache node in the network is shared data all, thereby whether the data of working as user capture can obtain data, thereby further improve efficiency for data access or not in local Cache node from network C ache node.
Embodiment 3
The embodiment of the invention provides a kind of Cache the method for scheduling, and the Cache node in the high speed shared network that this method is set up embodiment 1 is dispatched, and as shown in Figure 5, this method comprises:
Step 301: terminal sends the request of obtaining data block to FMS (File Manager System, file management system), carries the ID of the data block that needs request in this request;
Wherein, terminal sends request by api function, for example comprises the libfan function in the api function, and terminal sends a request message by the libfan function.Particularly, terminal is called the libfan function, and the libfan function is set up communication by Transmission Control Protocol and FMS, after communication is set up successfully, sends the request of obtaining data block to FMS.
After step 302:FMS receives request, according to the ID that carries in the request, whether search in the local Cache node data block of this ID correspondence of buffer memory, if then execution in step 303, if not, then execution in step 304;
Wherein, local Cache node is to be that unit carries out buffer memory with the data block, the corresponding relation between the ID that caching data block is corresponding with it in the Cache node.
Particularly, FMS is an index with this ID, from local Cache node, search in the corresponding relation of data in buffer piece and ID, if search out data block, the data block that this ID correspondence is then arranged at local Cache nodal cache, if do not search out data block, then in local Cache node, there is not the data block of this ID correspondence of buffer memory.
Step 303:FMS obtains the data block of this ID correspondence of searching from local Cache node, and returns to terminal, EO;
Particularly, FMS sends and to be notified to terminal, and this notice is used for informing that terminal reads the data block of this ID correspondence from local Cache node, after terminal receives notice, reads the data block of this ID correspondence from local Cache node.
Wherein, FMS finds out the data block of terminal request will notify terminal at the Cache at place node, reads required data block in the Cache node of terminal from notice.
Wherein, in the present embodiment, with the operated number of times of depositing on the hit rate record Cache point of certain data block, with the current operation number of certain data block of depositing on the Cache node being operated of reference count record, with the current operation number of certain Cache node being operated of load record.Operation comprises to be read, upgrades or write.Wherein, hit rate is used to write down the accessed number of times of certain data block.
Wherein, when terminal begins to read this data block on the Cache node of this this locality, the hit rate of this data block that this this locality Cache node is deposited self and reference count increases progressively and the load of self also increases progressively, when terminal when this this locality Cache node has read this data block, the reference count of this data block that this this locality Cache node self is deposited and the load of self all successively decrease.Wherein, the easiest implementation is: this this locality Cache node adopts and to add 1 mode hit rate, reference count and load are increased progressively, and adopts to subtract 1 mode reference count and load are successively decreased.
Wherein, in the present embodiment, when the reference count of certain data block in the Cache node was reduced to zero, when promptly this data block just be not operated, this Cache node just fell into disuse the time for this data block setting.The time of falling into disuse is used to write down this data block does not have the operated time, adds up in time.When the Cache node is regained storage area, will preferentially regain the shared storage area of data block that hit rate is low and the time of falling into disuse is grown.
Step 304:FMS is according to this ID, search other Cache nodes of the data block that whether has this ID correspondence in the high speed shared network, if from network, find out a plurality of Cache nodes, then execution in step 305, if from network, find out a Cache node, then execution in step 306, if do not find out the Cache node in network, then execution in step 307;
Particularly, be index with ID, in the corresponding relation to the data block corresponding of other each the Cache node data blocks stored ID in the network, search for it, search out all Cache nodes that have the data block of this ID correspondence in the network.
Step 305:FMS selects a minimum Cache node of load, and obtain the data block of this ID correspondence from this Cache node, and return to terminal, EO according to the load of each Cache node;
Wherein, FMS sends and is notified to terminal, and this notice is used for informing that terminal reads the data block of request from the Cache node of selecting, and behind the terminal reception notification, reads the data block of this ID correspondence from the Cache node of this selection.
For example, FMS finds out three Cache nodes from network, and load is respectively 2,4,7, and then the selection load is 2 Cache node.The speed of read block is the highest from the minimum Cache node of loading, thereby can improve the throughput of whole network.
Wherein, when beginning is read this data block on the Cache of this selection node, the hit rate of this data block that the Cache node of selecting is deposited self and reference count and the load of self all increase progressively, when the Cache node from selection had read this data block, the reference count of this data block that the Cache node of selection is deposited self and the load of self all successively decreased.
Step 306:FMS obtains the data block of this ID correspondence from the Cache node that this is searched, and returns to terminal, EO;
Particularly, FMS sends and to be notified to terminal, and this notice is used for informing that terminal reads the data block of this ID correspondence from this Cache node of searching, after terminal receives notice, reads the data block of this ID correspondence from the Cache node that this is searched.
Wherein, when beginning is read this data block on the Cache node that this is searched, the hit rate of this data block that the Cache node of searching is deposited self and reference count increases progressively and the load of self also increases progressively, when when the Cache node of searching has read this data block, the reference count of this data block that the Cache node of searching is deposited self and the load of self all successively decrease.
Step 307:FMS finds out the physical equipment of the data block of this ID correspondence of storage from the Udp radio network, and notifies the local Cache node of this physical equipment correspondence to read this data block from physical equipment, is distributed to local Cache node simultaneously;
Wherein, physical equipment is the server of storage data in the Udp network, store the corresponding relation of the lot of data piece ID corresponding in the hard disc of physical equipment with it, and each physical equipment all has a local Cache node, and this Cache node is used for the portion of hot point data of buffer memory physical equipment.
Particularly, FMS is an index with this ID, the corresponding data block of this ID of search in the ID that from each physical equipment, stores and the corresponding relation of data block, when storing the data block of this ID correspondence in certain physical equipment in searching out network, just send the local Cache node that is notified to this physical equipment correspondence, the local Cache node that this notice is used for informing this physical equipment correspondence reads the several piece of this ID correspondence from physical equipment, and the data block that reads is distributed to local Cache node.
Step 308: behind the Cache node reception notification of this physical equipment, from this physical equipment, read the data block of this ID correspondence, and send to local Cache node;
Particularly, behind the Cache node reception notification of this physical equipment, judge whether self also has the memory space caching data block, if do not have, the recovery hit rate is low and fall into disuse the long shared memory space of data block of time, the memory space of reallocating; If have, direct memory allocated space; This ID corresponding data piece is read in indication according to notice from physical equipment, be buffered in the memory space of distribution, and send this data block to local Cache node.
Wherein, when the local Cache node of this physical equipment correspondence write this data block that reads, the local Cache node of this physical equipment correspondence for this data block hit rate is set and reference count is 1, and self load is increased progressively.
In addition, the local Cache node of this physical equipment correspondence judged earlier before sending data block whether the high-speed data channel between itself and the local Cache node exists, if existence then sends data to local Cache node, if there is no, end operation then.
Step 309: local Cache node receives this data block, and this data block of buffer memory, reinforms FMS;
Particularly, after local Cache node receives this data block, judge whether self also has the memory space caching data block, if do not have, the recovery hit rate is low and fall into disuse the long shared memory space of data block of time, the memory space of reallocating; If have, direct memory allocated space; This data-block cache in the memory space that distributes, is reinformed FMS.
Wherein, when local Cache node write this data block, for this data block is provided with hit rate and reference count is 1, the load with self increased progressively simultaneously.
Behind the step 310:FMS reception notification, from local Cache node, obtain the data block of this ID correspondence, and return to terminal, EO.
Particularly, FMS sends and is notified to terminal, and this notice is used for informing that terminal reads needed data block from local Cache node, behind the terminal reception notification, reads the data block of this ID correspondence according to notice from local Cache node.
Wherein, when terminal is asked other data blocks again, then repeatedly set by step the process of 201-210 carry out Cache scheduling, obtain the data block of request, and the data block of obtaining returned to terminal.In addition, terminal can be for being used for the video broadcasting server of displaying video in the present embodiment, Cache node in the network can be CAN (Cache Access Node, the cache access node), and the size of CAN is 32GB or 64GB etc., physical equipment can be DAN (Disk Access Node, disk access node) server, and the DAN server disposition has CAN.
In embodiments of the present invention, according to the ID of the data block of carrying in the request that comes self terminal, search local Cache node, if find out data block, then directly return this data block, if do not have, then from network, search data block, and return this data block according to this ID.Because with the data block is that the data in the Cache node are dispatched by unit, thereby improved the efficient of visiting the data in the Cache node; Because the Cache node in the network is shared data all, thereby whether the data of working as user capture can obtain data, thereby further improve efficiency for data access or not in local Cache node from network C ache node.
Embodiment 4
As shown in Figure 6, the embodiment of the invention provides a kind of equipment of Cache scheduling, comprising:
Receiver module 401 is used to the request that receives self terminal to obtain data block, carries the ID of data block in this request;
First searches module 402, is used for searching local Cache node according to this ID;
First returns module 403, if be used for finding out the data block of this ID correspondence, then return the data block of searching and gives terminal;
Second searches module 404, if be used for not finding out this data block, searches the Cache node of this data block of buffer memory according to this ID from network, if find out the Cache node, obtains this data block and give terminal from the Cache node of searching; If do not find out the Cache node, find out the physical equipment of this data block of storage; After local Cache nodal cache this data block, from local Cache node, obtain this data block and return to terminal from the Cache node of this physical equipment correspondence.
Wherein, second searches module 404, if specifically be used for not finding out this data block, Cache node according to this data block of buffer memory in this ID Network Search, if find out a plurality of Cache nodes, then select the minimum Cache node of load, from the Cache node of selecting, read this data block and return to terminal; If find out a Cache node, from the Cache node of searching, read this data block and return to terminal; If do not find out the Cache node, find out the physical equipment of this data block of storage; After local Cache nodal cache this data block, from local Cache node, obtain this data block and return to terminal from the Cache node of this physical equipment correspondence.
In embodiments of the present invention, ID according to the data block of carrying in the request that comes self terminal, search local Cache node, if find out data block, then directly return this data block,, then from network, search data block according to this ID if do not have, and return this data block. owing to be that the data in the Cache node are dispatched by unit with the data block, thereby the efficient of the data in the visit Cache node improved; Because the Cache node in the network is shared data all, thereby whether the data of working as user capture can obtain data, thereby further improve efficiency for data access or not in local Cache node from network C ache node.
Embodiment 5
As shown in Figure 7, the embodiment of the invention provides a kind of system of Cache scheduling, comprising:
The equipment 501 of Cache scheduling is used to the request that receives self terminal to obtain data block, carries the ID of data block in this request; Search local Cache node according to this ID; If find out the data block of this ID correspondence, then return this data block and give terminal; If do not find out this data block, from network, search the Cache node of this data block of buffer memory according to this ID, if find out the Cache node, from the Cache node of searching, obtain this data block and give terminal; If do not find out the Cache node, find out the physical equipment of this data block of storage; After local Cache nodal cache this data block, from local Cache node, obtain this data block and return to terminal from the Cache node of physical equipment correspondence;
Accessed Cache node 502 is used for equipment 501 when Cache scheduling and finds out local Cache node when being cached with this data block, returns this data block and gives terminal; When the equipment 501 of Cache scheduling finds out the Cache node of this data block of buffer memory in the network, return this data block and give terminal; When local Cache node receives this data block from the Cache node of physical equipment correspondence, this data block of buffer memory, and return this data block and give terminal.
Wherein, accessed Cache node 502 specifically comprises:
Second returns module, is used for equipment 501 when Cache scheduling and finds out local Cache node when being cached with this data block, returns this data block and gives terminal; When the equipment 501 of Cache scheduling finds out the Cache node of this data block of buffer memory in the network, return this data block and give terminal;
Judge module is used for this data block when the Cache node transmission of local Cache node reception physical equipment correspondence, judges this data block of buffer memory of self whether also having living space;
The 3rd returns module, judges and does not have if be used for judge module, and it is low and do not have the shared space of operated data block to reclaim access times, and the reallocation space in the space of distributing, and is returned this data-block cache this data block and given terminal;
The 4th returns module, has judged if be used for judge module, and allocation space in the space of distributing, and is returned this data-block cache this data block and given terminal;
Accessed Cache node 502 also comprises:
Logging modle is used to write down the accessed number of times of this data block;
Accessed Cache node also comprises:
Module is set, is used for falling into disuse the time for this data block setting when the data block in arbitrary Cache node of network just has not been operated, wherein, the time of falling into disuse is used for recording data blocks does not have the operated time;
Correspondingly,
The 3rd returns module, judges and does not have if specifically be used for judge module, and the priority reclamation access times are low and fall into disuse the long shared space of data block of time, and the reallocation space in the space of distributing, and is returned this data-block cache this data block and given terminal.
Wherein, the equipment of the Cache scheduling that provides of this enforcement can be FMS.
In embodiments of the present invention, ID according to the data block of carrying in the request that comes self terminal, search local Cache node, if find out data block, then directly return this data block,, then from network, search data block according to this ID if do not have, and return this data block. owing to be that the data in the Cache node are dispatched by unit with the data block, thereby the efficient of the data in the visit Cache node improved; Because the Cache node in the network is shared data all, thereby whether the data of working as user capture can obtain data, thereby further improve efficiency for data access or not in local Cache node from network C ache node.
All or part of content in the technical scheme that above embodiment provides can realize that its software program is stored in the storage medium that can read by software programming, storage medium for example: the hard disk in the computer, CD or floppy disk.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (11)

1. the method for Cache scheduling is characterized in that described method comprises:
The identification code ID of data block is carried in the request that file management system FMS receives self terminal to obtain data block in the described request;
Described FMS searches local Cache node according to described ID;
If find out the data block of described ID correspondence, described FMS returns described data block and gives terminal;
If do not find out described data block, described FMS searches the Cache node of the described data block of buffer memory according to described ID from network, if find out the Cache node, obtains described data block and give terminal from described Cache node; If do not find out the Cache node, find out the physical equipment of the described data block of storage; Described local Cache node receives the described data block of the Cache node transmission of described physical equipment correspondence, the described data block of buffer memory; Described FMS obtains described data block and returns to terminal from described local Cache node.
2. the method for claim 1 is characterized in that, describedly searches the Cache node of the described data block of buffer memory according to described ID from network, if find out the Cache node, obtains described data block and give terminal from described Cache node, specifically comprises:
According to the Cache node of the described data block of buffer memory in the described ID Network Search, if find out a plurality of Cache nodes, then select the minimum Cache node of load, from the Cache node of described selection, read described data block and return to terminal;
If find out a Cache node, from described Cache node, read described data block and return to terminal.
3. the method for claim 1 is characterized in that, described local Cache node receives the described data block of the Cache node transmission of described physical equipment correspondence, and the described data block of buffer memory specifically comprises:
Described local Cache node receives the described data block of the Cache node transmission of described physical equipment correspondence, judges the described data block of buffer memory of self whether also having living space;
If no, it is low and do not have the shared space of operated data block to reclaim access times, the reallocation space, with described data-block cache in the space of described distribution;
If have, allocation space, with described data-block cache in the space of described distribution.
4. as the described method of the arbitrary claim of claim 1-3, it is characterized in that described method also comprises:
Accessed Cache node writes down the accessed number of times of described data block.
5. method as claimed in claim 3, it is characterized in that described method also comprises:
When the data block in the arbitrary Cache node in the network just be not operated, described Cache node was that the time is fallen into disuse in described data block setting, and the described time of falling into disuse is used to write down described data block does not have the operated time;
Correspondingly, described recovery access times are low and do not have the shared space of operated data block, specifically comprise:
The shared space of data block that the priority reclamation access times are low and the time of falling into disuse is grown.
6. the equipment of Cache scheduling is characterized in that described equipment comprises:
Receiver module is used to the request that receives self terminal to obtain data block, carries the identification code ID of data block in the described request;
First searches module, is used for searching local Cache node according to described ID;
First returns module, if be used for finding out the data block of described ID correspondence, then return described data block and gives terminal;
Second searches module, if be used for not finding out described data block, searches the Cache node of the described data block of buffer memory according to described ID from network, if find out the Cache node, obtains described data block and give terminal from described Cache node; If do not find out the Cache node, find out the physical equipment of the described data block of storage; After the described data block of described local Cache nodal cache, from described local Cache node, obtain described data block and return to terminal from the Cache node of described physical equipment correspondence.
7. equipment as claimed in claim 6, it is characterized in that, described second searches module, if specifically be used for not finding out described data block, Cache node according to the described data block of buffer memory in the described ID Network Search, if find out a plurality of Cache nodes, then select the minimum Cache node of load, from the Cache node of described selection, read described data block and return to terminal; If find out a Cache node, from described Cache node, read described data block and return to terminal; If do not find out the Cache node, find out the physical equipment of the described data block of storage; After the described data block of described local Cache nodal cache, from described local Cache node, obtain described data block and return to terminal from the Cache node of described physical equipment correspondence.
8. the system of Cache scheduling is characterized in that described system comprises:
The equipment of Cache scheduling is used to the request that receives self terminal to obtain data block, carries the identification code ID of data block in the described request; Search local Cache node according to described ID; If find out the data block of described ID correspondence, then return described data block and give terminal; If do not find out described data block, from network, search the Cache node of the described data block of buffer memory according to described ID, if find out the Cache node, from described Cache node, obtain described data block and give terminal; If do not find out the Cache node, find out the physical equipment of the described data block of storage; After the described data block of described local Cache nodal cache, from described local Cache node, obtain described data block and return to terminal from the Cache node of described physical equipment correspondence;
Accessed Cache node is used for equipment when described Cache scheduling and finds out described local Cache node when being cached with described data block, returns described data block and gives terminal; When the equipment of described Cache scheduling finds out the Cache node of the described data block of buffer memory in the network, return described data block and give terminal; When described local Cache node receives described data block from the Cache node of described physical equipment correspondence, the described data block of buffer memory, and return described data block and give terminal.
9. system as claimed in claim 8 is characterized in that, described accessed Cache node specifically comprises:
Second returns module, is used for equipment when described Cache scheduling and finds out described local Cache node when being cached with described data block, returns described data block and gives terminal; When the equipment of described Cache scheduling finds out the Cache node of the described data block of buffer memory in the network, return described data block and give terminal;
Judge module is used for working as the described data block that described local Cache node receives the Cache node transmission of described physical equipment correspondence, judges the described data block of buffer memory of self whether also having living space;
The 3rd returns module, judge and do not have if be used for described judge module, it is low and do not have a shared space of operated data block, reallocation space to reclaim access times, described data-block cache in the space of described distribution, and is returned described data block and given terminal;
The 4th returns module, has judged if be used for described judge module, and allocation space in the space of described distribution, and is returned described data-block cache described data block and given terminal.
10. system as claimed in claim 8 or 9 is characterized in that described Cache node also comprises:
Logging modle is used to write down the accessed number of times of described data block.
11. system as claimed in claim 9, it is characterized in that described Cache node also comprises:
Module is set, is used for falling into disuse the time for described data block setting when the data block in arbitrary Cache node of network just has not been operated, the described time of falling into disuse is used to write down described data block does not have the operated time;
Correspondingly,
The described the 3rd returns module, judge and do not have if specifically be used for described judge module, the priority reclamation access times are low and fall into disuse the long shared space of data block of time, reallocation space, described data-block cache in the space of described distribution, and is returned described data block and given terminal.
CN200910235456.5A 2009-10-14 2009-10-14 Method, device and system for dispatching Cache Active CN101707684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910235456.5A CN101707684B (en) 2009-10-14 2009-10-14 Method, device and system for dispatching Cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910235456.5A CN101707684B (en) 2009-10-14 2009-10-14 Method, device and system for dispatching Cache

Publications (2)

Publication Number Publication Date
CN101707684A true CN101707684A (en) 2010-05-12
CN101707684B CN101707684B (en) 2014-04-30

Family

ID=42377866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910235456.5A Active CN101707684B (en) 2009-10-14 2009-10-14 Method, device and system for dispatching Cache

Country Status (1)

Country Link
CN (1) CN101707684B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014177010A1 (en) * 2013-04-28 2014-11-06 华为终端有限公司 Method, apparatus and system for data transmission
CN104317735A (en) * 2014-09-24 2015-01-28 北京云巢动脉科技有限公司 High-capacity cache and method for data storage and readout as well as memory allocation and recovery
CN104580268A (en) * 2013-10-09 2015-04-29 南京中兴新软件有限责任公司 Method and device for transmitting file data
CN105630889A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Method and device for realizing generic cache
CN107040612A (en) * 2014-09-25 2017-08-11 海信集团有限公司 A kind of information recommendation method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998057265A1 (en) * 1997-06-09 1998-12-17 Cacheflow, Inc. Network object cache engine
WO2004006101A1 (en) * 2002-07-04 2004-01-15 Sony Corporation Cache device, cache data management method, and computer program
CN101510223A (en) * 2009-04-03 2009-08-19 成都市华为赛门铁克科技有限公司 Data processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998057265A1 (en) * 1997-06-09 1998-12-17 Cacheflow, Inc. Network object cache engine
WO2004006101A1 (en) * 2002-07-04 2004-01-15 Sony Corporation Cache device, cache data management method, and computer program
CN101510223A (en) * 2009-04-03 2009-08-19 成都市华为赛门铁克科技有限公司 Data processing method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014177010A1 (en) * 2013-04-28 2014-11-06 华为终端有限公司 Method, apparatus and system for data transmission
US9736872B2 (en) 2013-04-28 2017-08-15 Huawei Device Co., Ltd. Data transmission method, apparatus, and system
CN104580268A (en) * 2013-10-09 2015-04-29 南京中兴新软件有限责任公司 Method and device for transmitting file data
CN104317735A (en) * 2014-09-24 2015-01-28 北京云巢动脉科技有限公司 High-capacity cache and method for data storage and readout as well as memory allocation and recovery
CN107040612A (en) * 2014-09-25 2017-08-11 海信集团有限公司 A kind of information recommendation method and device
CN105630889A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Method and device for realizing generic cache
CN105630889B (en) * 2015-12-18 2019-12-10 北京奇虎科技有限公司 Universal caching method and device

Also Published As

Publication number Publication date
CN101707684B (en) 2014-04-30

Similar Documents

Publication Publication Date Title
US10555053B2 (en) Video processing method and associated devices and communication system
CN100359490C (en) Memory control device and method for base station modem
CN102638584B (en) Data distributing and caching method and data distributing and caching system
CN101707684B (en) Method, device and system for dispatching Cache
CN105512053B (en) The mirror cache method of mobile transparent computing system server end multi-user access
US20080133830A1 (en) Efficient utilization of cache servers in mobile communication system
CN102025793A (en) Domain name resolution method and system and DNS in IP network
CN101170555A (en) Address resolution protocol (ARP) cache management method and related communication device
WO2006084417A1 (en) A buffer management method based on a bitmap table
US8402198B1 (en) Mapping engine for a storage device
CN101330472A (en) Method for caching and processing stream medium data
CN104253836B (en) Image display method, mobile terminal based on wireless network and system
CN101729272B (en) Method, system and device for content distribution, and media server
KR100861692B1 (en) Unified contents update system for mobile widget application and method thereof
JP2001014292A (en) Transmitting device and transmitting method, receiving device and receiving method and transmitting-receiving system and transmitting-receiving method
CN105243078B (en) A kind of distribution method of file resource, system and device
CN102045234A (en) Buffering and overtime processing methods of route address mapping information as well as tunnel router
KR20130123845A (en) Data storage communications apparatus, data transmission and management method using the apparatus
CN115328818A (en) Data stream storage display rapid addressing method
CN101873463A (en) Video playback method, monitoring client and digital hard disk video recorder
CN109788047A (en) A kind of cache optimization method and a kind of storage medium
CN104159058A (en) Efficient method capable of realizing simultaneous video recording of multi-way media streams
US20140136647A1 (en) Router and operating method thereof
JP2007221522A (en) Polling device, terminal device, polling method and program
CN109460293B (en) Computing resource selection method under distributed computing environment in wireless cloud computing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant