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

Method, device and system for dispatching Cache Download PDF

Info

Publication number
CN101707684B
CN101707684B CN200910235456.5A CN200910235456A CN101707684B CN 101707684 B CN101707684 B CN 101707684B CN 200910235456 A CN200910235456 A CN 200910235456A CN 101707684 B CN101707684 B CN 101707684B
Authority
CN
China
Prior art keywords
data block
cache node
cache
terminal
node
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.)
Active
Application number
CN200910235456.5A
Other languages
Chinese (zh)
Other versions
CN101707684A (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 CATV Field, particularly a kind of method, equipment and system of Cache scheduling.
Background technology
In CATV Field, user is accessed to content caching frequently and, in Cache, when accessing identical data, can access physical equipment, but adopt based on Cache dispatching technique access Cache, thereby improved access speed.
Adopt at present the Cache of file system self to carry out buffer memory to broadcast content, file system is carried out buffer memory take page as unit to data, and the size of page is 1KB.Wherein, file system adopts the way access Cache of the Cache scheduling take page as unit, be specially: when terminal is during to 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 in Cache, to terminal, returns to this page data, if do not had in Cache, from physical equipment, read this page data, this page data is buffered in Cache, to terminal, return to this page data simultaneously.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
The first, along with the fast development of cable TV, the increase of the data volume of user's access, and the efficiency of using the method for the Cache scheduling take page as unit to go to access the data in Cache cannot meet the requirement of high-throughput.
The second, the data that need when terminal, not in the Cache of file system self, are obtained data in the Cache of other that file system can not be from network, thereby are reduced the efficiency of visit data.
Summary of the invention
In order to improve the efficiency of visit data, the embodiment of the present invention provides a kind of method, equipment and system of Cache scheduling.Described technical scheme is as follows:
A method for Cache scheduling, described method comprises:
The request that file management system FMS receives self terminal and obtains data block, carries the identification code ID of data block in described request;
Described FMS searches local Cache node according to described ID;
If find out the data block that described ID is corresponding, described FMS returns to described data block to terminal;
If do not find out described data block, the Cache node that described FMS searches data block described in buffer memory according to described ID from network if find out Cache node, obtains described data block to terminal from described Cache node; If do not find out Cache node, find out the physical equipment of the described data block of storage; Described local Cache node receives the described data block that Cache node corresponding to described physical equipment sends, data block described in 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 that Cache node corresponding to described physical equipment sends, and data block described in buffer memory, specifically comprises:
Described local Cache node receives the described data block that Cache node corresponding to described physical equipment sends, and judges self whether to also have data block described in spatial cache;
If no, reclaim access times low and there is no a shared space of operated data block, reallocation space, by described data-block cache in the space of described distribution;
If had, allocation space, by described data-block cache in the space of described distribution.
The described Cache node of searching data block described in buffer memory according to described ID from network if find out Cache node, obtains described data block to terminal from described Cache node, specifically comprises:
According to the Cache node of data block described in buffer memory in described ID Network Search, if find out multiple Cache nodes, 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, records the accessed number of times of described data block.
Described method also comprises:
When the data block in the arbitrary Cache node in network is just by when operation, described Cache node is that the time is fallen into disuse in described data block setting, described in the time of falling into disuse for recording described data block, there is no the operated time;
Correspondingly, described recovery access times are low and there is no the shared space of operated data block, specifically comprise:
The shared space of data block that priority reclamation access times are low and the time of falling into disuse is grown.
An equipment for Cache scheduling, described equipment comprises:
Receiver module, the request of obtaining data block for receiving self terminal, carries the identification code ID of data block in described request;
First searches module, for search local Cache node according to described ID;
First returns to module, if for finding out the data block that described ID is corresponding, return to described data block to terminal;
Second searches module, if for not finding out described data block, the Cache node of searching data block described in buffer memory according to described ID from network if find out Cache node, obtains described data block to terminal from described Cache node; If do not find out Cache node, find out the physical equipment of the described data block of storage; When after the described data block of described local Cache nodal cache corresponding Cache node from described physical equipment, from described local Cache node, obtain described data block and return to terminal.
Described second searches module, if specifically for not finding out described data block, according to the Cache node of data block described in buffer memory in described ID Network Search, if find out multiple Cache nodes, 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 Cache node, find out the physical equipment of the described data block of storage; When after the described data block of described local Cache nodal cache corresponding Cache node from described physical equipment, from described local Cache node, obtain described data block and return to terminal.
A system for Cache scheduling, described system comprises:
The equipment of Cache scheduling, the request of obtaining data block for receiving self terminal, carries the identification code ID of data block in described request; According to described ID, search local Cache node; If find out the data block that described ID is corresponding, return to described data block to terminal; If do not find out described data block, the Cache node of searching data block described in buffer memory according to described ID from network if find out Cache node, obtains described data block to terminal from described Cache node; If do not find out Cache node, find out the physical equipment of the described data block of storage; When after the described data block of described local Cache nodal cache corresponding Cache node from described physical equipment, from described local Cache node, obtain described data block and return to terminal;
Accessed Cache node, while being cached with described data block for finding out described local Cache node when the equipment of described Cache scheduling, returns to described data block to terminal; When the equipment of described Cache scheduling finds out in network described in buffer memory the Cache node of data block, return to described data block to terminal; When described local Cache node receives the described data block of the Cache node corresponding from described physical equipment, data block described in buffer memory, and return to described data block to terminal.
Described Cache node specifically comprises:
Second returns to module, while being cached with described data block for finding out described local Cache node when the equipment of described Cache scheduling, returns to described data block to terminal; When the equipment of described Cache scheduling finds out in network described in buffer memory the Cache node of data block, return to described data block to terminal;
Judge module, for receive the described data block that Cache node corresponding to described physical equipment sends when described local Cache node, judges self whether to also have data block described in spatial cache;
The 3rd returns to module, if judge and do not have for described judge module, recovery access times are low and there is no the shared space of operated data block, the space of reallocating, described data-block cache, in the space of described distribution, and is returned to described data block to terminal;
The 4th returns to module, if judged for described judge module, allocation space, in the space of described distribution, and returns to described data-block cache to described data block to terminal.
Described Cache node also comprises:
Logging modle, for recording the accessed number of times of described data block.
Described Cache node also comprises:
Module is set, for when the data block in arbitrary Cache node of network is just by when operation, for the time is fallen into disuse in described data block setting, described in the time of falling into disuse for recording described data block, there is no the operated time;
Correspondingly,
The described the 3rd returns to module, if judge and do not have specifically for described judge module, priority reclamation access times are low and fall into disuse the long shared space of data block of time, the space of reallocating, described data-block cache, in the space of described distribution, and is returned to described data block to terminal.
In embodiments of the present invention, according to the ID that carrys out the data block of carrying in the request of self terminal, search local Cache node, if find out data block, directly return to this data block, if do not had, according to this ID, from network, search data block, and return to this data block.Owing to dispatching the data in Cache node take data block as unit, thereby improved the efficiency of accessing the data in Cache node; Because the Cache node in network is all shared data, thereby whether the data of working as user's access or not in local Cache node, can from network C ache node, obtain data, thereby further improve the efficiency of visit data.
Accompanying drawing explanation
Fig. 1 is a kind of Udp radio network structural representation that the embodiment of the present 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 present invention 1;
Fig. 3 is a kind of high speed shared network structural representation that the embodiment of the present invention 1 provides;
Fig. 4 is the method flow diagram of a kind of Cache scheduling that provides of the embodiment of the present invention 2;
Fig. 5 is the method flow diagram of a kind of Cache scheduling that provides of the embodiment of the present invention 3;
Fig. 6 is the device structure schematic diagram of a kind of Cache scheduling that provides of the embodiment of the present invention 4;
Fig. 7 is the system configuration schematic diagram of a kind of Cache scheduling that provides of the embodiment of the present invention 5.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
Be illustrated in figure 1 a kind of Udp (User Datagram Protocol, User Datagram Protoco (UDP)) radio network, Udp radio network is a kind of cable video network, in Udp radio network, be provided with Cache node, Cache node is cache device, for cache user, accesses content frequently, and its memory size can be 32GB or 64GB etc., wherein, Cache node is also shared the data of oneself in Udp radio network.In Udp radio network, be also provided with physical equipment, physical equipment is hard disc equipment, be a kind of for storing the server of cable video, be provided with a local Cache node in each physical equipment, this this locality Cache node is accessed content frequently for buffer memory physical equipment user.When visit data, first access Cache node, if the content that will not access in 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 Cache nodes in Udp radio network, to realize the shared network of the high speed of all Cache node compositions in Udp radio network, thereby can improve the speed that user accesses content.
Based on foregoing description, the embodiment of the present invention provides a kind of method of building high-speed shared network, the method is set up into a point-to-point high speed shared network by all Cache nodes in Udp radio network, the present embodiment describes as example to set up high-speed data channel between the Cache node in Udp radio network and the 2nd Cache node, when any two Cache nodes in Udp radio network are set up to 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 high speed shared network, as shown in Figure 2, the method comprises:
Step 101: when a Cache node joins in Udp radio network, the one Cache node is to Udp radio network broadcast high-speed data channel information, this high-speed data channel packets of information is containing the IP (Internet Protocol, Internet protocol) of a Cache node and port etc.;
Wherein, a Cache node is certain node in Udp radio network, and a Cache node can become high-speed data channel information package the form of heartbeat packet, and then is broadcast in udp broadcast network.
Step 102: the 2nd Cache node receives the high-speed data channel information of a Cache node broadcasts from Udp radio network;
Wherein, the 2nd Cache node is also certain node in Udp radio network.
Step 103: the 2nd Cache node, according to the high-speed data channel information receiving, judges whether to have set up high-speed data channel with a Cache node, if not, execution step 104, if so, execution step 105;
Wherein, Cache node, by information such as IP and ports, is set up high-speed data channel with another Cache node.
Particularly, the 2nd Cache node reads the information such as the IP that comprises and port from the high-speed data channel information receiving, according to information such as the IP reading and ports, all high-speed data channels of having set up from self, search, if do not found out from all high-speed data channels of having set up and all identical high-speed data channels of the information such as the IP reading and port, between the 2nd Cache node and a Cache node, do not set up high-speed data channel, otherwise, built vertical high-speed data channel between the 2nd Cache node and a Cache node.
Step 104: the 2nd Cache node creates one article of 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, 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, other the each Cache nodes in Udp radio network receive the high-speed data channel information of a Cache node broadcasts from Udp radio network, and all set up high-speed data channel with a Cache node as stated above.
Wherein, each Cache node in Udp radio network is broadcasted high-speed data channel information by a Cache node in Udp radio network, set up the high-speed data channel between other each Cache nodes, just obtained the high speed shared network being formed by Cache node, high speed shared network as shown in Figure 3.
Wherein, when having a new Cache node will add high speed shared network, first this node adds Udp radio network, then by the high-speed data channel between the each Cache node in the method foundation of a Cache node and high speed shared network.In addition, the each Cache node in high speed shared network, with the unit storage data of data block, in Cache node, store the one-to-one relationship between data block and its corresponding ID, and the size of data block is generally 8Mb.
Embodiment 2
As shown in Figure 4, the embodiment of the present invention provides a kind of method of Cache scheduling, and the Cache node in the high speed shared network that the method is set up embodiment 1 is dispatched, and comprising:
The request that step 201:FMS receives self terminal and obtains data block, carries the ID of data block in this request;
Step 202:FMS searches local Cache node according to this ID, if find out the data block that this ID is corresponding, performs step 203, if do not find out this data block, performs step 204;
Step 203:FMS obtains this data block from local Cache node, and returns to this data block to terminal, EO;
Step 204:FMS searches the Cache node of this data block of buffer memory from network according to this ID, if find out Cache node, and execution step 205, otherwise, execution step 206;
Step 205:FMS obtains this data block to terminal from the Cache node of searching, EO;
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 that this physical equipment is corresponding, this data block of buffer memory;
Step 208:FMS obtains this data block and returns to terminal, EO from local Cache node.
Wherein, each Cache node in network is shared the content of himself, when data block that in local Cache node, this ID is not corresponding, can from network, find out this data block.
In embodiments of the present invention, according to the ID that carrys out the data block of carrying in the request of self terminal, search local Cache node, if find out data block, directly return to this data block, if do not had, according to this ID, from network, search data block, and return to this data block.Owing to dispatching the data in Cache node take data block as unit, thereby improved the efficiency of accessing the data in Cache node; Because the Cache node in network is all shared data, thereby whether the data of working as user's access or not in local Cache node, can from network C ache node, obtain data, thereby further improve the efficiency of visit data.
Embodiment 3
The embodiment of the present invention provides a kind of method of Cache scheduling, and the Cache node in the high speed shared network that the method is set up embodiment 1 is dispatched, and as shown in Figure 5, the 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, and for example api function comprises libfan function, and terminal sends a request message by libfan function.Particularly, terminal is called libfan function, and libfan function is set up communication by Transmission Control Protocol and FMS, after communication is successfully established, sends the request of obtaining data block to FMS.
Step 302:FMS receives after request, according to the ID that carries in request, whether searches in local Cache node data block corresponding to this ID of buffer memory, if so, performs step 303, if not, performs step 304;
Wherein, local Cache node is take data block as unit, to carry out buffer memory, the corresponding relation in Cache node between caching data block and its corresponding ID.
Particularly, FMS is take this ID as index, from local Cache node, in the data block of buffer memory and the corresponding relation of ID, search for, if search out data block, at local Cache nodal cache, there is the data block that this ID is corresponding, if do not search out data block, in local Cache node, there is no data block corresponding to this ID of buffer memory.
Step 303:FMS obtains the data block corresponding to this ID of searching from local Cache node, and returns to terminal, EO;
Particularly, FMS sends notice to terminal, and this notice is for informing that terminal reads from local Cache node the data block that this ID is corresponding, and terminal receives after notice, from local Cache node, reads the data block that this ID is corresponding.
Wherein, the data block that FMS finds out terminal request will notification terminal at the Cache at place node, in the Cache node of terminal from notice, reads required data block.
Wherein, in the present embodiment, record the operated number of times of certain data block of depositing on Cache point by hit rate, record the current operation number certain data block of depositing on Cache node being operated with reference count, with the current operation number certain Cache node being operated of load record.Operation comprises to be read, upgrades or writes.Wherein, hit rate is for recording the accessed number of times of certain data block.
Wherein, when terminal starts 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 is 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 adds 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 Cache node is reduced to zero, when this data block is not just by operation, this Cache node just falls into disuse the time for this data block setting.The time of falling into disuse does not have the operated time for recording this data block, adds up in time.When 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 that whether have the data block that this ID is corresponding in high speed shared network, if find out multiple Cache nodes from network, perform step 305, if find out a Cache node from network, perform step 306, if do not find out Cache node in network, perform step 307;
Particularly, take ID as index, in the corresponding relation of the data block ID of other the each Cache node storages in the network data block corresponding with it, search for, search out all Cache nodes that have the data block that this ID is corresponding in network.
Step 305:FMS, according to the load of each Cache node, selects a minimum Cache node of load, and obtain the data block that this ID is corresponding from this Cache node, and return to terminal, EO;
Wherein, FMS sends notice to terminal, and this notice, for informing the data block of terminal from the Cache node read requests of selection, after terminal reception notification, reads the data block that this ID is corresponding 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 selection load is 2 Cache node.From the Cache node of loading minimum, the speed of read block is the highest, thereby can improve the throughput of whole network.
Wherein, when starting to 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 from the Cache node of selecting while having 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 decrease.
Step 306:FMS obtains the data block that this ID is corresponding from the Cache node that this is searched, and returns to terminal, EO;
Particularly, FMS sends notice to terminal, and this notice is for informing that terminal reads from this Cache node of searching the data block that this ID is corresponding, and terminal receives after notice, from the Cache node that this is searched, reads the data block that this ID is corresponding.
Wherein, when starting to 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 that this ID of storage is corresponding from Udp radio network, and notifies the local Cache node that this physical equipment is corresponding from physical equipment, to read this data block, is distributed to local Cache node simultaneously;
Wherein, physical equipment is the server of storing data in Udp network, in the hard disc of physical equipment, store the corresponding relation of a large amount of data blocks ID corresponding with it, and each physical equipment has a local Cache node, this Cache node is for the part hot spot data of buffer memory physical equipment.
Particularly, FMS is take this ID as index, the ID storing from each physical equipment searches for the corresponding relation of data block the data block that this ID is corresponding, when storing data block corresponding to this ID in certain physical equipment searching out in network, just send notice to local Cache node corresponding to this physical equipment, this notice is used for informing that the local Cache node that this physical equipment is corresponding reads from physical equipment the several piece that this ID is corresponding, and the data block reading is distributed to local Cache node.
Step 308: after the Cache node reception notification of this physical equipment, read the data block that this ID is corresponding from this physical equipment, and send to local Cache node;
Particularly, after the Cache node reception notification of this physical equipment, judge whether self also has memory space caching data block, if do not had, 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 had, directly memory allocated space; According to the indication of notice, from physical equipment, read this ID corresponding data piece, be buffered in the memory space of distribution, and send this data block to local Cache node.
Wherein, when local Cache node corresponding to this physical equipment writes the data block that this reads, local Cache node corresponding to this physical equipment, for this data block arranges hit rate and reference count is 1, increases progressively the load of self.
In addition, local Cache node corresponding to this physical equipment first judged before sending data block whether itself and the high-speed data channel between local Cache node exist, if existence sends data to local Cache node, if there is no, end operation.
Step 309: local Cache node receives this data block, and this data block of buffer memory, reinform FMS;
Particularly, local Cache node receives after this data block, judges whether self also has memory space caching data block, if do not had, 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 had, directly memory allocated space; This data-block cache, in the memory space distributing, is reinformed to FMS.
Wherein, when local Cache node writes this data block, for this data block arranges hit rate and reference count is 1, the load of self is increased progressively simultaneously.
After step 310:FMS reception notification, from local Cache node, obtain the data block that this ID is corresponding, and return to terminal, EO.
Particularly, FMS sends notice to terminal, and this notice is used for informing that terminal reads needed data block from local Cache node, after terminal reception notification, according to notice, from local Cache node, reads the data block that this ID is corresponding.
Wherein, when terminal is asked other data blocks again, repeatedly by the process of step 201-210, carry out Cache scheduling, obtain the data block of request, and the data block of obtaining is returned to terminal.In addition, terminal can be the video broadcasting server for displaying video in the present embodiment, Cache node in network can be CAN (Cache Access Node, 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 DAN server disposition has CAN.
In embodiments of the present invention, according to the ID that carrys out the data block of carrying in the request of self terminal, search local Cache node, if find out data block, directly return to this data block, if do not had, according to this ID, from network, search data block, and return to this data block.Owing to dispatching the data in Cache node take data block as unit, thereby improved the efficiency of accessing the data in Cache node; Because the Cache node in network is all shared data, thereby whether the data of working as user's access or not in local Cache node, can from network C ache node, obtain data, thereby further improve the efficiency of visit data.
Embodiment 4
As shown in Figure 6, the embodiment of the present invention provides a kind of equipment of Cache scheduling, comprising:
Receiver module 401, the request of obtaining data block for receiving self terminal, carries the ID of data block in this request;
First searches module 402, for search local Cache node according to this ID;
First returns to module 403, if for finding out the data block that this ID is corresponding, return to the data block of searching to terminal;
Second searches module 404, if for not finding out this data block, search the Cache node of this data block of buffer memory according to this ID from network, if find out Cache node, from the Cache node of searching, obtains this data block to terminal; If do not find out Cache node, find out the physical equipment of this data block of storage; When after this data block of local Cache nodal cache corresponding Cache node from this physical equipment, from local Cache node, obtain this data block and return to terminal.
Wherein, second searches module 404, if specifically for not finding out this data block, according to the Cache node of this data block of buffer memory in this ID Network Search, if find out multiple Cache nodes, 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 Cache node, find out the physical equipment of this data block of storage; When after this data block of local Cache nodal cache corresponding Cache node from this physical equipment, from local Cache node, obtain this data block and return to terminal.
In embodiments of the present invention, according to the ID that carrys out the data block of carrying in the request of self terminal, search local Cache node, if find out data block, directly return to this data block, if do not had, according to this ID, from network, search data block, and return to this data block.Owing to dispatching the data in Cache node take data block as unit, thereby improved the efficiency of accessing the data in Cache node; Because the Cache node in network is all shared data, thereby whether the data of working as user's access or not in local Cache node, can from network C ache node, obtain data, thereby further improve the efficiency of visit data.
Embodiment 5
As shown in Figure 7, the embodiment of the present invention provides a kind of system of Cache scheduling, comprising:
The equipment 501 of Cache scheduling, the request of obtaining data block for receiving self terminal, carries the ID of data block in this request; According to this ID, search local Cache node; If find out the data block that this ID is corresponding, return to this data block to terminal; If do not find out this data block, according to this ID, from network, search the Cache node of this data block of buffer memory, if find out Cache node, from the Cache node of searching, obtain this data block to terminal; If do not find out Cache node, find out the physical equipment of this data block of storage; When after this data block of the local Cache nodal cache Cache node corresponding from physical equipment, from local Cache node, obtain this data block and return to terminal;
Accessed Cache node 502, while being cached with this data block for finding out local Cache node when the equipment 501 of Cache scheduling, returns to this data block to terminal; When the equipment 501 of Cache scheduling finds out the Cache node of this data block of buffer memory in network, return to this data block to terminal; When local Cache node receives this data block of the Cache node corresponding from physical equipment, this data block of buffer memory, and return to this data block to terminal.
Wherein, accessed Cache node 502 specifically comprises:
Second returns to module, while being cached with this data block for finding out local Cache node when the equipment 501 of Cache scheduling, returns to this data block to terminal; When the equipment 501 of Cache scheduling finds out the Cache node of this data block of buffer memory in network, return to this data block to terminal;
Judge module, for receive this data block of the Cache node transmission that physical equipment is corresponding when local Cache node, judges whether self also has this data block of spatial cache;
The 3rd returns to module, if judge and do not have for judge module, reclaims access times low and there is no a shared space of operated data block, and this data block in the space of distributing, and is returned to this data-block cache to terminal in reallocation space;
The 4th returns to module, if judged for judge module, allocation space, in the space of distributing, and returns to this data-block cache to this data block to terminal;
Accessed Cache node 502 also comprises:
Logging modle, for recording the accessed number of times of this data block;
Accessed Cache node also comprises:
Module is set, and for when the data block in arbitrary Cache node of network is not just operated, for the time is fallen into disuse in this data block setting, wherein, the time of falling into disuse does not have the operated time for recording data blocks;
Correspondingly,
The 3rd returns to module, if judge and do not have specifically for judge module, and the shared space of data block that priority reclamation access times are low and the time of falling into disuse is long, reallocation space, in the space of distributing, and returns to this data-block cache to this data block to terminal.
The equipment of the Cache scheduling that wherein, this enforcement provides can be FMS.
In embodiments of the present invention, according to the ID that carrys out the data block of carrying in the request of self terminal, search local Cache node, if find out data block, directly return to this data block, if do not had, according to this ID, from network, search data block, and return to this data block.Owing to dispatching the data in Cache node take data block as unit, thereby improved the efficiency of accessing the data in Cache node; Because the Cache node in network is all shared data, thereby whether the data of working as user's access or not in local Cache node, can from network C ache node, obtain data, thereby further improve the efficiency of visit data.
All or part of content in the technical scheme that above embodiment provides can realize by software programming, and its software program is stored in the storage medium can read, storage medium for example: hard disk, CD or floppy disk in computer.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (11)

1. a method for Cache scheduling, is characterized in that, described method comprises:
The request that file management system FMS receives self terminal and obtains data block, carries the identification code ID of data block in described request;
Described FMS searches local Cache node according to described ID;
If find out the data block that described ID is corresponding, described FMS returns to described data block to terminal;
If do not find out described data block, the Cache node that described FMS searches data block described in buffer memory according to described ID from network if find out Cache node, obtains described data block to terminal from described Cache node; If do not find out Cache node, find out the physical equipment of the described data block of storage; Described local Cache node receives the described data block that Cache node corresponding to described physical equipment sends, data block described in 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, the described Cache node of searching data block described in buffer memory according to described ID from network if find out Cache node, obtains described data block to terminal from described Cache node, specifically comprises:
According to the Cache node of data block described in buffer memory in described ID Network Search, if find out multiple Cache nodes, 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 that Cache node corresponding to described physical equipment sends, and data block described in buffer memory, specifically comprises:
Described local Cache node receives the described data block that Cache node corresponding to described physical equipment sends, and judges self whether to also have data block described in spatial cache;
If no, reclaim access times low and there is no a shared space of operated data block, reallocation space, by described data-block cache in the space of described distribution;
If had, allocation space, by described data-block cache in the space of described distribution.
4. the method as described in claim as arbitrary in claim 1-3, is characterized in that, described method also comprises:
Accessed Cache node, records the accessed number of times of described data block.
5. method as claimed in claim 3, is characterized in that, described method also comprises:
When the data block in the arbitrary Cache node in network is just by when operation, described Cache node is that the time is fallen into disuse in described data block setting, described in the time of falling into disuse for recording described data block, there is no the operated time;
Correspondingly, described recovery access times are low and there is no the shared space of operated data block, specifically comprise:
The shared space of data block that priority reclamation access times are low and the time of falling into disuse is grown.
6. an equipment for Cache scheduling, is characterized in that, described equipment comprises:
Receiver module, the request of obtaining data block for receiving self terminal, carries the identification code ID of data block in described request;
First searches module, for search local Cache node according to described ID;
First returns to module, if for finding out the data block that described ID is corresponding, return to described data block to terminal;
Second searches module, if for not finding out described data block, the Cache node of searching data block described in buffer memory according to described ID from network if find out Cache node, obtains described data block to terminal from described Cache node; If do not find out Cache node, find out the physical equipment of the described data block of storage; When after the described data block of described local Cache nodal cache corresponding Cache node from described physical equipment, from described local Cache node, obtain described data block and return to terminal.
7. equipment as claimed in claim 6, it is characterized in that, described second searches module, if specifically for not finding out described data block, according to the Cache node of data block described in buffer memory in described ID Network Search, if find out multiple Cache nodes, 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 Cache node, find out the physical equipment of the described data block of storage; When after the described data block of described local Cache nodal cache corresponding Cache node from described physical equipment, from described local Cache node, obtain described data block and return to terminal.
8. the system of-kind of Cache scheduling, is characterized in that, described system comprises:
The equipment of Cache scheduling, this equipment comprises: receiver module, the request of obtaining data block for receiving self terminal, carries the identification code ID of data block in described request; First searches module, according to described ID, searches local Cache node; First returns to module, if find out the data block that described ID is corresponding, returns to described data block to terminal; Second searches module, if do not find out described data block, according to described ID, from network, search the Cache node of data block described in buffer memory, if find out Cache node, from described Cache node, obtain described data block to terminal, if do not find out Cache node, find out the physical equipment of the described data block of storage, when after the described data block of described local Cache nodal cache corresponding Cache node from described physical equipment, from described local Cache node, obtain described data block and return to terminal;
Accessed Cache node, while being cached with described data block for finding out described local Cache node when the equipment of described Cache scheduling, returns to described data block to terminal; When the equipment of described Cache scheduling finds out in network described in buffer memory the Cache node of data block, return to described data block to terminal; When described local Cache node receives the described data block of the Cache node corresponding from described physical equipment, data block described in buffer memory, and return to described data block to terminal.
9. system as claimed in claim 8, is characterized in that, described accessed Cache node specifically comprises:
Second returns to module, while being cached with described data block for finding out described local Cache node when the equipment of described Cache scheduling, returns to described data block to terminal; When the equipment of described Cache scheduling finds out in network described in buffer memory the Cache node of data block, return to described data block to terminal;
Judge module, for receive the described data block that Cache node corresponding to described physical equipment sends when described local Cache node, judges self whether to also have data block described in spatial cache;
The 3rd returns to module, if judge and do not have for described judge module, recovery access times are low and there is no the shared space of operated data block, the space of reallocating, described data-block cache, in the space of described distribution, and is returned to described data block to terminal;
The 4th returns to module, if judged for described judge module, allocation space, in the space of described distribution, and returns to described data-block cache to described data block to terminal.
10. system as claimed in claim 8 or 9, is characterized in that, described accessed Cache node also comprises:
Logging modle, for recording the accessed number of times of described data block.
11. systems as claimed in claim 9, is characterized in that, described accessed Cache node also comprises:
Module is set, for when the data block in arbitrary Cache node of network is just by when operation, for the time is fallen into disuse in described data block setting, described in the time of falling into disuse for recording described data block, there is no the operated time;
Correspondingly,
The described the 3rd returns to module, if judge and do not have specifically for described judge module, priority reclamation access times are low and fall into disuse the long shared space of data block of time, the space of reallocating, described data-block cache, in the space of described distribution, and is returned to described data block to 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 CN101707684A (en) 2010-05-12
CN101707684B true 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)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125559B (en) 2013-04-28 2018-01-09 华为终端(东莞)有限公司 The method, apparatus and system of a kind of data transfer
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
CN104243598B (en) * 2014-09-25 2017-07-25 海信集团有限公司 A kind of information recommendation method and device
CN105630889B (en) * 2015-12-18 2019-12-10 北京奇虎科技有限公司 Universal caching 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

Also Published As

Publication number Publication date
CN101707684A (en) 2010-05-12

Similar Documents

Publication Publication Date Title
CN101707684B (en) Method, device and system for dispatching Cache
CN102377682B (en) Queue management method and device based on variable-length packets stored in fixed-size location
CN101170555A (en) Address resolution protocol (ARP) cache management method and related communication device
CN102025793A (en) Domain name resolution method and system and DNS in IP network
CN103096126B (en) Towards the cooperative caching method and system of video-on-demand service in cooperative caching cluster
CN102638584A (en) Data distributing and caching method and data distributing and caching system
CN102088389A (en) Distributed content access scheduling device and content reading method
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
CN115174490B (en) Data transmission method and network application terminal
EP2237528A1 (en) Method for listing content in a network
CN102970391A (en) Domain name query processing method, server and system
KR101410810B1 (en) Data storage communications apparatus, data transmission and management method using the apparatus
CN104253713A (en) Method for storing and reading data packets under monitoring environment, and corresponding device
CN101873463A (en) Video playback method, monitoring client and digital hard disk video recorder
CN101494833B (en) Method, device and system for sending network message
CN105450758A (en) Multimedia file play method and terminal
CN115328818A (en) Data stream storage display rapid addressing method
US20140136647A1 (en) Router and operating method thereof
CN107408071A (en) A kind of memory pool access method, device and system
CN104159058A (en) Efficient method capable of realizing simultaneous video recording of multi-way media streams
CN112395453B (en) Self-adaptive distributed remote sensing image caching and searching method
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