CN107305576A - The pseudo- static treatment method and apparatus of the page - Google Patents

The pseudo- static treatment method and apparatus of the page Download PDF

Info

Publication number
CN107305576A
CN107305576A CN201610262573.0A CN201610262573A CN107305576A CN 107305576 A CN107305576 A CN 107305576A CN 201610262573 A CN201610262573 A CN 201610262573A CN 107305576 A CN107305576 A CN 107305576A
Authority
CN
China
Prior art keywords
page
server
terminal
database
mentioned
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610262573.0A
Other languages
Chinese (zh)
Inventor
王勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201610262573.0A priority Critical patent/CN107305576A/en
Publication of CN107305576A publication Critical patent/CN107305576A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application discloses the pseudo- static treatment method and apparatus of the page.One embodiment of methods described includes:The page browsing request that user is sent by terminal is received, the page browsing request includes network address;Determine the Virtual network operator belonging to the terminal;Judge the page that the network address is specified whether is cached with the CDN server of the Virtual network operator;If so, the page directly then is returned into the terminal;If it is not, searching whether there is the page in default memory database;If it is present the page is returned into the terminal;If there is no, then inquiry whether there is the page in specified database server, and the page is then returned into the terminal in response to there is the page in database server, or the page is then obtained according to the network address in response to the page is not present in database server, and the acquired page is returned into the terminal.The embodiment reduces the load of server.

Description

