Summary of the invention
The purpose of this invention is to provide a kind of new network configuration that is used for Streaming Media and the storage means of data, to alleviate the burden of network.
According to an aspect of the present invention, provide a kind of network configuration that is used for Streaming Media, comprising:
SLB (local load balancing device) layer, comprise at least one SLB, SLB preserves the content status information and the load information of the content of being preserved in the described network configuration, and SLB receives user capture, according to content status information and the visit of load information dispatched users, also control download to content;
The CACHE layer comprises several CACHE, and one of them CACHE is defined as main CACHE, and described several CACHE link to each other with among described at least one SLB each; Described main CACHE and other CAHCE set up communication link, and receive the content information that other CACHE are handling at present, generate the state information of all the elements; Main CACHE also sets up communication link with SLB and reports the load information of content status information and each CACHE to SLB, the load information that SLB uses content status information that main CACHE reports and load information to upgrade original content status information, and according to this as according to coming the dispatched users visit; Described main CACHE controls the download of other CACHE to content;
Memory layer comprises at least one memory, and described memory all links to each other with described several CACHE, and all the elements in the described network configuration are all unified to be kept in the described memory;
Wherein, described main CACHE to other CACHE issue bulletins, identifies itself as main CACHE by broadcast mechanism, all the elements and the record preserved on the described main CACHE scanning current storage; If main CACHE withdraws from described network configuration, then a meeting among other CACHE becomes new main CACHE by broadcast mechanism issue bulletin.
In above-mentioned network configuration, all set up communication link between described several CACHE and the SLB, keep communication.
In above-mentioned network configuration, when described SLB received user capture, SLB can have access to suitable CACHE according to content status information and load information dispatched users; When downloading content if desired, SLB can notify main CACHE to carry out content earlier and download, then by main CACHE again by and other CACHE between communication, select appropriate C AHCE to download; Receive the download command of main CACHE as certain CACHE after, the download content that will begin in a minute, and the status report that this task is carried out is to main CACHE makes the CACHE of winner can grasp at present the content of other CACHE and downloads situation.
According to a second aspect of the invention, provide a kind of storage means of stream medium data, be used for the network configuration that all CACHE use common memory, described network configuration also comprises SLB, and described method comprises the steps:
A1) when a CACHE begins to start, at first use broadcast communication mechanism to survey in the current network structure whether had main CACHE, if exist, then carry out step a2), if there is no, then carry out step a5);
A2) described CACHE immediately with network configuration in other CACHE of having existed set up and communicate by letter, and whether the work that continues to use broadcast mechanism to survey main CACHE normal, and the content download management of preparing to receive main CACHE is instructed;
A3) described CACHE sets up with SLB and communicates by letter;
A4) after the foundation of communicating by letter of described CACHE and SLB is finished, report health status and load immediately, and prepare to provide service;
A5) if the main CACHE of the detection among the step a1 does not exist, then described CACHE switches to the work of main CACHE immediately, uses broadcast mechanism other CACHE issue bulletins in network configuration simultaneously, identifies itself as main CACHE;
A6) all the elements of having preserved on the described CACHE scanning current storage, and be recorded in the internal memory;
A7) other CAHCE in described CACHE and the network configuration set up communication link, and receive the content information that other CACHE are handling at present; By the report of these CACHE, generate the content status information of all the elements in the current network structure;
A8) described CACHE connects as main CACHE and SLB, and by with the load information that reports described content status information and each CACHE being connected of SLB, SLB uses the content status information and the load information that report to upgrade original content status information and load information, and comes the dispatched users visit as foundation according to this;
A9) when user capture arrived SLB, SLB can have access to appropriate C ACHE according to content status information and load information dispatched users, and when downloading content if desired, SLB control is for the download of content;
A10) CACHE in the network configuration carries out the download for content;
Wherein, if main CACHE withdraws from service, a meeting meeting among other CACHE is taken over main CACHE by broadcast mechanism issue bulletin and is proceeded work, repeating step a5-a10.
Wherein, set up communication link between described CACHE and the SLB, keep communication; SLB control further comprises for the download of content among the step a9 wherein: SLB can have access to appropriate C ACHE according to content status information and load information dispatched users, when downloading content if desired, SLB can notify main CACHE to carry out content earlier and download, then by main CACHE again by and other CACHE between communication select appropriate C AHCE to go to download; The download that CACHE among the described step a10 carries out for content further comprises: after one in the network non-main CACHE receives the download command of main CACHE, the download content will begin in a minute, and the status report that this task is carried out is to main CACHE, makes the CACHE of winner can grasp at present the content of other CACHE and downloads situation.
According to a third aspect of the invention we, provide a kind of network configuration that is used for Streaming Media, comprising:
The SLB layer comprises at least one SLB, and described SLB preserves the content status information and the load information of the content of being preserved in the described network configuration, SLB receives user capture, according to content status information and the visit of load information dispatched users, described SLB also comprises a CCM, and control is to the download of content;
The CACHE layer comprises several CACHE, links to each other with among described at least one SLB each; Set up communication link between described several CACHE, receive the content information that other CACHE are handling at present, the CCM among the described SLB preserves the content status information of all the elements of being preserved in the described network configuration and controls the download of CACHE to content;
Also comprise memory in the described network configuration, the quantity of quantity and described CACHE is suitable, and links to each other with described CACHE correspondingly, the special content of preserving a CACHE of each memory.
In above-mentioned network configuration, described memory combination is in CACHE, and each CACHE comprises the memory of a special use.
In above-mentioned network configuration, set up communication link between described several CACHE and the SLB, keep communication.
According to a forth aspect of the invention, a kind of storage means of stream medium data is provided, be used for comprising the network configuration of SLB, several CACHE and memory, described SLB comprises the download of CCM control CACHE for content, the quantity of described memory is suitable with the quantity of described CACHE, and link to each other with described CACHE correspondingly, the special content of preserving a CACHE of each memory, described method comprises the steps:
B1) begin start to add this network configuration when serving when a CACHE equipment, at first with network configuration in described SLB set up and communicate by letter;
B2) if SLB is inactive this moment or the work not-ready state, CACHE can continue to start, and the state of noting current and SLB success communication not, then on the backstage every go at regular intervals to attempt and SLB foundation is communicated by letter;
B3) after CACHE starts, all the elements in the memory of current this CACHE of correspondence of meeting scanning, and record the size and the actual memory space and the storage directory of taking of each content, and can calculate the affiliated business domains of this content according to the catalogue of content stores and original configuration information;
B4) after CACHE has scanned all the elements information in the described memory, can check the current state of SLB,, just report all the elements information on the memory of described this CACHE of correspondence to SLB immediately if find that SLB is in the communication normal condition;
B5) SLB obtain with each CACHE on the content stores situation after, just the content on all CACHE in the whole network configuration is put in order, and be followed successively by according to the user is dispatched, when user access request reaches SLB, SLB obtains preserving the CAHCE of this content by to CCM module inquiry, and judges whether the operating state of current C ACHE and load capacity be enough, if these conditions all satisfy, just the user is dispatched to the CACHE that has preserved this content and goes up the service of reception;
B6) when CACHE need download a content, at first CACHE can send a content to SLB and download the application request, and just begins to download after waiting for the SLB response;
B7) SLB receives after the download request of CACHE equipment, at first checks on the memory of other CACHE of current active whether had this content, if this content exists, then refuses the content download request of this CACHE.If all CACHE do not preserve this content file, and the storage space of the CACHE that application is downloaded also has residue, satisfies professional qualification, and SLB will agree the content download request of CACHE so;
B8) after the replying of SLB returned content download request, CACHE will handle accordingly, if having returned, SLB rejects response, CACHE just no longer downloads, if answered permission, CACHE will start the task that this content is downloaded so, after task successfully starts, CACHE will report that present this content of SLB is in the downloading process, this moment, this content-data was also incomplete, can't be for the user provide service, and SLB knows after this message, the user that just can not reallocate goes up to this CACHE;
B9) CACHE is when carrying out the content download, if failed download, CACHE makes corresponding processing and notifies SLB at once, after SLB receives the message of failed download, just this content is deleted from the content information tabulation of CCM;
B10) structure if CACHE exits network in the process of downloading certain content, SLB will can not continue to receive the communications status of CACHE so, if SLB finds described CACHE state not in working order, will the content information on this CACHE be labeled as disarmed state at once;
B11) when user access request arrives this network configuration, at first have access on the SLB, and SLB can at first dispatch according to the distribution situation of current content, if the content that this user of while asks to visit does not exist in network configuration, whether the CCM module decision of SLB needs this content is downloaded, download if desired, the CCM module can be chosen a CACHE who is fit to download this content according to resource and the load of current content on the distribution situation on a plurality of CACHE and each CACHE, and sends content download request.
Wherein, described CACHE sets up communication link with SLB and keeps communicating by letter; CACHE among the described step b4 reports that to SLB all the elements information on the memory of described this CACHE of correspondence comprises the title of reporting each content file, affiliated business domains, the file actual size, take storage size, and it is converted into and descriptor that local disk is irrelevant, sending to SLB and SLB keeps synchronously.
Adopt technical scheme of the present invention, a kind of new network configuration that is used for Streaming Media and the storage means of data are provided, alleviating the burden of network, thereby can realize cluster cache service system.
Embodiment
Further specify technical scheme of the present invention below in conjunction with specific embodiment.
At first, of the present inventionly provide a kind of technology that prevents repeated downloads between the different CACHE, preserves identical content, thus the resource of saving network.
With reference to figure 1, the invention provides a kind of network configuration 100 that is used for Streaming Media, comprising:
The SLB layer, comprise at least one SLB 102, SLB 102 preserves the content status information and the load information of the content of being preserved in the network configuration 100, SLB 102 receives user capture, according to content status information and the visit of load information dispatched users, SLB 102 also comprises a CCM 103, and control is to the download of content;
The CACHE layer comprises several CACHE 104a, 104b, 104c, links to each other with among at least one SLB 102 each; Set up communication link between several CACHE, receive the content information that other CACHE are handling at present, the CCM 103 among the SLB 102 preserves the content status information of all the elements of being preserved in the described network configuration and controls the download of CACHE to content;
100 also comprise memory 106 in the network configuration, and the quantity of quantity and CACHE 104 is suitable, and link to each other with CACHE 104 correspondingly, the special content of preserving a CACHE of each memory.
Fig. 2 shows a variation example of above-mentioned network configuration, and memory 106 wherein is combined among the CACHE 104, and each CACHE 104 comprises the memory 106 of a special use.With regard to operation principle, embodiment illustrated in figures 1 and 2 is the same.
In Fig. 1 or network configuration shown in Figure 2, set up communication link between several CACHE 104 and the SLB 102, keep communication.
In above-mentioned network configuration, can realize following date storage method:
A kind of storage means of stream medium data, be used for comprising the network configuration of SLB, several CACHE and memory, SLB comprises the download of CCM control CACHE for content, the quantity of memory is suitable with the quantity of CACHE, and link to each other with CACHE correspondingly, the special content of preserving a CACHE of each memory, this method comprises the steps:
B1) begin start to add this network configuration when serving when a CACHE equipment, at first with network configuration in described SLB set up and communicate by letter;
B2) if SLB is inactive this moment or the work not-ready state, CACHE can continue to start, and the state of noting current and SLB success communication not, then on the backstage every go at regular intervals to attempt and SLB foundation is communicated by letter;
B3) after CACHE starts, all the elements in the memory of current this CACHE of correspondence of meeting scanning, and record the size and the actual memory space and the storage directory of taking of each content, and can calculate the affiliated business domains of this content according to the catalogue of content stores and original configuration information;
B4) after CACHE has scanned all the elements information in the described memory, can check the current state of SLB,, just report all the elements information on the memory of described this CACHE of correspondence to SLB immediately if find that SLB is in the communication normal condition;
B5) SLB obtain with each CACHE on the content stores situation after, just the content on all CACHE in the whole network configuration is put in order, and be followed successively by according to the user is dispatched, when user access request reaches SLB, SLB obtains preserving the CAHCE of this content by to CCM module inquiry, and judges whether the operating state of current C ACHE and load capacity be enough, if these conditions all satisfy, just the user is dispatched to the CACHE that has preserved this content and goes up the service of reception;
B6) when CACHE need download a content, at first CACHE can send a content to SLB and download the application request, and just begins to download after waiting for the SLB response;
B7) SLB receives after the download request of CACHE equipment, at first checks on the memory of other CACHE of current active whether had this content, if this content exists, then refuses the content download request of this CACHE.If all CACHE do not preserve this content file, and the storage space of the CACHE that application is downloaded also has residue, satisfies professional qualification, and SLB will agree the content download request of CACHE so;
B8) after the replying of SLB returned content download request, CACHE will handle accordingly, if having returned, SLB rejects response, CACHE just no longer downloads, if answered permission, CACHE will start the task that this content is downloaded so, after task successfully starts, CACHE will report that present this content of SLB is in the downloading process, this moment, this content-data was also incomplete, can't be for the user provide service, and SLB knows after this message, the user that just can not reallocate goes up to this CACHE;
B9) CACHE is when carrying out the content download, if failed download, CACHE makes corresponding processing and notifies SLB at once, after SLB receives the message of failed download, just this content is deleted from the content information tabulation of CCM;
B10) structure if CACHE exits network in the process of downloading certain content, SLB will can not continue to receive the communications status of CACHE so, if SLB finds described CACHE state not in working order, will the content information on this CACHE be labeled as disarmed state at once;
B11) when user access request arrives this network configuration, at first have access on the SLB, and SLB can at first dispatch according to the distribution situation of current content, if the content that this user of while asks to visit does not exist in network configuration, whether the CCM module decision of SLB needs this content is downloaded, download if desired, the CCM module can be chosen a CACHE who is fit to download this content according to resource and the load of current content on the distribution situation on a plurality of CACHE and each CACHE, and sends content download request.
In above-mentioned method, CACHE and SLB set up communication link; Wherein,
CACHE among the step b4 reports that to SLB all the elements information on the memory of described this CACHE of correspondence comprises the title of reporting each content file, affiliated business domains, the file actual size, take storage size, and it is converted into and descriptor that local disk is irrelevant, sending to SLB and SLB keeps synchronously.
Fig. 3 shows the flow chart according to a specific embodiment of said method, and this embodiment is used for following network configuration, and this network configuration comprises a SLB and a plurality of CACHE, and the memory space that each CACHE has separately carries out the buffer memory service.For not repeated downloads and the preservation of content that realizes intra-node, on SLB, increased content control module (CCM, Content Control Model), be responsible for the unified control of content on the inner a plurality of CACHE of network configuration by CCM, thereby realize the not function of repeated downloads and preservation of intra-node content.
In order to realize the not function of repeated downloads and preservation of content, realize content unified management and the distribution of CCM for a plurality of CACHE, at first need to realize the content control communication between CACHE and the SLB.IMP (intelligent managementprotocol) agreement is adopted in content control communication between CCM and the CACHE.Embodiment shown in Figure 3 has comprised following step:
301. when CACHE begins start to add this network configuration when serving, at first with this network configuration in SLB communicate and SLB connects.The characteristics of this process are, CACHE communicates with SLB when starting immediately, guarantee that SLB in time knows the state variation of CAHCE.
If 302. SLB is inactive this moment or the work not-ready state, CACHE can continue to start, and the state of noting current and SLB success communication not, then on the backstage every go at regular intervals to attempt and SLB foundation is communicated by letter.The characteristics of this process are that CACHE can handle the abnormal conditions of various SLB, prevent that SLB from influencing the work of CACHE under abnormal working position.
303.CACHE behind the device start, can scan in the current storage space the content of preserving to some extent, and with the size of each content of detail record, the actual memory space that takies, storage directory, and can calculate the affiliated business domains of this content according to the catalogue of content stores and original configuration information.The characteristics of this process are that CACHE will scan when starting immediately, guarantees that immediately the actual content and the control information of storage is consistent, and by this mechanism, has well avoided the content of actual storage and the difference of control information to bring serv-fail.Another characteristics are exactly, and are greatly improved for the real-time of content control information, and content information does not use database and file to preserve, but carries out actual scanning when starting, and has avoided the asynchronous of actual content and control information.
304.CACHE after having scanned all content informations, can check the current state of SLB, if find that SLB is in the communication normal condition, just report the information of all the elements on this CACHE to SLB immediately, comprise the title of each content file, affiliated business domains, the file actual size takies storage size, and he is converted into and the irrelevant descriptor of local disk, sending to SLB and SLB keeps synchronously.The characteristics of this process are that CACHE and SLB are after communication recovery is normal, will upgrade the content information on CACHE and the SLB at once synchronously, guarantee that the content information on the SLB is identical with the content of CACHE actual storage, and guarantee that content change can not influence the unified management of content in SLB and time that CAHCE can't communicate by letter.Can see in this process simultaneously, a plurality of CACHE all can with oneself time distribution of content situation and take the disk resource situation and all report to SLB, if SLB restarts or communication recovery after, enough can in time obtain the actual content information on the current C ACHE, and then finish the unified control of the content in the whole node.
305.SLB obtain after the content stores situation on each CACHE, just the content on all CACHE of whole node inside is put in order, and be followed successively by according to the user is dispatched, when user access request reaches SLB, SLB obtains the CAHCE that this content exists by to CCM module inquiry, and judges whether the operating state of current C ACHE and load capacity be enough, if these conditions all satisfy, just the user is dispatched to the CACHE that has preserved this content and goes up the service of reception.
306. when CACHE equipment because of certain situation (reason of production is not within the discussion scope of this paper) some incidents has taken place, when needing to download certain content, at first CACHE can send a content to SLB and download the application request, and just begins to download after waiting for the SLB response.To be CACHE equipment be under the control of SLB for the download strictness of content the characteristics of this process, even produced the reason that needs download on the CACHE, but do not pass through the permission of SLB, CACHE still can not download, and so just can guarantee the centralized control of SLB for intra-node all the elements.
307.SLB receive after the download request of CACHE equipment at first check on other CACHE of current active whether had this content,, then refuse the content download request of this CACHE if this content exists.If all CACHE do not have this content file of buffer memory, and the CACHE that application is downloaded deposits space residue in addition, satisfies professional qualification, and SLB will agree the content download request of CACHE so.The characteristics of this process be SLB the CCM module can receive the content checked when CACHE carries out content download request on other all CACHE whether with this download request in content repeat, guarantee inside in same network configuration with this, a content file has only a copy.
308. after the replying of SLB returned content download request, CACHE will handle accordingly, rejects response if SLB has returned, CACHE just no longer downloads, if answered permission, CACHE will start the task to this content download so.After task successfully started, CACHE equipment will be reported SLB, and this content is in the downloading process at present, this moment, this content-data was also incomplete, can't be for the user provide service, and SLB knows after this message, the user that just can not reallocate goes up to this CACHE.The characteristics of this process are, when CACHE carries out the content download process, also the status report that content can downloaded is given SLB, and SLB can handle accordingly according to these states of downloading, and assurance is being carried out the intermediateness of content download and can correctly handled.
309.CACHE when carrying out the content download, because the situation of failed download may appear in network or other reasons, after this situation having occurred, CACHE also can make corresponding processing, and notify SLB at once, after SLB receives the message of failed download, just this content is deleted from the content information tabulation of CCM.The characteristics of this process are to carry out in the content process of downloading occurring also reporting SLB simultaneously, and guaranteeing that the content information on SLB and the CACHE is synchronous when unusual as CACHE.
310. if CACHE is in the process of downloading certain content, because certain reason withdraws from service, SLB will can be at the communications status that continues to receive CACHE so, if SLB finds this CACHE state not in working order, will the content information on this CACHE be labeled as invalid dress state at once.The characteristics of this process are the abnormal work states that SLB can handle CACHE equipment, guarantee reliability of service under the various situations.
311. when certain user access request arrives this node, should at first have access on the SLB, and SLB can at first dispatch according to the distribution situation of current content, if the content that this user of while asks to visit does not exist at this node, the CCM module of SLB can determine whether that needs download this content according to some strategies, download if desired, the CCM module can be chosen a CACHE who is fit to download this content according to resource and the load of current content on the distribution situation on a plurality of CACHE and each CACHE, and sends content download request.The characteristics of this process are whether each CACHE needs to download, all there is the CCM of SLB to decide, so just avoided a plurality of CACHE to download the situation of a content, and can also be according to the resource operating position of a plurality of CACHE, loading condition is united and is judged.
Need explanation, each square frame in the flow chart shown in Figure 3 be not with above-mentioned step one to one, might several box indicatings be same step, also might several steps concentrate on expression in the same square frame, but, for a person skilled in the art, above-mentioned expression way can't influence the understanding for process of the present invention.
Continuous development along with network technology, comprise a plurality of serviced components, obtained using more widely such as the comprehensive group system that comprises CACHE, OCC and above-mentioned network configuration, in comprehensive group system, can use the pattern of sharing storage to carry out work, under this pattern, the same physical store of the common use of a plurality of serviced components, a CACHE assembly downloaded contents, other CACHE also can visit, and this has improved the disk utilance greatly.
When under the pattern of sharing storage, working simultaneously, for the transformation and the ability smooth upgrade of network have been created condition, using under the pattern of sharing storage, when if the stream service ability is not enough, can be directly by increasing server, and the mode that does not increase storage improves service ability, and does not need original storage division is redeployed, and does not also influence existing service content.
Traditional CACHE is that every CACHE is furnished with the content that special storage is preserved needs CAHCE, content between each CACHE is independent mutually, there are not other relations, and the storage that each CACHE has is planned in advance, later adjustment can be carried out at every CACHE, fast development along with streaming media service, produce a plurality of servers gradually and used same physical store, a plurality of servers are formed the form of a similar cluster service system, current in telecommunications, in the internet industry, common based on the short cluster service systematic comparison that connects, such as a web group of planes, a radius group of planes, and the service of a plurality of streams in Streaming Media field Network of Workstation also do not have precedent is simultaneously when these servers again can be as CACHE, the function of whole group system is provided by the service that only provides, and all is to be packaged into whole group system to carry out for the buffer memory of content and management.
Thus, the invention provides a kind of network configuration 400 that is used for Streaming Media, comprising:
The SLB layer, comprise at least one SLB 402, SLB 402 preserves the content status information and the load information of the content of being preserved in the network configuration 400, and SLB 402 receives user capture, according to content status information and the visit of load information dispatched users, also control download to content;
The CACHE layer comprises several CACHE 404a, 404b, 404c, and one of them CACHE is defined as main CACHE, and several CACHE 404 link to each other with among at least one SLB 402 each; Main CACHE and other CAHCE set up communication link, and receive the content information that other CACHE are handling at present, generate the state information of all the elements; Main CACHE also sets up communication link with SLB 402 and reports the load information of content status information and each CACHE 404 to SLB 402, the load information that content status information that the main CACHE of SLB 402 uses reports and load information upgrade original content status information, and come the dispatched users visit as foundation according to this; Main CACHE controls the download of other CACHE to content;
Memory layer comprises at least one memory 406, and memory 406 all links to each other with several CACHE 404, and all the elements in the network configuration 400 are all unified to be kept in the memory 406;
Wherein, main CACHE to other CACHE issue bulletins, identifies itself as main CACHE by broadcast mechanism, all the elements and the record preserved on the main CACHE scanning current storage 406; The structure 400 if main CACHE exits network, then a meeting among other CACHE becomes new main CACHE by broadcast mechanism issue bulletin.
In above-mentioned structure 400, set up communication link between several CACHE 404 and the SLB 402, keep communication.
In above-mentioned structure 400, when SLB 402 received user capture, SLB 402 can have access to suitable CACHE according to content status information and load information dispatched users; When downloading content if desired, SLB 402 can notify main CACHE to carry out content earlier and download, then by main CACHE again by and other CACHE between communication, select appropriate C AHCE to download; Receive the download command of main CACHE as certain CACHE after, the download content that will begin in a minute, and the status report that this task is carried out is to main CACHE makes the CACHE of winner can grasp at present the content of other CACHE and downloads situation.
According to above-mentioned network configuration, whole group system can be divided into three layers, ground floor is the SLB layer, and the second layer is a CACHE service layer, and the 3rd layer is memory layer, wherein each CACHE in the service layer directly is connected with SLB, and with the storage directly be connected, logic area in the storage and memory contents all are visible for each CACHE, can adopt the readable mode of writing to the storage read-write data, also be connected to each other between a plurality of CACHE simultaneously, set up communication link.
She Ji benefit is when the server-capabilities resource is not enough like this, can expand server dynamically, and the new server that expands can use all the elements in the original storage immediately, rather than say that need download content again just can provide service, and need in original storage, not repartition a part of logic area yet and use for specially this server, and not destroy original storage and divide.If will expand storage, also can allow Servers-all can both use the part of this expansion, in dilatation with very convenient when adjusting.Adding the effect of SLB, make extraneous visit can on average share on all CACHE servers, realize load balancing, whole tissue has formed a complete cluster service system, more valuable is that this group system is to be based upon on the basis of application layer, can handle the information on services of multiple application layer.
The present invention also provides a kind of storage means of stream medium data, it is characterized in that, is used for the network configuration that all CACHE use common memory, and network configuration also comprises SLB, and this method comprises the steps:
A1) when a CACHE begins to start, at first use broadcast communication mechanism to survey in the current network structure whether had main CACHE, if exist, then carry out step a2), if there is no, then carry out step a5);
A2) described CACHE immediately with network configuration in other CACHE of having existed set up and communicate by letter, and whether the work that continues to use broadcast mechanism to survey main CACHE normal, and the content download management of preparing to receive main CACHE is instructed;
A3) described CACHE sets up with SLB and communicates by letter;
A4) after the foundation of communicating by letter of described CACHE and SLB is finished, report health status and load immediately, and prepare to provide service;
A5) if the main CACHE of the detection among the step a1 does not exist, then described CACHE switches to the work of main CACHE immediately, uses broadcast mechanism other CACHE issue bulletins in network configuration simultaneously, identifies itself as main CACHE;
A6) all the elements of having preserved on the described CACHE scanning current storage, and be recorded in the internal memory;
A7) other CAHCE in described CACHE and the network configuration set up communication link, and receive the content information that other CACHE are handling at present; By the report of these CACHE, generate the content status information of all the elements in the current network structure;
A8) described CACHE connects as main CACHE and SLB, and by with the load information that reports described content status information and each CACHE being connected of SLB, SLB uses the content status information and the load information that report to upgrade original content status information and load information, and comes the dispatched users visit as foundation according to this;
A9) when user capture arrived SLB, SLB can have access to appropriate C ACHE according to content status information and load information dispatched users, and when downloading content if desired, SLB control is for the download of content;
A10) CACHE in the network configuration carries out the download for content;
Wherein, if main CACHE withdraws from service, a meeting meeting among other CACHE is taken over main CACHE by broadcast mechanism issue bulletin and is proceeded work, repeating step a5-a10.
In above-mentioned method, set up communication link between CACHE and the SLB, keep communication;
SLB control further comprises for the download of content among the step a9 wherein: SLB can have access to appropriate C ACHE according to content status information and load information dispatched users, when downloading content if desired, SLB can notify main CACHE to carry out content earlier and download, then by main CACHE again by and other CACHE between communication select appropriate C AHCE to go to download;
The download that CACHE among the step a10 carries out for content further comprises: after one in the network non-main CACHE receives the download command of main CACHE, the download content will begin in a minute, and the status report that this task is carried out is to main CACHE, makes the CACHE of winner can grasp at present the content of other CACHE and downloads situation.
Below in conjunction with the flow process of Fig. 5 introduction according to a data save method of a specific embodiment of the present invention, with reference to figure 5, this method comprises:
501. when CACHE begins to start, at first use broadcast communication mechanism to go to survey in the current cluster service system whether have main CACHE,, then carry out step 2 if exist.
502. this CACHE sets up with other CACHE equipment immediately and communicate by letter, and whether the work that continues to use broadcast mechanism to survey main CACHE is normal, and the content download management of preparing to receive main CACHE is instructed.
503.CACHE set up with SLB and to communicate by letter and the SLB module connects.
504. after the foundation of communicating by letter of CACHE and SLB is finished, report health status and load immediately, and prepare to provide service.
505. if the main CACHE server of the detection in the step 501 does not exist, then begin to switch to the work of main CACHE immediately, use broadcast mechanism outwards to issue bulletin simultaneously, identify itself as main CACHE state.
506. scan all the elements of having preserved in the current storage immediately, and be recorded in the internal memory, at this moment may scan some and be in the download state, perhaps there is not to download the content file of finishing.
507. and other CAHCE set up communication link, and receive the content information that other CACHE are handling at present, download such as certain content, download information such as finish.By the report of these CACHE, arrangement is merged into content status information all in the current cluster system once more.
508. main CACHE connects with SLB then, and by reporting content information with being connected of SLB, SLB runs into main SLB and reports after the content information, upgrade original content-data information immediately, and come the dispatched users visit as foundation according to this, the while is the service load information on current this CACHE of SLB report also.
509. when user capture arrived SLB, SLB can arrive suitable servers according to the distribution situation of content and the load dispatch user capture of each CACHE.When downloading content if desired, SLB can notify main CACHE to carry out content earlier and download, then by main CACHE again by and other CACHE between communication, select appropriate C AHCE to go actual download.
510. receive the download command of main CACHE as certain CACHE after, the download content that will begin in a minute, and the status report that this task is carried out is to main CACHE makes the CACHE of winner can grasp at present the content of other CACHE and downloads situation.
511. at the run duration of whole system, if main CACHE withdraws from service, other CACHE can take over main CACHE and proceed work, repeating step 505-511.If other non-CACHE have withdrawed from service, system can not be affected.
Need explanation equally, each square frame in the flow chart shown in Figure 5 be not with above-mentioned step one to one, might several box indicatings be same step, also might several steps concentrate on expression in the same square frame, but, for a person skilled in the art, above-mentioned expression way can't influence the understanding for process of the present invention.
Adopted technique scheme of the present invention, for the transformation and the ability smooth upgrade of network have been created condition, using under the pattern of sharing storage, when if the stream service ability is not enough, can be directly by increasing server, and the mode that does not increase storage improves service ability, and does not need original storage division is redeployed, and does not also influence existing service content.
Comprehensive, the invention provides a kind of new network configuration that is used for Streaming Media and the storage means of data,, set up complete cluster cache service system, can be used for realizing level and smooth service performance, the system of storage capacity of promoting of those needs.
Though top embodiment only is described as an example with stream media service system, it is the system of content that the adaptable scope of this invention is not limited only to the streaming media service.
The foregoing description provides to being familiar with the person in the art and realizes or use of the present invention; those skilled in the art can be under the situation that does not break away from invention thought of the present invention; the foregoing description is made various modifications or variation; thereby protection scope of the present invention do not limit by the foregoing description, and should be the maximum magnitude that meets the inventive features that claims mention.