Summary of the invention
The embodiment of the present invention provides a kind of content method for implanting, content distribution method and content distributing network, the object that can be used by different user to realize same CDN system.
For this reason, the invention provides following technical scheme:
A content method for implanting, comprising:
The content that reception server sends is injected request, and the request of injecting of described content comprises customer attribute information;
Select the contents distribution unit matching with described customer attribute information;
The contents distribution unit matching described in the content that described server is sent is injected into.
A content distribution method, comprising:
Receive the contents distribution request that client sends, described contents distribution request comprises: the information of customer attribute information and distributing contents;
In preserving the contents distribution unit of described distributing contents, search one and match with described customer attribute information and the distance nearest contents distribution unit of described client;
The identity information of described contents distribution unit is sent to described client, so that described client is set up and communicated by letter with described contents distribution unit, from described contents distribution unit, obtains described distributing contents.
A content injected system, comprising:
Content is injected request reception unit, and the content sending for reception server is injected request, and the request of injecting of described content comprises customer attribute information;
The first matching unit, for the contents distribution unit of selecting to match with described customer attribute information;
Content is injected unit, for the content that described server is sent, is injected into the contents distribution unit that described the first matching unit is selected.
A content delivering system, comprising:
Contents distribution request reception unit, the contents distribution request sending for receiving client, described contents distribution request comprises: the information of customer attribute information and distributing contents;
First searches unit, for certainly preserving in the contents distribution unit of described distributing contents, searches one and matches with described customer attribute information and the distance nearest contents distribution unit of described client;
Transmitting element, for the described first identity information of searching the contents distribution unit that unit finds is sent to described client, so that described client is set up and communicated by letter with described contents distribution unit, obtains described distributing contents from described contents distribution unit.
The embodiment of the invention discloses following technique effect:
Content method for implanting of the present invention and system, when carrying out content injection, just the content for different user is injected in the contents distribution unit that the attribute that has with this user matches, for realizing same CDN system, for different user provides content distribution service, provides technical foundation.In addition, the content method for implanting of the embodiment of the present invention and system can also be adjusted the content injection unit that content is injected in real time according to the accessed amount of content, realize the reasonable layout of content.
The method and system of injecting based on foregoing, the embodiment of the present invention also provides a kind of method and system of contents distribution.Like this, same CDN system just can, according to the request of different user, for user provides the content distribution service that meets its demand, realize the object that same CDN system is used by different user, and without configuring a set of CDN system for every class user, saved resource.
Embodiment
In order to make those skilled in the art person understand better the present invention program, below in conjunction with drawings and embodiments, the embodiment of the present invention is described in further detail.
As shown in Figure 1, be the flow chart of embodiment of the present 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, user refers to and by server, to CDN system, uploads the user who injects content.Customer attribute information can comprise user attaching information (user attaching information can be the information that under user, company or affiliated group etc. represent user's subordinate relation) and User IP network segment address.Or described customer attribute information also can comprise user name and User IP network segment address.Or described customer attribute information comprises user attaching information, user name and User IP network segment address.Server can be a computer.
Step 102, selects the contents distribution unit matching with customer attribute information.
Step 103, the content that server is sent is injected into contents distribution unit.Can adopt multicast mode (multicast refers to that realizing point-to-point configuration between sender and each recipient connects) that content is sent to contents distribution unit and complete content injection, also can adopt mode of unicast (clean culture refers to that single source sends to a kind of network service of single object recipient) that content is sent to contents distribution unit and complete content injection.
The object that the embodiment of the present invention is applied by different user in order to realize same CDN system, is carrying out content while injecting, and the content for different user is injected in the contents distribution unit that the attribute that has with this user matches.Before carrying out content injection, need to complete following two steps, to select the contents distribution unit matching with customer attribute information:
(1) if different user sends content to CDN system, inject request, first by the customer attribute information comprising in request, user identity is distinguished.For example can judge user identity by user name, this is the first step of matching content Dispatching Unit, while only having user name to conform to the user name of CDN system legal authorization, just further carries out other operation, selects for injecting the contents distribution unit of content.
It should be noted that herein, in actual applications, can also identify user identity by the various ways such as combination of company, affiliated group under company, affiliated group or the combination of the two and user name and user under user, this embodiment of the present invention is not limited.
(2) after identifying the user's who sends request identity, more further by the User IP network segment address in customer attribute information, find out the contents distribution unit matching with user identity.In this step, be mainly by judging whether the IP network sector address of contents distribution unit networks interface assignment matches to realize with user's IP network sector address.
Complete after above-mentioned two operating procedures, then the content that user is sent is injected into corresponding contents Dispatching Unit.This is just for same CDN system provides technical foundation for different user provides content distribution service.
It should be noted that herein, for at least two public network users, because different public user's IP network sector address is not identical, so the embodiment of the present invention can distinguish different public user's identity easily, and searches the contents distribution unit matching with its I P network segment address for this user.Both the content that had received public network user for same CDN system is injected request, the content that receives again private user is injected the situation of request, because public network user is not identical with the IP network sector address of private user yet, therefore the embodiment of the present invention can be distinguished user identity equally very easily, and then the contents distribution unit that mates with User IP network segment address of selection.But, for at least two private users, because may there is the identical situation in IP address between different private users, therefore in order to find the contents distribution unit mating with user identity, private user also needs to meet its IP address and does not belong to this requirement of phase same network segment.
Because the content in contents distribution unit can increase according to actual needs or delete, for the contents lost phenomenon that prevents that contents distribution element deletion content from causing, the content method for implanting of the embodiment of the present invention can also comprise:
Step 104, selects the memory cell matching with customer attribute information;
Step 105, the content that server is sent is injected into memory cell.Similarly, in this step, both can adopt multicast mode that content is sent to memory cell and complete content injection, and also can adopt mode of unicast that content is sent to memory cell and complete content injection.
Like this, even if a certain content is deleted in contents distribution unit, also there will not be the situation of contents lost, when this content of needs, can in memory cell, obtain and be injected into contents distribution unit.
It should be noted that herein, after receiving content injection request, can first perform step 102 chosen content Dispatching Unit as shown in Figure 2, then perform step 104 select storage units; 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 present invention does not limit this.
Further, in embodiment of the present invention content method for implanting, after completing the above-mentioned process of injecting content to content Dispatching Unit and memory cell, can also, according to the accessed amount of content, adjust the contents distribution unit that content is injected.As shown in Figure 3, can specifically comprise:
Step 106, obtains content in the accessed amount of each contents distribution unit.
Step 107, if accessed amount is less than default value, can judge that this content is non-Hot Contents, this content can be deleted in contents distribution unit, discharges the occupied resource in contents distribution unit.
Step 108, if accessed amount is not less than default value, can judge that this content is Hot Contents, in order to alleviate the access pressure of the contents distribution unit of preserving this content, improve access response speed, can in this contents distribution unit affiliated area, select other idle contents distribution unit, and in memory cell, read other idle contents distribution unit that Hot Contents is injected into selection.
For example, a certain content is injected into and is deployed in contents distribution unit, Pekinese and is deployed in behind the contents distribution unit in Shenzhen, monitor the accessed amount of content in these two regions, if find that accessed amount is lower than default value in Pekinese, this content is deleted to (can be to delete, can be also to delete in the contents distribution unit that comprises this content from part) in all contents distribution unit that comprise this content from being deployed in contents distribution unit, Pekinese.If the accessed amount in Shenzhen found is higher than default value, the contents distribution unit that select some to there is idling-resource in the contents distribution unit that can dispose in Shenzhen, by this content assignment in the idle contents distribution unit of selecting.
Correspondingly, the embodiment of the present invention also provides a kind of content injected system, as shown in Figure 4, is a kind of structural representation of this system.
The content injected system of the embodiment of the present invention, comprising:
Content is injected request reception unit 10, and the content sending for reception server is injected request, and the content request of injecting comprises customer attribute information;
The first matching unit 20, for the contents distribution unit of selecting to match with customer attribute information;
Content is injected unit 30, for the content that server is sent, is injected into the contents distribution unit that the first matching unit is selected.
In order to prevent that contents distribution element deletion content from causing contents lost, as shown in Figure 5, the content injected system of the embodiment of the present invention can also comprise:
The second matching unit 40, for the memory cell of selecting to match with customer attribute information;
Content is injected unit 30, also for the content that server is sent, is injected into the memory cell that the second matching unit is selected.
Content is injected in memory cell and is preserved, just can effectively prevent the generation of contents lost situation, even if all contents distribution unit are all by this content deletion, when this content of needs, also can in memory cell, call this content, and be injected in contents distribution unit and be distributed to user.
As shown in Figure 6, embodiment of the present invention content injected system can further include:
Acquiring unit 50, is injected into content after contents distribution unit and memory cell for injecting unit in content, obtains content in the accessed amount of each contents distribution unit;
Content delete cells 60 while being less than default value for the accessed amount of obtaining at acquiring unit, is deleted content in contents distribution unit;
Content adjustment unit 70, while being not less than default value for the accessed amount of obtaining at acquiring unit, in contents distribution unit affiliated area, select other idle contents distribution unit, and reading of content is injected into other idle contents distribution unit of selection in memory cell.
After completing content injection, by the accessed amount situation of Contents for Monitoring, just can adjust in real time the distribution of content, both can reduce the access pressure of the contents distribution unit that accessed amount is high, can save again the resource of the contents distribution unit that accessed amount is low, realize the reasonable distribution of content.
Correspondingly, the embodiment of the present invention also provides a kind of content distribution method, as shown in Figure 7, is the schematic flow sheet of the method, comprising:
Step 201, receives the contents distribution request that client sends, and contents distribution request comprises: the information of customer attribute information and distributing contents.Wherein, client can be a computer.
Step 202, preserves in the contents distribution unit of distributing contents certainly, searches one and matches with customer attribute information and the contents distribution unit nearest apart from client.
Step 203, is sent to client by the identity information of contents distribution unit, so that client is set up and communicated by letter with contents distribution unit, from contents distribution unit, obtains distributing contents.
Based on content method for implanting provided by the invention, content for different user is injected into the technical foundation in the contents distribution unit that the attribute that has with this user matches, the content distribution method of the embodiment of the present invention can complete the content distribution process for different user, specifically comprises following three steps:
(1) if different user (user herein refers to the user from CDN system downloads content by client) sends contents distribution request to CDN system, first by the customer attribute information comprising in request, user identity is distinguished.Similarly, customer attribute information can comprise user attaching information and User IP network segment address.Or customer attribute information comprises user name and User IP network segment address.Or customer attribute information comprises user attaching information, user name and User IP network segment address.
(2), after identifying the user identity sending request, by customer attribute information, in the contents distribution unit of preserving distributing contents, search a contents distribution unit matching with user identity.In this step, be mainly by judging whether the IP network sector address of contents distribution unit networks interface assignment matches to realize with user's IP network sector address.
(3) after finding the contents distribution unit mating with user identity, the identity information of this contents distribution unit is sent to user, can adopt URL mode or adopt IP mode, thereby user just can initiate request to the network interface of content Dispatching Unit, set up and communicate by letter with contents distribution unit, obtain distributing contents.
Further, as shown in Figure 8, embodiment of the present invention content distribution method can also comprise:
Step 204, if in preserving the contents distribution unit of distributing contents, do not find and match with customer attribute information and the contents distribution unit nearest apart from client, in not preserving the contents distribution unit of distributing contents, search one and match with user property and the contents distribution unit nearest apart from client, and distributing contents is injected into the contents distribution unit of searching.
Step 205, is sent to client by the identity information of contents distribution unit and comprises: the identity information of the contents distribution unit of searching is sent to client.Thereby make client to set up and to communicate by letter with contents distribution unit, in contents distribution unit, obtain distributing contents.
If do not find distance users contents distribution nearest, that meet consumers' demand unit through searching, if now the identity information of distance users contents distribution far away, that meet consumers' demand unit is sent to user, by user, in this contents distribution unit, obtain distributing contents, this just need to pass through multiple routing forwarding and processing, will certainly reduce the response speed of website visiting, affect user and experience.For this situation, embodiment of the present invention content distribution method is not in preserving the contents distribution unit of distributing contents, search the contents distribution unit that a distance users is nearest and meet consumers' demand, the distributing contents then user being needed is injected in this contents distribution unit is accessed by user.
For example, the user's access that is positioned at Shenzhen is deployed in the content of the contents distribution unit in Shenzhen, utilizes the method shown in Fig. 7 can get easily the distributing contents that user needs.For example, but if this user leaves Shenzhen (going on business) temporarily, if also the identity information that is deployed in the contents distribution unit in Shenzhen is sent to user, by user, communicated by letter with its foundation, can exist network to incur loss through delay, affect websites response speed.Now, if utilize the method shown in Fig. 8, be that it finds a contents distribution unit in the current location of user, and the content that it need to be accessed is injected in this contents distribution unit and obtains for user, this just can improve the response time of website visiting greatly.
Correspondingly, the embodiment of the present invention also provides a kind of content delivering system, as shown in Figure 9, is a kind of structural representation of this system.
The content delivering system of the embodiment of the present invention, comprising:
Contents distribution request reception unit 11, the contents distribution request sending for receiving client, contents distribution request comprises: the information of customer attribute information and distributing contents.The form of contents distribution request can be http (Hyper Text Transfer Protocol, HTML (Hypertext Markup Language)) request, also can be DNS (Domain Name System, domain name system) request, if DNS request, contents distribution request reception unit also should have dns resolution ability.
First searches unit 12, for certainly preserving in the contents distribution unit of distributing contents, searches one and matches with customer attribute information and the contents distribution unit nearest apart from client.
Transmitting element 13, for the first identity information of searching the contents distribution unit that unit finds is sent to client, so that client is set up and communicated by letter with contents distribution unit, obtains distributing contents from contents distribution unit.
Further, as shown in figure 10, embodiment of the present invention content delivering system also comprises:
Second searches unit 14, for when first searches unit and does not find contents distribution unit, in not preserving the contents distribution unit of distributing contents, search one and match with user property and the contents distribution unit nearest apart from client, and distributing contents is injected into the contents distribution unit of searching;
Transmitting element 13, also for the second identity information of searching the contents distribution unit of searching unit is sent to client, so that client is set up and communicated by letter with contents distribution unit, obtains distributing contents from contents distribution unit.
It should be noted that, the content of mentioning in the present invention can comprise one or more in video information, audio-frequency information, Word message, picture information herein.
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 data type, program, object, assembly, data structure etc.Also can in distributed computing environment (DCE), put into practice the present invention program, in these distributed computing environment (DCE), by the teleprocessing equipment being connected by communication network, be executed the task.In distributed computing environment (DCE), program unit can be arranged in the local and remote computer-readable storage medium that comprises memory device.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually referring to, each embodiment stresses is the difference with other embodiment.Especially, for system embodiment, because it is substantially similar in appearance to embodiment of the method, so describe fairly simplely, relevant part is referring to the part explanation of embodiment of the method.System embodiment described above is only schematic, the wherein said unit as separating component explanation can or can not be also physically to separate, the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of module wherein to realize the object of the present embodiment scheme.Those of ordinary skills, in the situation that not paying creative work, are appreciated that and implement.
Above the embodiment of the present invention is described in detail, has applied embodiment herein the present invention is set forth, the explanation of above embodiment is just for helping to understand method and apparatus of the present invention; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.