The pseudo- static treatment method and apparatus of the page
Technical field
The application is related to field of computer technology, and in particular to Internet technical field, especially relates to And the pseudo- static treatment method and apparatus of the page.
Background technology
In web development processes, in order to preferably alleviate server load pressure, typically all by page Face content generation static page.But sometimes for showing some information in real time, or with dynamic When state script solves some problems, web site contents cannot be shown with static mode.Using Pseudo- static technique exploitation web can solve the above problems.Wherein, pseudo- static state is relatively true quiet It is with html (Hyper Text Markup Language, HTML) for state The static page form displaying of one class, but be with asp (Active Server Page, dynamic in fact The server page) dynamic script of a class carrys out development process.However, the puppet of the existing page In static treatment method, occur in large-scale big flow high concurrent website because substantial amounts of user asks Need dynamic render caused by the load of server when becoming big, consumption increase and page response Between it is slow the problems such as.
The content of the invention
The purpose of the application is the pseudo- static treatment method and dress for proposing a kind of improved page Put, to solve the technical problem that background section above is mentioned.
In a first aspect, this application provides a kind of pseudo- static treatment method of page, methods described Including:Receive the page browsing request that user is sent by terminal, the page browsing request bag Include network address;Determine the Virtual network operator belonging to the terminal;Judge in the Virtual network operator Whether the page that the network address specify is cached with content delivery network service device;If so, then The page is directly returned into the terminal;If it is not, in default memory database In search whether there is the page;If it is present the page is returned into the terminal, And write the page in the caching of content delivery network service device of the Virtual network operator; If it does not exist, then inquiry whether there is the page in specified database server, and And the page is then returned into the terminal in response to there is the page in database server, Or page is then obtained according to the network address in response to the page is not present in database server Face, and the acquired page is returned into the terminal.
In certain embodiments, it is described or in response in the database server be not present institute State the page and the page then obtained according to the network address, and the acquired page is returned into the terminal, Afterwards, methods described also includes:The acquired page is write to the memory database and institute In the content delivery network service device for stating Virtual network operator.
In certain embodiments, it is described or in response in the database server be not present institute State the page and the page then obtained according to the network address, and the acquired page is returned into the terminal, Including:The data of the page are obtained according to the network address;According to the data of the page to institute The page is stated to be rendered;The page after rendering is respectively written into the content point of the Virtual network operator The caching for sending out the webserver is neutralized in the database server;The page after rendering will be returned Return the terminal.
In certain embodiments, it is described if it does not exist, then being looked into the database server Ask and whether there is the page, and in response to there is the page in the database server The page is then returned into the terminal, including:When in the memory database be not present institute When stating the page, inquire about whether the page does persistence in the database server;If institute State the page and do persistence, then the page is write to the content distributing network of the Virtual network operator In the caching of server;Institute is set in the content delivery network service device of the Virtual network operator State the cache-time of the page;The page is returned into the terminal.
In certain embodiments, the memory database is to be provided to support by server cluster, Wherein described server cluster includes the multiple web application servers for handling same task.Institute State the server for the same service of processing that memory database is made up of multiple web application servers Cluster.
In certain embodiments, it is described if it is not, in the memory database search be No have a page, including:The server is set by default Reverse Proxy Web application servers weight in cluster carries out reverse proxy to realize the server cluster Web application server load balancings;Obtain each web server in the server cluster Load;According to the load of each web server and weight in the server cluster by the page Face browse request is transferred to separate unit web application servers in the server cluster;Described Search whether there is the page in web application servers.
Second aspect, this application provides a kind of pseudo- static treatment device of page, receiving unit, It is configured to receive the page browsing request that user is sent by terminal, the page browsing request Including network address;Terminal attaching determining unit, is configured to determine the network fortune belonging to the terminal Seek business;Judging unit, is configured to judge the content distributing network clothes in the Virtual network operator The page that the network address is specified whether is cached with business device;Processing unit, is configured to:Response Judge to cache in the content delivery network service device of the Virtual network operator in the judging unit There is the page that the network address is specified, the page is directly returned into the terminal;In response to institute Judging unit is stated to judge not cache in the content delivery network service device of the Virtual network operator There is the page that the network address is specified, search whether there is the page in default memory database Face;If it is present the page is returned into the terminal, and the page is write into institute In the caching of content delivery network service device for stating Virtual network operator;If it does not exist, then institute State inquiry in database server and whether there is the page, and taken in response to the database There is the page in business device and the page is then returned into the terminal, or in response to the number The page is then obtained according to the network address according to the page is not present in the server of storehouse, and will be acquired The page return to the terminal.
In certain embodiments, processing unit is further configured to:In response to the data The page is not present in the server of storehouse the page is then obtained according to the network address, and will be acquired The page returns to the terminal, afterwards, the acquired page is write to the memory database and In the content delivery network service device of the Virtual network operator.
In certain embodiments, processing unit includes rendering module, and the rendering module configuration is used In:The data of the page are obtained according to the network address;According to the data of the page to described The page is rendered;The page after rendering is respectively written into the content distribution of the Virtual network operator The caching of the webserver is neutralized in the database server;The page after rendering is returned The terminal.
In certain embodiments, the processing unit is further configured to following steps and existed Inquiry whether there is the page in the database server, and in response to the database There is the page in server and the page is then returned into the terminal:When in the internal memory number During according to the page is not present in storehouse, the page is inquired about in the database server whether Do persistence;If the page does persistence, the page is write into the Virtual network operator Content delivery network service device caching in;In the content distributing network of the Virtual network operator The cache-time of the page is set in server;The page is returned into the terminal.
In certain embodiments, the memory database is to be provided to support by server cluster, Wherein described server cluster includes the multiple web application servers for handling same task.
In certain embodiments, processing unit includes searching modul, and the searching modul configuration is used Search whether there is the page in the memory database in as follows:By pre- If Reverse Proxy set the web application server weights in the server cluster to enter The web application server load balancings of the server cluster are realized in row reverse proxy;Obtain The load of each web server in the server cluster;According in the server cluster Each web server is loaded and page browsing request is transferred to the server set by weight Separate unit web application servers in group;Search whether there is institute in the web application servers State the page.
The pseudo- static treatment method and apparatus for the page that the application is provided, the net asked by user Content delivery network service device, the internal memory number of location respectively from the Virtual network operator belonging to user terminal Obtained according to the page searched in storehouse or database server specified by network address, or by above-mentioned network address To the object data of the page, the page is rendered according to object data, afterwards, the page terminal is returned into, Avoid each page browsing request from all entering Mobile state to render, reduce the load of database server.
Brief description of the drawings
Retouched by reading with reference to the detailed of being made to non-limiting example of being made of the following drawings State, other features, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow of one embodiment of the pseudo- static treatment method of the page according to the application Figure;
Fig. 3 is showing for an application scenarios of the pseudo- static treatment method of the page according to the application It is intended to;
Fig. 4 is the stream of another embodiment of the pseudo- static treatment method of the page according to the application Cheng Tu;
Fig. 5 is the structure of one embodiment of the pseudo- static treatment device of the page according to the application Schematic diagram;
Fig. 6 is adapted for for realizing the terminal device of the embodiment of the present application or the computer of server The structural representation of system.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is appreciated that , specific embodiment described herein is used only for explaining related invention, rather than to the hair Bright restriction.It also should be noted that, illustrate only for the ease of description, in accompanying drawing with About the related part of invention.
It should be noted that in the case where not conflicting, embodiment and embodiment in the application In feature can be mutually combined.Describe this in detail below with reference to the accompanying drawings and in conjunction with the embodiments Application.
Fig. 1, which is shown, can apply the pseudo- static treatment method or the puppet of the page of the page of the application The exemplary system architecture 100 of the embodiment of static treatment device.
As shown in figure 1, system architecture 100 can include terminal device 101, network 102, pipe Manage server 103, content distributing network (Content Delivery Network, CDN) service Device 104, memory database 105 and database server 106.Network 102 in terminal to set The standby medium that communication link is provided between 101 and management server 103.Network 102 can be wrapped Include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can with using terminal equipment 101 by network 102 and management server 103 with CDN server 104, memory database 105 and database server 106 are interacted, with Receive or send message etc..Various telecommunication customer end applications can be installed on terminal device 101, Such as application of web browser applications, searching class, JICQ, mailbox client, society Hand over platform software etc..
Terminal device 101 can be that the various electronics browsed with display screen and supported web page are set It is standby, including but not limited to smart mobile phone, tablet personal computer, pocket computer on knee and desk-top meter Calculation machine etc..
Management server 103 is used for the server that the page browsing request to user is managed, For example the backstage management of webpage that the webpage that terminal device 101 is asked provides service support is serviced Device.Backstage management of webpage server such as can ask the page browsing received to arrive at the data link CDN server 104, memory database 105 or database server 106 analyze etc. Reason, and result (such as Webpage data cached or page data) of after rendering is anti- Feed terminal device.
CDN server 104 is that one kind can be avoided being possible to influence data on internet as far as possible The bottleneck and link of transmission speed and stability, make the service faster, more stable of content transmission Device.
Memory database 105 is that data are placed on to the database directly operated in internal memory, to improve The stability and data-handling capacity and service ability of system, are that the page browsing request of user is carried For processing service.
Database server 106 provides service for the page request of user, and these services can be To the inquiry of collection of document, renewal, transaction management, index, query optimization, safe and multi-purpose Family access control etc..
It should be noted that the pseudo- static treatment method one for the page that the embodiment of the present application is provided As performed by management server 103, correspondingly, the pseudo- static treatment device of the page is typically set In management server 103.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only signal Property.According to needs are realized, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the one of the pseudo- static treatment method of the page according to the application is shown The flow 200 of individual embodiment.The pseudo- static treatment method of the described page, comprises the following steps:
Step 201, the page browsing request that user is sent by terminal is received.
In the present embodiment, the electronic equipment (example of the pseudo- static treatment method operation of the page thereon Management server as shown in Figure 1) wired connection mode or radio connection can be passed through Web page browsing, the terminal inquired about are carried out using it receive the accessing page request of user from user, Wherein, above-mentioned accessing page request includes the address that user expects the Webpage of access, i.e., Network address.In practice, network address typically by URL (Uniform Resource Locator, URL) represent.It is pointed out that above-mentioned radio connection can include but is not limited to 3G/4G connections, WiFi connections, bluetooth connection, WiMAX connections, Zigbee connections, UWB (ultra wideband) is connected and other currently known or exploitation in the future wireless connection sides Formula.
Generally, user accesses Webpage using the web browser installed in terminal, at this moment, User can be by directly inputting the chain in the webpage presented in network address or webpage clicking browser Fetch to server and initiate accessing page request.In the present embodiment, the above-mentioned page can include Html forms, xhtml forms, asp forms, php forms, jsp forms, shtml forms, The page of nsp forms, the webpage of xml forms or other following forms by exploitation.
Step 202, the Virtual network operator belonging to terminal is determined.
In the present embodiment, above-mentioned electronic equipment (such as the server shown in Fig. 1) can be from The Virtual network operator belonging to subscriber terminal equipment is determined in the information of the terminal device of user.This In, the information of terminal device can be the IP information of terminal device.Virtual network operator is to carry For 2G and the operation entity of above network service, wherein, network service can be mobile network Service and/or broadband network services.
Step 203, judge that network address whether is cached with the CDN server of Virtual network operator to be referred to The fixed page.
In the present embodiment, determine based on the network address obtained in step 201 and in step 202. The Virtual network operator belonging to terminal gone out, above-mentioned electronic equipment can first where user network Searched in the CDN server of operator specified by the network address that above-mentioned user is sent by terminal The page whether there is.If being cached with above-mentioned net in the CDN server of above-mentioned Virtual network operator The page that location is specified, directly returns to the caching page user of terminal device, the page of user Browse request terminates.Here, the CDN server of network yarn operator is used for the clothes for responding user Business request, and using GSLB technology pointed to the service request of user nearest from user Server working properly on, directly in response to the request of user in above-mentioned server.
Step 204, search whether there is the above-mentioned page in memory database, if it does, The above-mentioned page is then returned into terminal, and the page is write to the CDN server of Virtual network operator In caching.
In the present embodiment, the judged result based on step 203, if network fortune where user The page specified by above-mentioned network address is not deposited, it is necessary to judge in internal memory number in the CDN server for seeking business The page in being asked according to the page browsing in storehouse with the presence or absence of above-mentioned user specified by network address, if, There is the page specified by network address in above-mentioned memory database, the page is returned into user. Here, memory database can be to provide the database directly operated in internal memory, for example, redis Database, here, redis databases are that the use increased income an ANSI C language is write, propped up Hold network, can based on internal memory also can persistence log type, Key-Value databases.In internal memory There is the page specified by above-mentioned network address in database refers to the above-mentioned page in the form of static page It is cached in memory database.Judge signified with the presence or absence of above-mentioned network address in above-mentioned memory database The fixed page, can be searched by the given address of network address in memory database, can be with The above-mentioned page is judged whether by comparing the data cached ID of internal storage data place.
In some optional implementations of the present embodiment, above-mentioned memory database is by servicing Device cluster provides what is supported, wherein above-mentioned server cluster includes handling the multiple of same task Web application servers.Here, server cluster is made up of multiple web application servers, Unified management control is provided, same service is carried out, is a service from the point of view of client Device.It can carry out parallel computation to obtain using multiple web application servers in memory database Very high calculating speed is obtained, can also be backuped with multiple web application servers, so that Any one the web application server failure whole system supported is provided for memory database Or it can normally run, improve overall stability.The above-mentioned page is delayed in the form of static page It is stored in web application servers;Judge in memory database with the presence or absence of the page specified by network address Face, can be by judging whether be cached with the above-mentioned page in any of the above-described web application servers.
It is above-mentioned to be searched in memory database in some optional implementations of the present embodiment With the presence or absence of the above-mentioned page to be realized by following process:Pass through default Reverse Proxy Web application servers weight in server cluster is set to carry out reverse proxy to realize internal storage data Web application server load balancings in storehouse;Obtain in the server cluster for supporting memory database The load of each web server;User is sent according to the load of each web server and weight Page browsing request be transferred to separate unit web application servers in server cluster;Should in web With searching whether there is the above-mentioned page in server.Here, default Reverse Proxy connects The page browsing request sent by user, is then forwarded a request in above-mentioned server cluster Web application servers, and the result obtained from web application servers is returned into above-mentioned end End.Wherein, Reverse Proxy can be above-mentioned management server, can also be Nginx (" engine x ") loaded server, nginx is a high performance HTTP and reverse generation Manage server.
To ensure that the web application servers in above-mentioned server cluster can timely respond to user's hair The request sent, here it is possible to by judging the application clothes of each web in above-mentioned server cluster Business device weight and loading condition determine the web application services for responding above-mentioned page browsing request Device.As an example, the hyperlink request that can send user is small to loading, or weight is big In web application servers.
Step 205, inquiry whether there is the above-mentioned page in database server, and respond There is the above-mentioned page in database server and the page is then returned into terminal, or in response to data The above-mentioned page is not present in the server of storehouse the page is then obtained according to network address, and by the acquired page Return to terminal.
In the present embodiment, the result based on step 204, if be not present in memory database The above-mentioned page, above-mentioned electronic equipment can be inquired about in specified database server whether there is The above-mentioned page.Here, database server can be for the static page of storage, XML data Or binary stream data etc., the data with storage model can also be stored.In specified data Inquiry whether there is the above-mentioned page in the server of storehouse, can be cached in above-mentioned database server The regional search of static page whether there is the page specified by above-mentioned network address, if it is present The page is returned into above-mentioned terminal, if it does not, being taken by above-mentioned network address in above-mentioned database It is engaged in obtaining the page specified by network address in device, the page got is returned into above-mentioned terminal.It is above-mentioned The page can be the static page in buffer zone in database server, can also be model The binary data of data or other forms, above-mentioned electronic equipment is according to above-mentioned network address and database No. ID of data, gets the page specified by network address in server.
In some optional implementations of the present embodiment, above-mentioned electronic equipment is in response to data The above-mentioned page is not present in the server of storehouse, the page is obtained according to above-mentioned network address, and will be acquired The page returns to terminal, and afterwards, the acquired page is write to above-mentioned memory database and network In the CDN server of operator.The above-mentioned page is write to above-mentioned CDN server, it is right The page cache time in above-mentioned write-in CDN server is configured, response that can be to the page Header is unified to be set, when above-mentioned CDN server preserves page cache according to response header Between.
With continued reference to Fig. 3, Fig. 3 is the pseudo- static treatment method of the page according to the present embodiment One schematic diagram of application scenarios.User sends a current events first in Fig. 3 application scenarios The browse request of class webpage, user clicks " today's tops " in the web page browsing interface of terminal Asked as page browsing, it is defeated as indicated by the hand in Fig. 3-A, or in address input box Enter the network address of " today's tops " page, as shown in 301 in Fig. 3-A;Afterwards, management service Device searches the page specified by network address in the CDN server of the Virtual network operator where user; Because " today's tops " is the page paid close attention to by numerous users, in the Virtual network operator where user CDN server in be cached with the above-mentioned page, by the above-mentioned page return terminal, such as Fig. 3-B It is shown.
The method that above-described embodiment of the application is provided can be in CDN server, internal storage data The page specified by network address is obtained in storehouse and database server, it is to avoid each page of user Face browse request all needs dynamic to render, and reduces the load of server.
With further reference to Fig. 4, it illustrates another of the pseudo- static treatment method of page implementation The flow 400 of example.The flow 400 of the pseudo- static treatment method of the page, comprises the following steps:
Step 401, the page browsing request that user is sent by terminal is received.
In the present embodiment, the electronic equipment (example of the pseudo- static treatment method operation of the page thereon Management server as shown in Figure 1) wired connection mode or radio connection can be passed through Web page browsing, the terminal inquired about are carried out using it receive the accessing page request of user from user, Wherein, above-mentioned accessing page request includes the address that user expects the Webpage of access, i.e., Network address.
Step 402, the Virtual network operator belonging to terminal is determined.
In the present embodiment, above-mentioned electronic equipment can be from the information of the terminal device of user really Make the Virtual network operator belonging to subscriber terminal equipment.Here, the information of terminal device can be The IP information of terminal device.Virtual network operator is the fortune that can provide 2G and above network service Profit-oriented business entity, wherein, network service can be mobile network service and/or broadband network services.
Step 403, judge that network address whether is cached with the CDN server of Virtual network operator to be referred to The fixed page.
In the present embodiment, above-mentioned electronic equipment can first where user Virtual network operator The page specified by the network address for the transmission that above-mentioned user is searched in CDN server whether there is.Such as Fruit is cached with the page that above-mentioned network address is specified in the CDN server of above-mentioned Virtual network operator, directly The user that the caching page is returned to terminal device is met, the page browsing request of user terminates.
Step 404, search whether there is the above-mentioned page in memory database, if it does, The above-mentioned page is then returned into terminal, and the page is write to the CDN server of Virtual network operator In caching.
In the present embodiment, the judged result based on step 403, if network fortune where user The page specified by above-mentioned network address is not deposited, it is necessary to judge in internal memory number in the CDN server for seeking business According to the page that whether there is in storehouse specified by above-mentioned network address, if, in above-mentioned memory database There is the page specified by network address, the page is returned into user.Here, memory database can To be to provide the database directly operated in internal memory, for example, redis databases.
Step 405, inquiry whether there is the above-mentioned page in database server, and respond There is the above-mentioned page in database server and the page is then returned into terminal.
In the present embodiment, the result based on step 404, if be not present in memory database The above-mentioned page, above-mentioned electronic equipment can be inquired about in specified database whether there is above-mentioned page Face.Here, database server can be for the static page of storage, XML (Extensi-Nemau Lananage, extensible markup language) data or binary stream data etc., tool can also be stored There are the data of storage model.Wherein, database server can be mongoDB, here, MongoDB is write by C Plus Plus, it is intended to provide expansible high-performance data for web applications The database stored based on distributed document of storage solution.In above-mentioned database server Whether the regional search of the middle caching static page is cached with the page specified by above-mentioned network address, if The region of the caching static page is cached with the above-mentioned page in above-mentioned database server, then should The page returns to above-mentioned terminal.
Step 406, the page is rendered, the page after rendering returns to terminal.
In the present embodiment, if in above-mentioned database server the caching static page region In the absence of the above-mentioned page, above-mentioned electronic equipment is by above-mentioned network address in above-mentioned database server Obtain the page specified by network address.Here, above-mentioned electronic equipment is redirected to above-mentioned network address, The object data of the page specified by above-mentioned network address is got, by above-mentioned object data and existing Velocity templates are rendered to the page specified by above-mentioned network address, wherein, Velocity is one The individual template engine (template engine) based on java, it is allowed to which any user is only simple Quoted using template instruction (template language) by the object of java code definitions;Will The page after rendering is respectively written into the caching of the CDN server of Virtual network operator and neutralized in above-mentioned In deposit data storehouse, meanwhile, the page after rendering returns to the terminal.Wherein, after rendering The page write-in Virtual network operator CDN server after above-mentioned CDN server can also be set Cache-time work as information, and in record monitoring information.
In some optional implementations of the present embodiment, if in above-mentioned database server The above-mentioned page is not present in the region of the middle caching static page, and above-mentioned electronic equipment can also be in data Search whether the page specified by above-mentioned network address does persistence in the server of storehouse.If above-mentioned network address The specified page has completed persistence, and the page is written in above-mentioned database server and delayed In the region and memory database of depositing static page;The above-mentioned page is returned into terminal, and above-mentioned The above-mentioned persistence page is write in the caching of the CDN server of Virtual network operator, is set simultaneously The cache-time of CDN server, and record monitoring information.Above-mentioned persistence refers to protect data It is stored in Session sessions, then according to the configuration file of template and database server interactive access, Wherein, Session is that above-mentioned data are kept on Web server for being set at any time from any The standby upper page conducts interviews.Above-mentioned electronic equipment can be interacted directly with Session, be reduced straight Database server process is asked in receiving, reduces the load of database server.
Figure 4, it is seen that compared with the corresponding embodiments of Fig. 2, the page in the present embodiment The flow 400 of the pseudo- static treatment method in face is highlighted to when in above-mentioned CDN server and internal memory When the page specified by above-mentioned network address is not present in database, page object number is obtained by above-mentioned network address Rendered according to the page.Thus the mode that the scheme of the present embodiment description can more be enriched is real The page browsing request of existing user.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, the application is provided One embodiment of the pseudo- static treatment device of page a kind of, the device embodiment and Fig. 2 institutes The embodiment of the method shown is corresponding, and the device specifically can apply in various electronic equipments.
As shown in figure 5, the pseudo- static treatment device 500 of the page described in the present embodiment includes:
Receiving unit 501, terminal attaching determining unit 502, judging unit 503 and processing unit 504.Wherein, receiving unit 501 is configured to receive the page browsing that user is sent by terminal Request, wherein, above-mentioned page browsing request includes network address;Terminal attaching determining unit 502 is matched somebody with somebody Put for determining the Virtual network operator belonging to above-mentioned terminal;Judging unit 503 is configured to judge The page that above-mentioned network address is specified whether is cached with the CDN server of above-mentioned Virtual network operator; Processing unit 504 is configured to judge in above-mentioned network operation in response to above-mentioned judging unit 503 The page that above-mentioned network address is specified is cached with the CDN server of business, directly the above-mentioned page is returned to To above-mentioned terminal;Judge the CDN in above-mentioned Virtual network operator in response to above-mentioned judging unit 503 The page that above-mentioned network address is specified is not cached with server, is looked into default memory database Look for the presence or absence of the above-mentioned page;If it is present the above-mentioned page is returned into above-mentioned terminal, and In the caching for the CDN server that the above-mentioned page is write to above-mentioned Virtual network operator;If do not deposited , then inquiry whether there is the above-mentioned page in above-mentioned database server, and in response to upper State in database server and there is the above-mentioned page then by the above-mentioned terminal of above-mentioned page return, or ring The above-mentioned page should be not present in above-mentioned database server the page is then obtained according to above-mentioned network address, And the acquired page is returned into above-mentioned terminal.
In the present embodiment, the receiving unit 501 of the pseudo- static treatment device 500 of the page can be with Carry out the end of web page browsing using it from user by wired connection mode or radio connection End receives page browsing request, wherein, above-mentioned Page web page browse request includes user's expectation The address of the page browsed, i.e. network address.
In the present embodiment, the network address obtained based on receiving unit 501, above-mentioned terminal attaching is true Order member 502 can determine the network operation belonging to user's used terminal by end message Business.
In the present embodiment, judging unit 503 can where user Virtual network operator CDN The page specified by the network address for the transmission that above-mentioned user is searched in server whether there is.If The page that above-mentioned network address is specified is cached with above-mentioned Virtual network operator CDN server, directly will be slow The user that the page returns to terminal device is deposited, the page browsing request of user terminates.
In the present embodiment, whether above-mentioned processing unit 504 can be deposited in internal storage data library lookup Obtained in the above-mentioned page or by above-mentioned network address in above-mentioned database server specified by network address The page, above-mentioned terminal is returned by the page got.
In some optional implementations of the present embodiment, processing unit 504 is further configured For:The above-mentioned page is not present in response to database server then to be obtained according to above-mentioned network address The page, and the acquired page is returned into terminal, afterwards, the acquired page is write supreme In the CDN server for stating memory database and Virtual network operator.
In some optional implementations of the present embodiment, above-mentioned processing unit 504 includes wash with watercolours Module is contaminated, the rendering module is configured to:The data of the page are obtained according to above-mentioned network address;Root The page is rendered according to the data of the page;The page after rendering is respectively written into Virtual network operator CDN server caching neutralize database server in;The page after rendering is returned eventually End.
In some optional implementations of the present embodiment, above-mentioned processing unit is further configured For:When the above-mentioned page is not present in above-mentioned memory database, in database server Inquire about whether the page does persistence;If the above-mentioned page does persistence, the page is write In the caching of the CDN server of the Virtual network operator;In the CDN service of Virtual network operator The cache-time of the page is set in device;The above-mentioned page is returned into terminal.
In some optional implementations of the present embodiment, above-mentioned memory database is by servicing Device cluster provides what is supported, and wherein server cluster includes the multiple web for handling same task Application server.
In some optional implementations of the present embodiment, processing unit includes searching modul, Wherein, searching modul is configured to following steps and presence is searched whether in memory database The above-mentioned page:Web applications clothes in memory database are set by default Reverse Proxy Business device weight carries out reverse proxy to realize that the load of web application servers is equal in memory database Weighing apparatus;Obtain the load of each web server in memory database;According to each in memory database User Page browse request is transferred in memory database single by individual web server load and weight Platform web application servers;Search whether there is above-mentioned network address in above-mentioned web application servers The specified page.
The page browsing that the pseudo- static treatment device of the page in the present embodiment sends user is asked Respectively from the CDN server of the Virtual network operator belonging to user terminal, memory database or data Page cache is searched in the server of storehouse, it is to avoid each page browsing request is rendered with regard to dynamic, is reduced The load of database server.
Below with reference to Fig. 6, it illustrates suitable for for realizing the terminal device of the embodiment of the present application Or the structural representation of the computer system 600 of server.
As shown in fig. 6, computer system 600 includes CPU (CPU) 601, its Can according to the program being stored in read-only storage (ROM) 602 or from storage part 608 The program that is loaded into random access storage device (RAM) 603 and perform various appropriate actions And processing.In RAM 603, the system that is also stored with 600 operates required various program sums According to.CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input / output (I/O) interface 605 is also connected to bus 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.; Including cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc. Output par, c 607;Storage part 608 including hard disk etc.;And including such as LAN card, The communications portion 609 of the NIC of modem etc..Communications portion 609 is via such as The network of internet performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as disk, CD, magneto-optic disk, semiconductor memory etc., Be arranged on as needed on driver 610, in order to the computer program that reads from it according to Need to be mounted into storage part 608.
Especially, in accordance with an embodiment of the present disclosure, the process described above with reference to flow chart can be with It is implemented as computer software programs.For example, embodiment of the disclosure includes a kind of computer journey Sequence product, it includes being tangibly embodied in the computer program on machine readable media, the meter Calculation machine program bag, which contains, is used for the program code of the method shown in execution flow chart.Implement such In example, the computer program can be downloaded and installed by communications portion 609 from network, And/or be mounted from detachable media 611.In the computer program by CPU (CPU) during 601 execution, the above-mentioned functions limited in the present processes are performed.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, Architectural framework in the cards, function and the operation of method and computer program product.This point On, each square frame in flow chart or block diagram can represent a module, program segment or code A part, the part of the module, program segment or code is used for comprising one or more The executable instruction of logic function as defined in realizing.It should also be noted that being used as replacement at some In realization, the function of being marked in square frame can also be with different from the order marked in accompanying drawing hair It is raw.For example, two square frames succeedingly represented can essentially be performed substantially in parallel, they Sometimes it can also perform in the opposite order, this is depending on involved function.It is also noted that It is, each square frame in block diagram and/or flow chart and the square frame in block diagram and/or flow chart Combination, can be realized with the special hardware based system of defined function or operation is performed, Or can be realized with the combination of specialized hardware and computer instruction.
Being described in unit involved in the embodiment of the present application can be real by way of software It is existing, it can also be realized by way of hardware.Described unit can also be arranged on processing In device, for example, can be described as:A kind of processor includes receiving unit, terminal attaching and determined Unit, judging unit and processing unit.Wherein, the title of these units is under certain conditions simultaneously The restriction in itself to the unit is not constituted, for example, receiving unit is also described as " receiving The unit of the page browsing request of user ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, The nonvolatile computer storage media can be described in above-described embodiment included in device Nonvolatile computer storage media;Can also be individualism, without non-in supplying terminal Volatile computer storage medium.Above-mentioned nonvolatile computer storage media be stored with one or The multiple programs of person, when one or more of programs are performed by an equipment so that described Equipment:Receive the page browsing request that user is sent by terminal, the page browsing request bag Include network address;Determine the Virtual network operator belonging to the terminal;Judge in the Virtual network operator Whether the page that the network address specify is cached with content delivery network service device;If so, then The page is directly returned into the terminal;If it is not, in default memory database In search whether there is the page;If it is present the page is returned into the terminal, And write the page in the caching of content delivery network service device of the Virtual network operator; If it does not exist, then inquiry whether there is the page in specified database server, and And the page is then returned into the end in response to there is the page in the database server End, or in response to the page is not present in the database server then according to the network address The page is obtained, and the acquired page is returned into the terminal.
Above description is only the preferred embodiment of the application and saying to institute's application technology principle It is bright.It will be appreciated by those skilled in the art that invention scope involved in the application, is not limited In the technical scheme of the particular combination of above-mentioned technical characteristic, do not departed from while should cover yet In the case of the inventive concept, it is combined by above-mentioned technical characteristic or its equivalent feature Formed by other technical schemes.Such as features described above and (but not limited to) disclosed herein Technical characteristic with similar functions carries out technical scheme formed by replacement mutually.

