Summary of the invention
In view of this, the application provides a kind of method and its system for realizing webpage fit using CDN, by away from nearest
Base station provide selection CDN node, thus realize web page contents transmission stability and rapidity.
The application provides a kind of visit that include: terminal send to base station to webpage of the method for realizing webpage fit using CDN
Ask request;Base station is that terminal selects suitable CDN node, is denoted as CDN node 1;Judge whether the CDN node 1 of selection is able to satisfy
The access request of terminal selects other CDN nodes by control node if it is not, access request is transmitted to control node,
Access content is provided for terminal.
It includes: to receive base station signal information that wherein terminal, which is sent to base station to the access request of webpage,;Terminal is according to base station
Signal message judge the working condition of base station, select working condition to be most suitable for and provide the base station of communication for terminal, to the selection
Base station send terminal for webpage access request.
Wherein base station is that terminal selects suitable CDN node, and being denoted as CDN node 1 includes: to take in the access request of terminal
The location information for the terminal that band is obtained using GPS device, base station is according to the location information of terminal, further according to CDN node
List selects the CDN node nearest apart from the terminal for the terminal, is denoted as CDN node 1;Or base station is according to the base prestored
The corresponding table of the IP address stood and the IP address and CDN node is terminal selection where the access terminal and base station
The nearest CDN node of mobile network, is denoted as CDN node 1.
Wherein judge whether the CDN node of selection is able to satisfy the access request of terminal, if it is not, access request is turned
Control node is issued, other CDN nodes are selected by control node, access content is provided for terminal and includes the following steps:
Step 1:CDN node 1 receive base station forwarding access request, judge its whether there is with it is right in above-mentioned access request
The content answered, if it is, continuing step 2, otherwise, CDN node 1 determines that it cannot provide above-mentioned access request, continues step
3;
Step 2, CDN node 1 judge whether the access request that it is currently provided has reached given threshold value, if it is,
It determines that CDN node 1 cannot provide requested access request, then continues step 3, otherwise, it determines CDN node 1 is capable of providing and asks
The access content asked, then provide the terminal with access content.
Step 3, CDN node 1 send inquiry request to control node, to obtain the CDN section for being capable of providing the access request
The information of point.
The application also provides a kind of system for realizing webpage fit using CDN, including with lower component:
Terminal: the access request to webpage is sent to base station;
Base station: suitable CDN node is selected for terminal, is denoted as CDN node 1, and the access to 1 forwarding terminal of CDN node
Request;;
CDN node 1: judging whether CDN node 1 is able to satisfy the access request of terminal, if it is not, access request is turned
Control node 4 is issued, other CDN nodes are selected by control node 4, provide access content for terminal;
Control node: after the inquiry request for receiving CDN node 1, inquiry can provide the CDN section of above-mentioned access request
Point, and to 1 returning response information of CDN node, the CDN node that above-mentioned access request can be provided is carried in the response message
Information.
Wherein terminal includes: wireless transceiver: receiving the signal message that base station is sent;GPS signal device: it is passed based on satellite
The position for the base position data determination terminal sent;Memory: storage terminal positional information and through with base station communication and obtain
Base station position information;And controller: judging the working condition of base station according to the signal message of base station, selects its work for terminal
It is most suitable for providing the base station of communication for terminal as situation, sends terminal for the access request of webpage to the base station of the selection.
The location information of the terminal obtained using GPS device wherein carried in the access request of base station acquisition terminal,
Base station selects the CDN nearest apart from the terminal for the terminal further according to CDN node list according to the location information of terminal
Node is denoted as CDN node 1.Or base station is according to the IP address of the base station prestored and pair of the IP address and CDN node
Table is answered, the CDN node nearest apart from the mobile network where the access terminal and base station is selected for terminal, is denoted as CDN node 1.
Wherein the CDN node 1 includes:
Judgement part: receive base station forwarding access request, judge CDN node 1 whether there is in above-mentioned access request
Corresponding content triggers if it is, triggering comparing unit, otherwise, CDN node 1 determine that it cannot provide above-mentioned access request
Obtaining widget;
Comparing unit: judging whether the access request that CDN node 1 currently provides has reached given threshold value, if it is,
It determines that CDN node 1 cannot provide requested access request, then triggers obtaining widget;Otherwise, it determines CDN node 1 is capable of providing
The access request of request then provides the terminal with access content;
Obtaining widget: sending inquiry request to control node, to obtain the letter for the CDN node for being capable of providing the access request
Breath.
It is mobile terminal by above technical scheme as it can be seen that the application will combine the characteristics of mobile terminal with the advantage of CDN
User better viewing experience is provided.
By the application, it can be achieved that according to network flow, the connection and network load condition of each node, and combine movement
The location information of terminal and obtain dynamic web content.
Specific embodiment
The application is when terminal proposes access request, by obtaining its location information away from nearest base station and being forwarded
To CDN node.By the application, user can dynamically obtain within the shorter response time is suitable for the webpage that terminal is shown, from
And obtain better viewing experience.
Certainly, any technical solution for implementing the application must be not necessarily required to reach simultaneously above all advantages.
In order to make those skilled in the art more fully understand the technical solution in the application, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only
It is only some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, ordinary skill
Personnel's every other embodiment obtained, shall fall within the protection scope of the present application.
Further illustrate that the application implements below with reference to illustrations.
The application provides a kind of method for realizing webpage fit using CDN, is applied to mobile base station and CDN network.
Referring to Fig. 1, this includes base station 1 and multiple terminals 2 and CDN network 3 using the system that CDN realizes webpage fit,
Wherein base station 1 is existing mobile network base station, for being interconnected with multiple terminals 2 and CDN network 3, can computing terminal 2 with it is each
The distance of CDN node, and the access request of terminal 2 is transmitted to CDN network.Multiple terminals 2 can be PC machine, various types of shiftings
Dynamic equipment and the various wired or wireless terminals etc. that can be communicated with base station 1, CDN network 3.CDN network 3 further comprises
Control node 4 and multiple CDN nodes, wherein control node 4 receives the access request of the terminal 2 of base station forwarding, and is request
Terminal 2 select the nearest CDN node that can satisfy access request, which is forwarded to the CDN node of the selection;
CDN node receive base station or control node forwarding access request after, provide the terminal with its needs access content, and
When being unable to complete the delivery of access content (such as the problems such as equipment fault or content deletion), content is sent to control node and is provided
Failure information is further selected other CDN nodes by control node, to provide the terminal with the access content of its needs.
Specifically, the system includes:
Terminal: selection base station sends the access request to webpage to the base station of selection.
Further, with reference to Fig. 2, wherein the construction of terminal 2 is as shown in Fig. 2, terminal 2 includes controller 21, wireless receiving and dispatching
Device 22, GPS signal device 23 and memory 24.Wherein:
Wireless transceiver 22: by carrying out wireless communication with other equipment such as base station, information exchange is realized.
Wireless transceiver 22 receives the signal message that base station is sent, including the working condition of base station, such as base station
The electric field strength or Ec/Io value of electric wave.
GPS signal device 23: the position to the base position data determination terminal based on satellite transmission.
The base station position information that memory 24: storing terminal positional information and is communicated with communication base station and obtains.
Controller 21: suitable base station is selected to send access request.
The controller 21 of terminal judges the working condition of base station according to the signal message of base station, and combines the terminal obtained
The location information list of location information and each base station is that terminal selects to be most suitable for away from nearest and its working condition as end
End provides the base station of communication, sends terminal for the access request of webpage to the base station of the selection.
The system further comprises base station 1: selecting suitable CDN node for terminal, is denoted as CDN node 1, and save to CDN
The access request of 1 forwarding terminal of point.
Terminal 2 sends the access request to webpage to the base station of selection 1, and base station 1 is that the terminal selects suitable CDN section
Point.This can be implemented in several ways, for example, the location information of the terminal, base station root can be carried in the access request of terminal
According to the location information of terminal, further according to CDN node list, the CDN node nearest apart from the terminal, note are selected for the terminal
For CDN node 1;Or base station 1 can according to the IP address of the base station 1 prestored and the corresponding table of the IP address and CDN node,
The CDN node nearest apart from the mobile network where the access terminal and base station is selected for terminal, is denoted as CDN node 1.
The system further comprises CDN node 1: judging whether CDN node 1 is able to satisfy the access request of terminal 2, if not
Can, then access request is transmitted to control node 4, other CDN nodes are selected by control node 4, provide access content for terminal.
Referring to Fig. 6, which includes:
Judgement part 601: receiving the access request of base station forwarding, judges that CDN node 1 whether there is and above-mentioned access request
In corresponding content, if so, triggering comparing unit 802, otherwise, CDN node 1 determine its above-mentioned access request cannot be provided,
Trigger obtaining widget 803;
Comparing unit 602: judge access request that CDN node 1 currently provides whether have reached given threshold value (for example,
Reach 80%), if it is, determining that CDN node 1 cannot provide requested access request, triggers obtaining widget;Otherwise, really
Determine the access request that CDN node 1 is capable of providing request, then provides the terminal with access content.
Obtaining widget 603: sending inquiry request to control node, to obtain the CDN node for being capable of providing the access request
Information.
If CDN node 1 judges that it cannot provide the access request of terminal, obtaining widget 603 is sent to control node
Inquiry request, to obtain the information for the CDN node for being capable of providing the access request.
The system further comprises control node 4: after the inquiry request for receiving CDN node 1, inquiry can provide above-mentioned
The CDN node of access request, and to 1 returning response information of CDN node, above-mentioned access can be provided by carrying in the response message
The information of the CDN node of request.Specifically, control node can be returned to CDN node 1 all can provide above-mentioned access request
CDN node list information, the information of optimal CDN node can also be only returned to CDN node 1, CDN node 1 is according to control
The nodal information that node processed returns obtains the letter for being capable of providing the CDN node 2 (can be optimal node) of above-mentioned access request
Breath.
After the information that CDN node 1 gets CDN node 2, according to the information of CDN node 2, industry is sent to CDN node 2
Business request, requests CDN node 2 to provide above-mentioned access request for terminal;CDN node 2 receives the backward whole of above-mentioned access request
End provides the content of request.
Accordingly, system applied by method and device using CDN realization webpage fit is described by Fig. 1 and Fig. 2
And in system terminal construction, below with reference to Fig. 3 introduction using CDN realize webpage fit method flow.
The application using CDN realize webpage fit method include:
S1, terminal send the access request to webpage to base station.
Specific steps are referring to fig. 4, comprising:
P1, base station signal information is received.
Wireless transceiver 22 receives the signal message that base station is sent, including the working condition of base station, such as base station
The electric field strength or Ec/Io value of electric wave.
P2, the suitable base station of selection send access request.
The controller 21 of terminal judges the working condition of base station according to the signal message of base station, selects its work shape for terminal
Condition is most suitable for providing the base station of communication for terminal, sends terminal for the access request of webpage to the base station of the selection.
S2, base station are the suitable CDN node of terminal selection for sending access request, are denoted as CDN node 1.
Terminal 2 sends the access request to webpage to the base station of selection 1, and base station 1 is that the terminal selects suitable CDN section
Point, and to the access request of 1 forwarding terminal of CDN node.This can be implemented in several ways, for example, can ask in the access of terminal
The middle location information for carrying the terminal is sought, base station is according to the location information of terminal, further according to CDN node list, for the end
End selects the CDN node nearest apart from the terminal, is denoted as CDN node 1;Or base station 1 can according to the IP of the base station 1 prestored
The corresponding table of location and the IP address and CDN node selects for terminal apart from the mobile network where the access terminal and base station
Nearest CDN node is denoted as CDN node 1.
S3, judge whether the CDN node of selection is able to satisfy the access request of terminal, if it is not, access request is turned
Control node is issued, other CDN nodes are selected by control node, provides access content for terminal.
Specific steps are referring to Fig. 5, comprising:
T1, CDN node 1 receive the access request of base station forwarding, judge it with the presence or absence of corresponding with above-mentioned access request
Content, if it is, continuing T2, otherwise, CDN node 1 determines that it cannot provide above-mentioned access request, continues T3;
T2, CDN node 1 judge whether the access request that it is currently provided has reached given threshold value (for example, reaching
80%), if it is, determining that CDN node 1 cannot provide requested access request, continue step T3, otherwise, it determines CDN is saved
Point 1 is capable of providing the access request of request, then provides the terminal with access content.
T3, CDN node 1 send inquiry request to control node, are capable of providing the CDN node of the access request with acquisition
Information.
If CDN node 1 judges that it cannot provide the access request of terminal, CDN node 1 sends to control node and inquires
Request, to obtain the information for the CDN node for being capable of providing the access request, after control node receives the inquiry request, inquiry
The CDN node of above-mentioned access request can be provided, and to 1 returning response information of CDN node, carrying in the response message can be with
The information of the CDN node of above-mentioned access request is provided.Specifically, control node can be returned to CDN node 1 and all can be provided
The list information of the CDN node of above-mentioned access request can also only return to the information of optimal CDN node, CDN to CDN node 1
The nodal information that node 1 is returned according to control node, it (can be optimal that acquisition, which is capable of providing the CDN node 2 of above-mentioned access request,
Node) information.
After the information that CDN node 1 gets CDN node 2, according to the information of CDN node 2, industry is sent to CDN node 2
Business request, requests CDN node 2 to provide above-mentioned access request for terminal;CDN node 2 receives the backward whole of above-mentioned access request
End provides the content of request.
It will be understood by those skilled in the art that embodiments herein can provide as method, apparatus (equipment) or computer
Program product.Therefore, in terms of the application can be used complete hardware embodiment, complete software embodiment or combine software and hardware
Embodiment form.Moreover, it wherein includes the meter of computer usable program code that the application, which can be used in one or more,
The computer journey implemented in calculation machine usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of sequence product.
The application is flow chart of the reference according to method, apparatus (equipment) and computer program product of the embodiment of the present application
And/or block diagram describes.It should be understood that each process in flowchart and/or the block diagram can be realized by computer program instructions
And/or the combination of the process and/or box in box and flowchart and/or the block diagram.It can provide these computer programs to refer to
Enable the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to generate
One machine so that by the instruction that the processor of computer or other programmable data processing devices executes generate for realizing
The device for the function of being specified in one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the application range.Obviously, those skilled in the art can be to the application
Various modification and variations are carried out without departing from spirit and scope.If in this way, these modifications and variations of the application
Belong within the scope of the claim of this application and its equivalent technologies, then the application is also intended to encompass these modification and variations and exists
It is interior.