Summary of the invention
The embodiment of the invention provides a kind of content method for implanting, content distribution method and content distributing network, with the purpose that realizes that same CDN system can be used by different user.
For this reason, the present invention provides following technical scheme:
A kind of content method for implanting comprises:
The content that reception server sends is injected request, and the request of injecting of said content comprises customer attribute information;
The content Dispatching Unit that selection and said customer attribute information are complementary;
The content that said server is sent is injected into the said content Dispatching Unit that is complementary.
A kind of content distribution method comprises:
Receive the content dispense request that client is sent, said content dispense request comprises: the information of customer attribute information and distributing contents;
In the content Dispatching Unit of preserving said distributing contents, search one and be complementary with said customer attribute information and the nearest content Dispatching Unit of the said client of distance;
The identity information of said content Dispatching Unit is sent to said client, communicates by letter, obtain said distributing contents from said content Dispatching Unit so that said client is set up with said content Dispatching Unit.
A kind of content injected system comprises:
Content is injected the request receiving element, is used for the content injection request that reception server sends, and the request of injecting of said content comprises customer attribute information;
First matching unit is used to select the content Dispatching Unit that is complementary with said customer attribute information;
Content is injected the unit, is used for the content that said server sends is injected into the content Dispatching Unit that said first matching unit is selected.
A kind of content delivering system comprises:
Content dispense request receiving element is used to receive the content dispense request that client is sent, and said content dispense request comprises: the information of customer attribute information and distributing contents;
First searches the unit, is used for from preserving in the content Dispatching Unit of said distributing contents, searches one and is complementary with said customer attribute information and apart from the nearest content Dispatching Unit of said client;
Transmitting element, be used for said first search the content Dispatching Unit that the unit finds identity information be sent to said client communicate by letter so that said client is set up with said content Dispatching Unit, obtain said distributing contents from said content Dispatching Unit.
The embodiment of the invention discloses following technique effect:
Content method for implanting of the present invention and system; When carrying out the content injection; Just will be injected in the content Dispatching Unit that the attribute that has with this user is complementary, for realizing that same CDN system is that different user provides content distribution service that technical foundation is provided to the content of different user.In addition, the content method for implanting of the embodiment of the invention and system can also according to content by visit capacity, adjust the content that content injects in real time and inject the unit, realize the reasonable distribution of content.
Based on the method and system that foregoing injects, the embodiment of the invention also provides a kind of method of content distribution and system.Like this; Same CDN system just can be according to the request of different user, for the user provides the content distribution service of satisfying its demand, has realized the purpose that same CDN system is used by different user; And need not to dispose a cover CDN system for every type of user, practiced thrift resource.
Embodiment
In order to make those skilled in the art person understand the present invention program better, the embodiment of the invention is done further to specify below in conjunction with accompanying drawing and execution mode.
As shown in Figure 1, be the flow chart of embodiment of the invention content method for implanting, comprising:
Step 101, the content that reception server sends is injected request, and the content request of injecting comprises customer attribute information.Wherein, the user is meant through server and uploads the user who injects content to the CDN system.Customer attribute information can comprise user attaching information (user attaching information can be the information of expression such as company or affiliated group user subordinate relation under the user) and User IP network segment address.Perhaps, said customer attribute information also can comprise user name and User IP network segment address.Perhaps, said customer attribute information comprises user attaching information, user name and User IP network segment address.Server can be a computer.
Step 102 is selected the content Dispatching Unit that is complementary with customer attribute information.
Step 103, the content that server is sent is injected into the content Dispatching Unit.Can adopt multicast mode (multicast is meant and realizes that between sender and each recipient point-to-point configuration connects) that content is sent to the content Dispatching Unit and accomplish the content injection, also can adopt mode of unicast (clean culture is meant that single source sends to a kind of network service of single purpose recipient) that content is sent to content Dispatching Unit completion content and inject.
The embodiment of the invention is in order to realize same CDN system by the different user application aims, carrying out content when injecting, and will be injected into to the content of different user in the content Dispatching Unit that the attribute that has with this user is complementary.Before carrying out the content injection, need to accomplish following two steps, to select the content Dispatching Unit that is complementary with customer attribute information:
(1) injects request if different user sends content to the CDN system, then through the customer attribute information that comprises in the request user identity is distinguished earlier.For example can come the judges identity through user name, this is the first step of matching content Dispatching Unit, when having only user name to conform to the user name of CDN system legal authorization, just further carries out other operation, selects the content Dispatching Unit that is used to inject content.
Need to prove here; In practical application; Can also discern user identity through the multiple modes such as combination of company, affiliated group under company, affiliated group or the combination of the two and user name and the user under the user, this embodiment of the invention is not done qualification.
(2) after identifying the identity of sending requesting users, further find out the content Dispatching Unit that is complementary with user identity again through the User IP network segment address in the customer attribute information.In this step, mainly be to realize through judging that whether IP network sector address that content Dispatching Unit network interface distributes is complementary with user's IP network sector address.
After accomplishing above-mentioned two operating procedures, the content of again user being sent is injected into the corresponding contents Dispatching Unit.This is that different user provides content distribution service that technical foundation is provided for same CDN system just.
Need to prove here; For at least two public network users; Because different public user's IP network sector address is inequality, so the embodiment of the invention can distinguish different public user's identity easily, and searches the content Dispatching Unit that is complementary with its I P network segment address for this user.The content that had both received public network user for same CDN system is injected request; The content that receives private user is again injected the situation of request; Because the IP network sector address of public network user and private user is also inequality; Therefore the embodiment of the invention can be distinguished user identity equally very easily, and then the content Dispatching Unit of selection and User IP network segment address coupling.But; For at least two private users; Because possibly there be the identical situation in IP address between the different private users, therefore in order to find the content Dispatching Unit that matees with user identity, private user also need satisfy its IP address and not belong to this requirement of phase same network segment.
Because the content in the content Dispatching Unit can increase or delete according to actual needs, for the contents lost phenomenon that prevents that content Dispatching Unit deletion content from causing, the content method for implanting of the embodiment of the invention can also comprise:
Step 104 is selected the memory cell that is complementary with customer attribute information;
Step 105, the content that server is sent is injected into memory cell.Likewise, both can adopt the multicast mode that content is sent to memory cell in this step and accomplish the content injection, and also can adopt mode of unicast that content is sent to memory cell and accomplish the content injection.
Like this,, the situation of contents lost can not occur in the content Dispatching Unit yet, when this content of needs, can in memory cell, obtain and be injected into the content Dispatching Unit even a certain content is deleted.
Need to prove here, after receiving content injection request, can be as shown in Figure 2, first execution in step 102 chosen content Dispatching Unit, execution in step 104 select storage units again; Also can put upside down the execution sequence of the two, or after receiving content injection request, while completing steps 102 and step 104, the embodiment of the invention is not done qualification to this.
Further, in the embodiment of the invention content method for implanting, accomplish above-mentioned after content Dispatching Unit and memory cell are injected the process of content, can also according to content by visit capacity, the content Dispatching Unit of adjustment content injection.As shown in Figure 3, can specifically comprise:
Step 106, obtain content each content Dispatching Unit by visit capacity.
Step 107, if by visit capacity less than default value, can judge that then this content is non-focus content, can this content be deleted in the content Dispatching Unit, discharge the occupied resource of content Dispatching Unit.
Step 108; If be not less than default value by visit capacity; Can judge that then this content is the focus content,, improve access response speed in order to alleviate the visit pressure of the content Dispatching Unit of preserving this content; Can in this content Dispatching Unit affiliated area, select other idle content Dispatching Unit, and in memory cell, read other idle content Dispatching Unit that the focus content is injected into selection.
For example; With a certain content be injected into be deployed in Pekinese's content Dispatching Unit be deployed in the content Dispatching Unit in Shenzhen after; The content of monitoring these two zones is by visit capacity; If find to be lower than default value by visit capacity in the Pekinese, then with this content from being deployed in deletion in Pekinese's content Dispatching Unit (can be in all comprise the content Dispatching Unit of this content, to delete, also can be to comprise deletion in the content Dispatching Unit of this content from part).If discovery is higher than default value Shenzhen by visit capacity, then can in the content Dispatching Unit that Shenzhen is disposed, select some to have the content Dispatching Unit of idling-resource, this content is assigned in the idle content Dispatching Unit of selecting.
Correspondingly, the embodiment of the invention also provides a kind of content injected system, and is as shown in Figure 4, is a kind of structural representation of this system.
The content injected system of the embodiment of the invention comprises:
Content is injected request receiving element 10, is used for the content injection request that reception server sends, and the content request of injecting comprises customer attribute information;
First matching unit 20 is used to select the content Dispatching Unit that is complementary with customer attribute information;
Content is injected unit 30, is used for the content that server sends is injected into the content Dispatching Unit that first matching unit is selected.
In order to prevent that content Dispatching Unit deletion content from causing contents lost, as shown in Figure 5, the content injected system of the embodiment of the invention can also comprise:
Second matching unit 40 is used to select the memory cell that is complementary with customer attribute information;
Content is injected unit 30, also is used for the content that server sends is injected into the memory cell that second matching unit is selected.
Content is injected in the memory cell preserves; Just can effectively prevent the generation of contents lost situation, even all content Dispatching Unit are all with this content deletion, when this content of needs; Also can in memory cell, call this content, and be injected in the content Dispatching Unit and be distributed to the user.
As shown in Figure 6, embodiment of the invention content injected system can further include:
Acquiring unit 50 is used for after content is injected the unit content is injected into content Dispatching Unit and memory cell, obtain content each content Dispatching Unit by visit capacity;
Content delete cells 60 is used for during less than default value, in the content Dispatching Unit, being deleted content by visit capacity what acquiring unit obtained;
Content adjustment unit 70; Be used for acquiring unit obtain be not less than default value by visit capacity the time; In content Dispatching Unit affiliated area, select other idle content Dispatching Unit, and reading of content is injected into other idle content Dispatching Unit of selection in memory cell.
After accomplishing the content injection; Through the monitoring content by the visit capacity situation, just can adjust the distribution of content in real time, both can reduce by the visit pressure of the high content Dispatching Unit of visit capacity; Can practice thrift again by the resource of the low content Dispatching Unit of visit capacity, realize the reasonable distribution of content.
Correspondingly, the embodiment of the invention also provides a kind of content distribution method, and is as shown in Figure 7, is the schematic flow sheet of this method, comprising:
Step 201 receives the content dispense request that client is sent, and the content dispense request comprises: the information of customer attribute information and distributing contents.Wherein, client can be a computer.
Step 202 is preserved in the content Dispatching Unit of distributing contents certainly, searches one and is complementary and the content Dispatching Unit nearest apart from client with customer attribute information.
Step 203 is sent to client with the identity information of content Dispatching Unit, communicates by letter so that client is set up with the content Dispatching Unit, obtains distributing contents from the content Dispatching Unit.
Based on content method for implanting provided by the invention; To be injected into the technical foundation in the content Dispatching Unit that the attribute that has with this user is complementary to the content of different user; The content distribution method of the embodiment of the invention can be accomplished the content distribution process to different user, specifically comprises following three steps:
(1) if different user (the user here is meant through the user of client from CDN system downloads content) sends the content dispense request to the CDN system, through the customer attribute information that comprises in the request user identity is distinguished earlier.Likewise, customer attribute information can comprise user attaching information and User IP network segment address.Perhaps, customer attribute information comprises user name and User IP network segment address.Perhaps, customer attribute information comprises user attaching information, user name and User IP network segment address.
(2) after identifying transmission requesting users identity, in the content Dispatching Unit of preserving distributing contents, search a content Dispatching Unit that is complementary with user identity through customer attribute information.In this step, mainly be to realize through judging that whether IP network sector address that content Dispatching Unit network interface distributes is complementary with user's IP network sector address.
(3) after finding the content Dispatching Unit that matees with user identity; The identity information of this content Dispatching Unit is sent to the user; Can adopt the URL mode or adopt the IP mode; Thereby the user just can communicate by letter with the foundation of content Dispatching Unit to the network interface initiation request of content Dispatching Unit, obtains distributing contents.
Further, as shown in Figure 8, embodiment of the invention content distribution method can also comprise:
Step 204; If in preserving the content Dispatching Unit of distributing contents; Do not find with customer attribute information and be complementary and the content Dispatching Unit nearest apart from client; Then in not preserving the content Dispatching Unit of distributing contents, search one and be complementary and the content Dispatching Unit nearest, and distributing contents is injected into the content Dispatching Unit of searching apart from client with user property.
Step 205 is sent to client with the identity information of content Dispatching Unit and comprises: the identity information of the content Dispatching Unit of searching is sent to client.Communicate by letter thereby make client to set up, in the content Dispatching Unit, obtain distributing contents with the content Dispatching Unit.
If do not find distance users content Dispatching Unit nearest, that meet consumers' demand through searching; If this moment, the identity information with distance users content Dispatching Unit far away, that meet consumers' demand sent to the user; In this content Dispatching Unit, obtain distributing contents by the user; This just needs will certainly reduce the response speed of website visiting through multiple routing forwarding and processing, influences user experience.To this situation; Embodiment of the invention content distribution method is not in preserving the content Dispatching Unit of distributing contents; Search the content Dispatching Unit that a distance users is nearest and meet consumers' demand, the distributing contents that then user is needed is injected in this content Dispatching Unit by user capture.
For example, the user capture that is positioned at Shenzhen is deployed in the content of the content Dispatching Unit in Shenzhen, utilizes method shown in Figure 7 can get access to the distributing contents that the user needs easily.If but this user leaves Shenzhen (for example going on business) temporarily, send to the user if also will be deployed in the identity information of the content Dispatching Unit in Shenzhen, communicate by letter with its foundation by the user, then can exist network to incur loss through delay, influence websites response speed.At this moment,, be it in the present location of user and seek a content Dispatching Unit, and its content that need visit is injected into supplies the user to obtain in this content Dispatching Unit that this just can improve the response time of website visiting greatly if utilize method shown in Figure 8.
Correspondingly, the embodiment of the invention also provides a kind of content delivering system, and is as shown in Figure 9, is a kind of structural representation of this system.
The content delivering system of the embodiment of the invention comprises:
Content dispense request receiving element 11 is used to receive the content dispense request that client is sent, and the content dispense request comprises: the information of customer attribute information and distributing contents.The form of content dispense request can be http (Hyper Text Transfer Protocol; HTTP) request; Also can be DNS (Domain Name System; Domain name system) request, if the DNS request, then content dispense request receiving element also should have the dns resolution ability.
First searches unit 12, is used for from preserving in the content Dispatching Unit of distributing contents, searches one and is complementary and the content Dispatching Unit nearest apart from client with customer attribute information.
Transmitting element 13, be used for first search the content Dispatching Unit that the unit finds identity information be sent to client communicate by letter so that client is set up with the content Dispatching Unit, obtain distributing contents from the content Dispatching Unit.
Further, shown in figure 10, embodiment of the invention content delivering system also comprises:
Second searches unit 14; Be used for when first searches the unit and do not find the content Dispatching Unit; In the content Dispatching Unit of not preserving distributing contents; Search one and be complementary and the content Dispatching Unit nearest, and distributing contents is injected into the content Dispatching Unit of searching apart from client with user property;
Transmitting element 13, also be used for second search the content Dispatching Unit of searching the unit identity information be sent to client communicate by letter so that client and content Dispatching Unit are set up, obtain distributing contents from the content Dispatching Unit.
Need to prove that here the content of mentioning among the present invention can comprise in video information, audio-frequency information, Word message, the picture information one or multinomial.
The present invention program can describe in the general context of the computer executable instructions of being carried out by computer, for example program unit.Usually, program unit comprises the routine carrying out particular task or realize particular abstract, program, object, assembly, data structure or the like.Also can in DCE, put into practice the present invention program, in these DCEs, by through communication network connected teleprocessing equipment execute the task.In DCE, program unit can be arranged in this locality and the remote computer storage medium that comprises memory device.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and identical similar part is mutually referring to getting final product between each embodiment, and each embodiment stresses all is the difference with other embodiment.Especially, for system embodiment, because it is basically similar in appearance to method embodiment, so describe fairly simplely, relevant part gets final product referring to the part explanation of method embodiment.System embodiment described above only is schematic; Wherein said unit as the separating component explanation can or can not be physically to separate also; The parts that show as the unit can be or can not be physical locations also; Promptly can be positioned at a place, perhaps also can be distributed on a plurality of NEs.Can realize the purpose of present embodiment scheme according to the needs selection some or all of module wherein of reality.Those of ordinary skills promptly can understand and implement under the situation of not paying creative work.
More than the embodiment of the invention has been carried out detailed introduction, used embodiment among this paper the present invention set forth, the explanation of above embodiment just is used for help understanding method and apparatus of the present invention; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that on embodiment and range of application, all can change, in sum, this description should not be construed as limitation of the present invention.