Claims (12)

1. a kind of pseudo- static treatment method of page, it is characterised in that methods described includes:
The page browsing request that user is sent by terminal is received, the page browsing request includes Network address;
Determine the Virtual network operator belonging to the terminal;
Judge whether to be cached with the content delivery network service device of the Virtual network operator described The page that network address is specified;
If so, the page directly then is returned into the terminal;
If it is not, searching whether there is the page in default memory database;Such as Fruit is present, then the page is returned into the terminal, and the page is write into the network In the caching of the content delivery network service device of operator;If it does not exist, then in specified number It whether there is the page according to inquiry in the server of storehouse, and in response to the database server In there is the page page then returned into the terminal, or in response to the database The page is not present in server the page is then obtained according to the network address, and by acquired page Face returns to the terminal.
2. according to the method described in claim 1, it is characterised in that described in response to the number The page is then obtained according to the network address according to the page is not present in the server of storehouse, and will be acquired The page return to the terminal, afterwards, methods described also includes:The acquired page is write Into the content delivery network service device of the memory database and the Virtual network operator.
3. according to the method described in claim 1, it is characterised in that described in response to the number The page is then obtained according to the network address according to the page is not present in the server of storehouse, and will be acquired The page return to the terminal, including:
The data of the page are obtained according to the network address;
The page is rendered according to the data of the page;
The page after rendering is respectively written into the content delivery network service device of the Virtual network operator Caching neutralize in the database server;
The page after rendering returns to the terminal.
4. according to the method described in claim 1, it is characterised in that it is described if it does not, Then inquiry whether there is the page in the database server, and in response to the number The page is then returned into the terminal according to there is the page in the server of storehouse, including:
When the page is not present in the memory database, in the database server Whether the middle inquiry page does persistence;
If the page does persistence, the page is write to the content of the Virtual network operator In the caching of distribution network server;
The caching of the page is set in the content delivery network service device of the Virtual network operator Time;
The page is returned into the terminal.
5. according to the method described in claim 1, it is characterised in that the memory database is There is provided what is supported by server cluster, wherein the server cluster includes handling same task Multiple web application servers.
6. method according to claim 5, it is characterised in that it is described if it is not, Search whether there is the page in the memory database, including:
Web application clothes in the server cluster are set by default Reverse Proxy Business device weight carries out reverse proxy to realize that the web application servers of the server cluster are loaded It is balanced;
Obtain the load of each web server in the server cluster;
It is according to the load of each web server and weight in the server cluster that the page is clear Request of looking at is transferred to separate unit web application servers in the server cluster;
Search whether there is the page in the web application servers.
7. the pseudo- static treatment device of a kind of page, it is characterised in that described device includes:
Receiving unit, is configured to receive the page browsing request that user is sent by terminal, institute Stating page browsing request includes network address;
Terminal attaching determining unit, is configured to determine the Virtual network operator belonging to the terminal;
Judging unit, is configured to judge the content delivery network service in the Virtual network operator Whether the page that the network address specify is cached with device;
Processing unit, is configured to:
Judge the content delivery network service in the Virtual network operator in response to the judging unit The page that the network address is specified is cached with device, the page is directly returned into the terminal;
Judge the content delivery network service in the Virtual network operator in response to the judging unit The page that the network address is specified is not cached with device, being searched in default memory database is It is no to there is the page;If it is present the page returned into the terminal, and by institute In the caching for stating the content delivery network service device that the page writes the Virtual network operator;If no In the presence of, then inquired about in the database server and whether there is the page, and in response to There is the page in the database server and the page is then returned into the terminal, or Page is then obtained according to the network address in response to the page is not present in the database server Face, and the acquired page is returned into the terminal.
8. the pseudo- static treatment device of the page according to claim 7, it is characterised in that The processing unit is further configured to:
Then obtained in response to the database server in the absence of the page according to the network address The page is taken, and the acquired page is returned into the terminal, afterwards, the acquired page is write Enter into the content delivery network service device of the memory database and the Virtual network operator.
9. the pseudo- static treatment device of the page according to claim 7, it is characterised in that The processing unit includes rendering module, and the rendering module is configured to:
The data of the page are obtained according to the network address;
The page is rendered according to the data of the page;
The page after rendering is respectively written into the content delivery network service device of the Virtual network operator Caching neutralize in the database server;
The page after rendering returns to the terminal.
10. the pseudo- static treatment device of the page according to claim 7, it is characterised in that The processing unit is further configured to following steps and looked into the database server Ask and whether there is the page, and in response to there is the page in the database server The page is then returned into the terminal:
When the page is not present in the memory database, in the database server Whether the middle inquiry page does persistence;
If the page does persistence, the page is write to the content of the Virtual network operator In the caching of distribution network server;
The caching of the page is set in the content delivery network service device of the Virtual network operator Time;
The page is returned into the terminal.
11. the pseudo- static treatment device of the page according to claim 7, it is characterised in that The memory database is to be provided to support by server cluster, wherein the server cluster bag Include the multiple web application servers for handling same task.
12. the pseudo- static treatment device of the page according to claim 11, it is characterised in that The processing unit includes searching modul, and the searching modul is configured to following steps and existed Search whether there is the page in the memory database:
Web application clothes in the server cluster are set by default Reverse Proxy Business device weight carries out reverse proxy to realize that the web application servers of the server cluster are loaded It is balanced;
Obtain the load of each web server in the server cluster;
It is according to the load of each web server and weight in the server cluster that the page is clear Request of looking at is transferred to separate unit web application servers in the server cluster;
Search whether there is the page in the web application servers.
CN201610262573.0A 2016-04-25 2016-04-25 The pseudo- static treatment method and apparatus of the page Pending CN107305576A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610262573.0A CN107305576A (en) 2016-04-25 2016-04-25 The pseudo- static treatment method and apparatus of the page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610262573.0A CN107305576A (en) 2016-04-25 2016-04-25 The pseudo- static treatment method and apparatus of the page

