CN105278924B - Virtualize method for implementing page - Google Patents
Virtualize method for implementing page Download PDFInfo
- Publication number
- CN105278924B CN105278924B CN201410243561.4A CN201410243561A CN105278924B CN 105278924 B CN105278924 B CN 105278924B CN 201410243561 A CN201410243561 A CN 201410243561A CN 105278924 B CN105278924 B CN 105278924B
- Authority
- CN
- China
- Prior art keywords
- page
- data
- virtualization
- memcached
- parameter
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 238000012545 processing Methods 0.000 claims abstract description 9
- 238000012423 maintenance Methods 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 2
- 239000011800 void material Substances 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Abstract
The present invention relates to a kind of virtualization method for implementing page, its main feature is that: a unique identification Unique Key is defined for each virtualization page.Meanwhile being sent and being requested according to client, data are obtained from Memcached.Later, data are judged by program code, if being not sky, if it is empty direct output data is then further processed.Then, it is sent and is requested by SOA, the template for obtaining the page from database according to unique identification obtains data.Also, processing is merged to data, judges whether to need to store in Memcached according to page setting condition, returns to the data after merging, finally, virtualization website, which receives, parses combined data, output to client.As a result, from automatic operating is realized to the full extent, the human cost of project maintenance is reduced.The function change for meeting the virtualization page simultaneously, realizes new page Quick thread.Also, it reduces server to upload, improves system stability, can effectively meet the unified management of the virtualization page.
Description
Technical field
The present invention relates to a kind of Website page processing method more particularly to a kind of virtualization method for implementing page.
Background technique
Realize virtualization reason and background:
A) each web site item file is excessive, and project is excessive to need multiple developers to safeguard, waste of manpower at
This.
B) the continuous change of business function, demand is frequently online, and function is online not in time.
C) excessive upload causes the unstable of server.
D) Quick thread of new page.
E) management, monitoring, statistics to site page are improved.
About virtualization: virtualization is a broader term, and computing element is typically referred in terms of computer virtual
On the basis of rather than it is true on the basis of run, virtualization technology can expand the capacity of hardware, simplify matching again for software
Set process.
For a web site, virtualization is exactly a virtual page number, and the page of browser end passes through a system
It is presented to the user with postponing, is not requesting physical file (aspx) from server, but be use according to solicited message dynamic
Carry the page in family.
About nVelocity template engine, nVelocity is the template engine (template based on .NET
Engine).It allows anyone only simply to quote using template instruction (template language) by .NET code
The object of definition.
About Memcached distributed caching, Memcached is a high performance distributed memory target cache system
System, for Dynamic Web Applications to mitigate database loads.It reduces reading data by data cached in memory and object
The number in library, to improve dynamic, the speed of database-driven website.Memcached stores key/value pair based on one
hashmap.Its finger daemon (daemon) is to be write with C, but client can be write with any language, and be passed through
Memcached agreement is communicated with finger daemon.
About SOA, it is Services Oriented Achitecture (Service-Oriented Architecture, SOA), is
One component model, it is by the different function units (referred to as servicing) of application program by defining good connect between these services
Mouth and contract connect.Interface is defined by the way of neutral, it should put down independently of the hardware for service of realizing
Platform, operating system and programming language.A kind of unification and logical can be used in this service for construct in various systems
Mode interacts.
Summary of the invention
The object of the invention is to it is real to provide a kind of virtualization page in order to solve the above-mentioned problems in the prior art
Existing method.
The purpose of the present invention is achieved through the following technical solutions:
Virtualize method for implementing page comprising following steps: 1., for each virtualization page step defines one uniquely
Identify Unique Key.2., client sends request to step, and data are obtained from Memcached.3. step, passes through program generation
Code come judgment step 2. in data, if being not sky, if it is empty 4. direct output data enters step.Step 4., SOA
Request is sent, the template for obtaining the page from database according to unique identification obtains data.5., to data step merges place
Reason, judges whether to need to store in Memcached according to page setting condition, returns to the data after merging.6. step, virtualizes
Website (both having received the type string of data), which receives, parses combined data, output to client (both user browsers
Send the computer of request).
Above-mentioned virtualization method for implementing page, in which: the step 2. in, client sends request, and the request is logical
The .ashx file that proxy server is forwarded under virtualization website is crossed, (passes through .Net code Request.QueryString
[]) obtain url in parameter, dynamic generation cache key, according to caching key data, the number are obtained from Memcached
According to the html content for full page.
Further, above-mentioned virtualization method for implementing page, in which: the parameter includes that must pass parameter must pass with non-
Parameter, the parameter that must pass include page unique identification, affiliated project channel, and the non-parameter that must pass includes each page
The parameter in face, such as page hotel of hotel ID, scenic spot page scenic spot ID, city page city ID.
Further, above-mentioned virtualization method for implementing page, in which: the step 4. in, SOA is transmit a request to
Interface Station obtains the template of the page from database, template is carried out to split into individual module, using list according to unique identification
A module calls resolution component to obtain data from data source, and the template content is, in page entirety html frame and html
Hold, the resolution component is the program class libraries for Page Template and module merging treatment.
Further, above-mentioned virtualization method for implementing page, in which: the data source include database, interface,
One of Memcached or a variety of, it includes hotel's related resource library, scenic spot that the data-base content, which includes at least hotel,
Related resource library, air ticket related libraries, one of projects resource database or a variety of, the interface include at least items
The one or more of mesh SOA interface, http interface.
Still further, above-mentioned virtualization method for implementing page, in which: the step 5. in, according to page setting
Condition creates page data, and the page data includes cache-time field, unit minute, merges place to page data
After reason, according to unique identification, inquire whether this cache-time is greater than 0, if value is greater than 0, then it represents that this data, which needs to store, to be arrived
In Memcached, otherwise do not store.
The advantages of technical solution of the present invention, is mainly reflected in: by defining a unique identification for each virtualization page,
Data are judged by program code, merge processing, enable virtualization website that the data of needs are transferred to client.This
Sample reduces the human cost of project maintenance from automatic operating is realized to the full extent.Meanwhile, it is capable to meet virtualization page
The function in face changes, and realizes new page Quick thread.Also, rely on the phase of load-balanced server with all kinds of proxy servers
Mutually cooperation, data after the completion can be transmitted accurately and quickly, reduce server and upload, improve system stability.Thereby, it is possible to
Effectively meet the unified management of the virtualization page.
Detailed description of the invention
Fig. 1 is that the virtualization page realizes schematic diagram.
Fig. 2 is virtualization frame schematic diagram.
Specific embodiment
Virtualization method for implementing page as shown in Figure 1 and Figure 2, unusual place are the following steps are included: first
First, a unique identification Unique Key is defined for each virtualization page.Later, client sends request, from Memcached
Middle acquisition data.During this period, client sends request, which is forwarded under virtualization website by proxy server
.ashx file obtains the parameter in url by .Net code Request.QueryString [], and dynamic generation caches key,
Data are obtained from Memcached according to caching key, data are the html content of full page.Meanwhile parameter includes that must pass ginseng
It is several to pass parameter with non-, specifically from the point of view of, must pass parameter includes, page unique identification, affiliated project channel.It is corresponding to be,
The non-parameter that must pass used includes the parameter of each page, such as page hotel of hotel ID, scenic spot page scenic spot ID, city page
Face city ID.
Then, by program code come the data in previous step, if being not sky, direct output data, if it is empty,
Into subsequent step.In order to effectively combine the processing of computer program to need, the program code of use is Net program code
string.IsNullOrWhiteSpace()。
Then, it is sent and is requested by SOA, the template for obtaining the page from database according to unique identification obtains data.Knot
From the point of view of closing actual use situation of the invention, SOA transmit a request to Interface Station, and according to unique identification, page is obtained from database
The template in face carries out template to split into individual module.Meanwhile resolution component is called to obtain from data source using individual module
Data.For the ease of data processing, the template content that uses is page entirety html frame and html content, and resolution component is
Program class libraries for Page Template and module merging treatment.Also, in view of the needs of virtualization page actual treatment, data
Source includes one of database, interface, Memcached or a variety of.In order to meet maximized data processing needs, data
It includes hotel's related resource library, scenic spot related resource library, air ticket related libraries, projects resource data that library content, which includes at least hotel,
One of library or a variety of.Furthermore, it is contemplated that cooperation subsequent software reads the smooth of data, and interface includes at least projects
The one or more of SOA interface, http interface.
Then, processing is merged to data, judges whether to need to store in Memcached according to page setting condition,
Return to the data after merging.In view of a preferred embodiment of the present invention, page data is created according to page setting condition.Tool
For body, page data includes cache-time field, unit minute.After merging processing to page data, according to unique
Mark, inquires whether this cache-time is greater than 0, if value is greater than 0, then it represents that this data needs to store into Memcached, no
It does not store then.Meanwhile in order to carry out storage screening appropriate, unnecessary data garbage is avoided the occurrence of, storing its condition is, number
According to the not high page of real-time, such as the seo page, the thematic page, some static pages.Storage condition is not that real-time is higher
The page, such as the price page, bulletin page.
Finally, virtualization website, which receives, parses combined data, output to client.In entire implementation process, solution
Analysing data type involved in combined data is String, and client is the electricity that the most common user browser sends request
Brain.
As shown in Fig. 2, in practical application, all kinds of requests of user can be received using load-balanced server, and
It is allocated, request is distributed in virtualized server by all kinds of proxy servers and carries out deployment process, ultimately generates void
Quasi-ization website.
It can be seen that after applying the present invention by above-mentioned character express, by defining one for each virtualization page
Unique identification judges data by program code, merges processing, enables virtualization website that the data of needs are transferred to visitor
Family end.In this way, reducing the human cost of project maintenance from automatic operating is realized to the full extent.Meanwhile, it is capable to meet void
The function of the quasi-ization page changes, and realizes new page Quick thread.Also, rely on load-balanced server and all kinds of agency services
The mutual cooperation of device, data after the completion can be transmitted accurately and quickly, reduce server and upload, improve system stability.By
This, can effectively meet the unified management of the virtualization page.
Claims (4)
1. virtualizing method for implementing page, it is characterised in that the following steps are included:
1., for each virtualization page step defines a unique identification Unique Key;
2., client sends request to step, which is forwarded to the .ashx file under virtualization website by proxy server,
The parameter in url is obtained, dynamic generation caches key, data is obtained from Memcached according to caching key, the data are
The html content of full page;
Step 3., by program code come judgment step 2. in data, if for sky, direct output data, if it is empty,
It enters step 4.;
4., SOA transmit a request to Interface Station to step, and according to unique identification, the template of the page is obtained from database, by template into
Row splits into individual module, calls resolution component to obtain data from data source using individual module, and the template content is,
Page entirety html frame and html content, the resolution component is the program class for Page Template and module merging treatment
Library;
5., to data step merges processing, judge whether to need to store in Memcached according to page setting condition, return
Bout and after data;
6., virtualization website receives parses combined data to step, output to client.
2. virtualization method for implementing page according to claim 1, it is characterised in that: the parameter includes that must pass parameter
Parameter must be passed with non-, the parameter that must pass includes page unique identification, affiliated project channel, and the non-parameter that must pass includes
Page hotel of hotel ID, scenic spot page scenic spot ID, the city page city ID of each page.
3. virtualization method for implementing page according to claim 1, it is characterised in that: the data source includes data
One of library, interface, Memcached or a variety of, it includes hotel's correlation money that the data-base content, which includes at least hotel,
Source library, scenic spot related resource library, air ticket related libraries, one of projects resource database or a variety of, described is interfaced to
It less include the one or more of projects SOA interface, http interface.
4. virtualization method for implementing page according to claim 1, it is characterised in that: the step 5. in, according to page
Face, which imposes a condition, creates page data, and the page data includes cache-time field, unit minute, is carried out to page data
After merging treatment, according to unique identification, inquire whether this cache-time is greater than 0, if value is greater than 0, then it represents that this data needs
It stores in Memcached, does not otherwise store.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410243561.4A CN105278924B (en) | 2014-06-04 | 2014-06-04 | Virtualize method for implementing page |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410243561.4A CN105278924B (en) | 2014-06-04 | 2014-06-04 | Virtualize method for implementing page |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105278924A CN105278924A (en) | 2016-01-27 |
CN105278924B true CN105278924B (en) | 2019-01-01 |
Family
ID=55147992
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410243561.4A Active CN105278924B (en) | 2014-06-04 | 2014-06-04 | Virtualize method for implementing page |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105278924B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106096064A (en) * | 2016-07-19 | 2016-11-09 | 百度在线网络技术(北京)有限公司 | For the method and apparatus generating the page |
CN111083108A (en) * | 2019-11-14 | 2020-04-28 | 北京字节跳动网络技术有限公司 | Data processing method, device, medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110153722A1 (en) * | 2009-12-23 | 2011-06-23 | Akshat Choudhary | Systems and methods for policy based transparent client ip insertion |
CN102662993A (en) * | 2012-03-14 | 2012-09-12 | 北京神州数码思特奇信息技术股份有限公司 | A method for providing page data |
-
2014
- 2014-06-04 CN CN201410243561.4A patent/CN105278924B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110153722A1 (en) * | 2009-12-23 | 2011-06-23 | Akshat Choudhary | Systems and methods for policy based transparent client ip insertion |
CN102662993A (en) * | 2012-03-14 | 2012-09-12 | 北京神州数码思特奇信息技术股份有限公司 | A method for providing page data |
Non-Patent Citations (1)
Title |
---|
Killer Java applications server with nginx and memcached;Francisco Souza;《https://f.souza.cc/2010/12/killer-java-applications-server-with.html》;20101212;说明书第1页第1段-第6页第3段及其中代码 |
Also Published As
Publication number | Publication date |
---|---|
CN105278924A (en) | 2016-01-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sriraman et al. | Accelerometer: Understanding acceleration opportunities for data center overheads at hyperscale | |
CN104573025B (en) | A kind of method and system improving page loading velocity | |
KR20200087259A (en) | Auto-scaling the host machine learning model for production inference | |
JP6356273B2 (en) | Batch optimized rendering and fetch architecture | |
Jindal et al. | Function delivery network: Extending serverless computing for heterogeneous platforms | |
CN104601408B (en) | Website data statistics and analysis method and system for non-open network environment | |
CN109933317B (en) | Point burying method, device, server and readable storage medium | |
CN104391868A (en) | Staticizing device and method for dynamic page | |
US10411977B2 (en) | Visualization of workload distribution on server resources | |
Rodero et al. | Grid broker selection strategies using aggregated resource information | |
Sun et al. | A spark-based big data platform for massive remote sensing data processing | |
CN109726004A (en) | A kind of data processing method and device | |
Xu et al. | Making real time data analytics available as a service | |
US9197716B2 (en) | Pre-fetching resources by predicting user actions | |
EP2808792B1 (en) | Method and system for using arbitrary computing devices for distributed data processing | |
Li et al. | Analysis of NUMA effects in modern multicore systems for the design of high-performance data transfer applications | |
CN105278924B (en) | Virtualize method for implementing page | |
CN103106261A (en) | Distributed query method based on narrow-band cloud data service | |
Gropengießer et al. | Database backend as a service: automatic generation, deployment, and management of database backends for mobile applications | |
CN108737485A (en) | For the method and system of the operation of Internet of Things resource | |
CN107943591A (en) | A kind of method of more host processes management based on linux | |
CN110971928B (en) | Picture identification method and related device | |
Gorton | Hyperscalability–the changing face of software architecture | |
US11275812B2 (en) | Realtime feedback-based web resource management and optimization system | |
Chandrashekhar et al. | Balancing of Web Applications Workload Using Hybrid Computing (CPU–GPU) Architecture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210326 Address after: No. 699-1 Xuanwu Avenue, Xuanwu District, Nanjing City, Jiangsu Province, 210008 Patentee after: Tongcheng Datang Huizhi network technology Nanjing Co.,Ltd. Address before: 215021 Building 5, creative industry park, 328 Xinghu street, Suzhou Industrial Park, Jiangsu Province Patentee before: TONGCHENG NETWORK TECHNOLOGY Co.,Ltd. |
|
TR01 | Transfer of patent right |