Publications (1)

Publication Number Publication Date
CN107305576A true CN107305576A (en) 2017-10-31

Family

ID=60150931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610262573.0A Pending CN107305576A (en) 2016-04-25 2016-04-25 The pseudo- static treatment method and apparatus of the page

Country Status (1)

Country Link
CN (1) CN107305576A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786668A (en) * 2017-11-09 2018-03-09 成都知道创宇信息技术有限公司 A kind of weight caching web site method based on CDN
CN108780458A (en) * 2017-12-08 2018-11-09 深圳市大疆创新科技有限公司 A kind of page cache processing method, device and server
CN109815432A (en) * 2018-12-26 2019-05-28 北京博鳌纵横网络科技有限公司 A kind of method of the method and page static of whole station static
CN110555064A (en) * 2018-03-27 2019-12-10 中国人民财产保险股份有限公司 data service system and method for insurance business
CN111654741A (en) * 2019-03-04 2020-09-11 青岛海尔多媒体有限公司 Video data acquisition method and device, computer equipment and storage medium
CN111680239A (en) * 2020-04-14 2020-09-18 车智互联(北京)科技有限公司 Page display method
CN111767494A (en) * 2019-04-01 2020-10-13 广州精选速购网络科技有限公司 Commodity detail page linkage display method and system, electronic equipment and medium
CN113691590A (en) * 2021-07-28 2021-11-23 上海浦东发展银行股份有限公司 Static resource acquisition method, system, device, computer equipment and storage medium
CN111680239B (en) * 2020-04-14 2024-05-31 车智互联(北京)科技有限公司 Page display method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930034A (en) * 2012-11-09 2013-02-13 北京奇虎科技有限公司 Page loading system and page loading method
CN103428243A (en) * 2012-05-21 2013-12-04 阿里巴巴集团控股有限公司 Implementation method, device and system for static storage of dynamic webpage
CN103747072A (en) * 2013-12-30 2014-04-23 乐视网信息技术(北京)股份有限公司 Data reading and writing method and application server
CN104753966A (en) * 2013-12-25 2015-07-01 明博教育科技有限公司 Resource file inquiry method and system based on server and client caches
CN104965717A (en) * 2014-06-05 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for loading page

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428243A (en) * 2012-05-21 2013-12-04 阿里巴巴集团控股有限公司 Implementation method, device and system for static storage of dynamic webpage
CN102930034A (en) * 2012-11-09 2013-02-13 北京奇虎科技有限公司 Page loading system and page loading method
CN104753966A (en) * 2013-12-25 2015-07-01 明博教育科技有限公司 Resource file inquiry method and system based on server and client caches
CN103747072A (en) * 2013-12-30 2014-04-23 乐视网信息技术(北京)股份有限公司 Data reading and writing method and application server
CN104965717A (en) * 2014-06-05 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for loading page

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786668A (en) * 2017-11-09 2018-03-09 成都知道创宇信息技术有限公司 A kind of weight caching web site method based on CDN
CN108780458A (en) * 2017-12-08 2018-11-09 深圳市大疆创新科技有限公司 A kind of page cache processing method, device and server
CN110555064A (en) * 2018-03-27 2019-12-10 中国人民财产保险股份有限公司 data service system and method for insurance business
CN109815432A (en) * 2018-12-26 2019-05-28 北京博鳌纵横网络科技有限公司 A kind of method of the method and page static of whole station static
CN111654741A (en) * 2019-03-04 2020-09-11 青岛海尔多媒体有限公司 Video data acquisition method and device, computer equipment and storage medium
CN111767494A (en) * 2019-04-01 2020-10-13 广州精选速购网络科技有限公司 Commodity detail page linkage display method and system, electronic equipment and medium
CN111680239A (en) * 2020-04-14 2020-09-18 车智互联(北京)科技有限公司 Page display method
CN111680239B (en) * 2020-04-14 2024-05-31 车智互联(北京)科技有限公司 Page display method
CN113691590A (en) * 2021-07-28 2021-11-23 上海浦东发展银行股份有限公司 Static resource acquisition method, system, device, computer equipment and storage medium
CN113691590B (en) * 2021-07-28 2024-06-11 上海浦东发展银行股份有限公司 Static resource acquisition method, system, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107305576A (en) The pseudo- static treatment method and apparatus of the page
US7062756B2 (en) Dynamic object usage pattern learning and efficient caching
US11531715B2 (en) Systems and methods for single page application server-side renderer
US11194882B1 (en) Behavior based optimization for content presentation
US10003666B2 (en) Key resource prefetching using front-end optimization (FEO) configuration
CN110083616A (en) Page data processing method, device, equipment and computer readable storage medium
US9787795B2 (en) System for prefetching digital tags
US10339546B2 (en) Method and system that identify market segments and that facilitate targeted information distribution
US10091313B2 (en) Method and system for tracking web link usage
CN104052809B (en) A kind of flow-dividing control method and apparatus of website test
CN104426985B (en) Show the method, apparatus and system of webpage
CN106897336A (en) Web page files sending method, webpage rendering intent and device, webpage rendering system
CN110120917A (en) Method for routing and device based on content
CN103440276A (en) Method and device for improving webpage display speed
CN103502930A (en) Support for a new insert stream (ISTREAM) operation in complex event processing (CEP)
US20180324064A1 (en) Unobtrusive methods and systems for collecting information transmitted over a network
CN107329963A (en) Accelerate the method and apparatus of web page access
US11916729B2 (en) Automated configuration of a content delivery network
CN107679897A (en) A kind of security risk control method and device
Pande et al. Enhanced web application and browsing performance through service-worker infusion framework
WO2017124692A1 (en) Method and apparatus for searching for conversion relationship between form pages and target pages
CN107807937A (en) A kind of website SEO processing methods, apparatus and system
CN110020304A (en) A kind of method and apparatus of loading page
CN103716319B (en) A kind of apparatus and method of web access optimization
AU2014229063A1 (en) Use of method overrides for dynamically changing visible page content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171031