CN103747030A - Nginx server intelligent cache method based on improved particle swarm optimization - Google Patents

Nginx server intelligent cache method based on improved particle swarm optimization Download PDF

Info

Publication number
CN103747030A
CN103747030A CN201310672250.5A CN201310672250A CN103747030A CN 103747030 A CN103747030 A CN 103747030A CN 201310672250 A CN201310672250 A CN 201310672250A CN 103747030 A CN103747030 A CN 103747030A
Authority
CN
China
Prior art keywords
server
cache
nginx
nginx server
intelligent
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
CN201310672250.5A
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.)
IEIT Systems Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201310672250.5A priority Critical patent/CN103747030A/en
Publication of CN103747030A publication Critical patent/CN103747030A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a cache method and especially relates to a Nginx server intelligent cache method based on improved particle swarm optimization. According to the Nginx server intelligent cache method based on the improved particle swarm optimization, an intelligent cache is parallelly added on the basis of not influencing original caching technology and efficiency of a Nginx server, thereby improving the efficiency of the Nginx server on the basis of the prior art of the Nginx server, and reducing server overhead to a greater degree.

Description

一种基于改进的粒子群算法的Nginx服务器智能缓存方法An intelligent caching method for Nginx server based on improved particle swarm optimization algorithm

技术领域 technical field

本发明涉及一种缓存方法,特别涉及一种基于改进的粒子群算法的Nginx服务器智能缓存方法。 The invention relates to a caching method, in particular to an intelligent caching method for an Nginx server based on an improved particle swarm algorithm.

背景技术 Background technique

Nginx现有的缓存技术是在客户端访问了服务器之后将访问过的静态资源保存,下次访问相关内容可直接引用,在有限程度上提高了效率,降低了服务器的负载。 Nginx's existing caching technology is to save the accessed static resources after the client accesses the server, and the relevant content can be directly referenced next time, which improves efficiency to a limited extent and reduces the load on the server.

传统的缓存技术存在很多缺陷,比如:不支持带参数的动态链接,比如read.php?id=1,Nginx服务器对其只保存文件名,所以这个链接只能保存为read.php,这样用户访问read.php?id=3时会返回不正确的结果。另外一个缺陷:Nginx服务器内部没有缓存过期和清理的任何机制,这些缓存的文件会永久性地保存在硬盘上,如果要缓存的东西非常多,那就会占据所有的硬盘空间。为此可以使用一个shell脚本定期清理,同时可以撰写php等动态程序来做实时更新。传统缓存只能存200状态码,因此后端返回301/302/404等状态码都不会缓存,假如恰好有一个访问量很大的伪静态链接被删除,那就会不停穿透导致后端承载不小压力。Nginx服务器不会自动选择内存或硬盘作为存储介质,一切由配置决定。 There are many defects in the traditional caching technology, for example: it does not support dynamic links with parameters, such as read.php?id=1, the Nginx server only saves the file name, so this link can only be saved as read. read.php?id=3 will return incorrect results. Another defect: there is no mechanism for cache expiration and cleaning inside the Nginx server. These cached files will be permanently stored on the hard disk. If there are a lot of things to be cached, it will take up all the hard disk space. For this reason, a shell script can be used to clean up regularly, and dynamic programs such as php can be written to do real-time updates. The traditional cache can only store 200 status codes, so status codes such as 301/302/404 returned by the backend will not be cached. If a pseudo-static link with a large number of visits happens to be deleted, it will continue to penetrate and cause subsequent The end bears a lot of pressure. The Nginx server will not automatically select the memory or hard disk as the storage medium, everything is determined by the configuration.

发明内容 Contents of the invention

为了解决现有技术的问题,本发明提供了一种基于改进的粒子群算法的Nginx服务器智能缓存方法,该缓存技术是在不影响Nginx服务器原有缓存技术和效率的基础上并行增加的一个智能缓存,其在Nginx服务器现有技术的基础上提高了Nginx服务器的效率,更大程度的降低了服务器的开销。 In order to solve the problems of the prior art, the invention provides a kind of Nginx server intelligent caching method based on the improved particle swarm optimization algorithm, and this caching technology is an intelligent caching method added in parallel on the basis of not affecting the original caching technology and efficiency of the Nginx server. Cache, which improves the efficiency of the Nginx server on the basis of the existing technology of the Nginx server, and reduces the overhead of the server to a greater extent.

本发明所采用的技术方案如下: The technical scheme adopted in the present invention is as follows:

一种基于改进的粒子群算法的Nginx服务器智能缓存方法,是在不影响原Nginx服务器缓存的基础上并行增加一个智能缓存,所述的智能缓存是根据粒子群算法获得,在Nginx服务器代理情况下去访问服务器资源,并根据经验、人为设定参数优化搜索结果从而将最容易访问到的资源保存在该智能缓存中。  A kind of Nginx server intelligent caching method based on the improved particle swarm optimization algorithm is to increase an intelligent cache in parallel on the basis of not affecting the original Nginx server cache. Access server resources, and optimize search results based on experience and artificially set parameters to save the most accessible resources in the smart cache. the

Nginx服务器端收到客户端传来的访问请求,经过验证合法后,先到原Nginx服务器缓存中检索,如果找不到再到所述的智能缓存中查找,同时去相应服务器中获取,如果能找到资源就返回资源,中断去服务器访问的连接,如果在所述的智能缓存中找不到也不会影响正常访问服务器。 After receiving the access request from the client, the Nginx server will first retrieve it from the cache of the original Nginx server after it is verified to be legal. When the resource is found, the resource is returned, and the connection to the server is interrupted. If it is not found in the smart cache, it will not affect the normal access to the server.

智能缓存是根据参数的改进的粒子群算法寻找最容易被访问的服务器资源。 Intelligent caching is based on the improved particle swarm algorithm of parameters to find the most accessible server resources.

Nginx服务器端在响应请求阶段挂着回调函数。 The Nginx server hangs a callback function during the phase of responding to the request.

Nginx服务器端在启动之后即申请缓存,连接服务器。 After the Nginx server is started, it applies for the cache and connects to the server.

智能缓存跟随Ngnix服务器端启动就申请了空间,对智能缓存设定自动清理阈值,对低优先级的资源及时进行清理。 The smart cache applies for space following the startup of the Ngnix server, sets an automatic cleaning threshold for the smart cache, and cleans up low-priority resources in a timely manner.

智能缓存不但缓存了静态资源,也缓存了部分常用的动态资源。 Smart caching not only caches static resources, but also caches some commonly used dynamic resources.

原Nginx服务器缓存与智能缓存之间采用了并行技术,在智能缓存找不到资源的情况下不会影响原Nginx服务器缓存去后台服务获取资源的效率,在大并发的情况下,智能缓存会降低速度让出更多的资源给Nginx服务器主进程。 The parallel technology is used between the original Nginx server cache and the smart cache. When the smart cache cannot find resources, it will not affect the efficiency of the original Nginx server cache to obtain resources from the background service. In the case of large concurrency, the smart cache will reduce The speed gives up more resources to the main process of the Nginx server.

本发明实现的原理如下: The principle that the present invention realizes is as follows:

1、在ngx_http_parse_request_line()返回NGX_OK之后,说明这个http请求是合法的,通过判断该返回值,nginx_http_parse_header_line()返回NGX_HTTP_HEADER_DONE的时候说明所有请求头已经处理完,本专利的回调函数在此阶段之后的handler模块调用,该功能在此开始运行,并行分析请求头的内容并在缓存中进行检索,在此静态资源会到缓存的静态区检索,动态资源会去动态区检索,缓存的内容包括如表1所示,当返回的内容比nginx的handler模块的本身返回的快的时候将直接作为相应数据返回给客户端,本身的检索中止。 1. After ngx_http_parse_request_line() returns NGX_OK, it means that the http request is legal. By judging the return value, when nginx_http_parse_header_line() returns NGX_HTTP_HEADER_DONE, it means that all request headers have been processed. The callback function of this patent is the handler after this stage Module call, this function starts to run here, analyzes the content of the request header in parallel and retrieves it in the cache, where the static resources will be retrieved in the static area of the cache, and the dynamic resources will be retrieved in the dynamic area. The contents of the cache include Table 1 As shown, when the returned content is faster than the nginx handler module itself, it will be directly returned to the client as the corresponding data, and its own retrieval will be terminated.

  the

Figure 316479DEST_PATH_IMAGE002
Figure 316479DEST_PATH_IMAGE002

表1 算法参数简介 Table 1 Introduction to Algorithm Parameters

2、初始化模块,申请缓存空间和硬盘存储位置,改进的粒子群算法启动,初始化该算法并跟后台服务器建立socket连接,算法根据设定的参数去各个服务器获取资源,算法的权值和学习次数可以被设定,如果在学习一定次数之后不收敛则重新初始化。 2. Initialize the module, apply for cache space and hard disk storage location, start the improved particle swarm optimization algorithm, initialize the algorithm and establish a socket connection with the background server, the algorithm goes to each server to obtain resources according to the set parameters, the weight of the algorithm and the number of learning times Can be set to reinitialize if it does not converge after a certain number of learnings.

3、智能获取模块,算法初始化之后,与后台的服务器建立连接,然后在各个服务器上进行资源的搜索,智能学习算法在此的作用是优化搜索,根据人为设定的参数和权值,将服务器上的资源进行分类,比如:一个网站的各个页面的动态显示,优先级最高;筛选内容则根据经验值进行筛选,优先级次之,将获取的资源分类存放。 3. The intelligent acquisition module, after the algorithm is initialized, establishes a connection with the back-end server, and then searches for resources on each server. The function of the intelligent learning algorithm here is to optimize the search. Classify the resources on the website, for example: the dynamic display of each page of a website has the highest priority; the screening content is screened according to the experience value, and the priority is second, and the obtained resources are classified and stored.

4、高速检索模块:缓存资源的存放是通过分类和索引的形式存放,在检索资源的时候根据分类逐级查询,在此最底层具体用到的算法是二分查找法,使用简单并且速度快,不需要复杂的数据结构。查找结果进行组装(和请求消息一致),一般在动态情景下比Nginx的缓存快,在静态资源Nginx查找不到的情况下,能很快返回结果。 4. High-speed retrieval module: The storage of cache resources is stored in the form of classification and indexing. When retrieving resources, they are queried step by step according to classification. The algorithm used at the bottom layer is binary search method, which is easy to use and fast. No complex data structures are required. The search results are assembled (consistent with the request message), which is generally faster than Nginx's cache in dynamic scenarios, and can return results quickly when static resources cannot be found by Nginx.

5、Nginx启动的时候该功能的智能获取模块就开始工作,根据常见的访问经验给智能学习算法设定了初始化条件,这些条件会定期的根据用户访问进行更新。主动连接后台服务器之后,由于服务器的数量是有限的,所以对能连接到的服务器同时进行资源的智能获取,也就是在每个服务器上都运行检索功能。根据设定的迭代次数,收敛最快的资源将被获取到缓存内。 5. When Nginx is started, the intelligent acquisition module of this function starts to work. According to the common access experience, the initialization conditions are set for the intelligent learning algorithm, and these conditions will be updated regularly according to user access. After actively connecting to the background server, since the number of servers is limited, intelligent resource acquisition is performed on the servers that can be connected at the same time, that is, the retrieval function is run on each server. According to the set number of iterations, the resource with the fastest convergence will be acquired into the cache.

6、支持缓存动态资源,根据http请求头的内容将和认为设定的访问url把服务器的资源获取到缓存中进行保存,跟传统的缓存不同之处在于,该缓存保存了http请求的所有关键内容和详细的响应数据,从而在很多情况下Nginx去链接服务器并等待服务器执行脚本语言甚至链接数据库然后响应,在一定程度上提高了Nginx服务器的服务效率。 6. Support caching of dynamic resources. According to the content of the http request header and the set access url, the resources of the server are obtained and stored in the cache. The difference from the traditional cache is that the cache stores all the keys of the http request. Content and detailed response data, so that in many cases Nginx connects to the server and waits for the server to execute the script language or even connect to the database and then respond, which improves the service efficiency of the Nginx server to a certain extent.

本发明具有以下特点: The present invention has the following characteristics:

1、在Nginx源码基础上进行修改,添加的回调函数; 1. Modify the Nginx source code and add a callback function;

2、用户可以根据配置文件修改配置参数; 2. Users can modify the configuration parameters according to the configuration file;

3、能够更大程度的提高访问速度、降低服务器的负载; 3. It can increase the access speed to a greater extent and reduce the load on the server;

4、该智能缓存有实时的清理功能,根据设定的阈值将优先级低的资源及时清理。 4. The intelligent cache has a real-time cleaning function, and the resources with low priority will be cleaned up in time according to the set threshold.

本发明提供的技术方案带来的有益效果是: The beneficial effects brought by the technical scheme provided by the invention are:

本发明是在现有Nginx服务器的原始缓存基础上增加一个平行的智能缓存,该智能缓存思想有点类似于网络蜘蛛的功能,但是又不是固定的去取资源而是通过学习优化再决定取哪些内容,从而在有限的服务器之间,获取优先级高的资源,与传统的缓存不同之处在于,该智能缓存能够保存动态资源,客户端带参数访问的资源也可以获取到缓存内,供客户端访问。在Nginx服务器缓存现有技术的基础上提高了Nginx服务器的工作效率,更大程度的降低了服务器的开销。 The present invention is to add a parallel intelligent cache on the basis of the original cache of the existing Nginx server. The idea of this intelligent cache is somewhat similar to the function of a web spider, but it is not fixed to fetch resources but decides which content to fetch by learning and optimizing. , so that resources with high priority can be obtained among limited servers. The difference from traditional caches is that this intelligent cache can save dynamic resources, and resources accessed by clients with parameters can also be obtained in the cache for the client access. On the basis of the existing technology of Nginx server caching, the work efficiency of Nginx server is improved, and the overhead of the server is reduced to a greater extent.

附图说明 Description of drawings

图1为本发明的一种基于改进的粒子群算法的Nginx服务器智能缓存方法的原理架构图; Fig. 1 is a kind of principle architecture diagram of the Nginx server intelligent caching method based on the improved particle swarm algorithm of the present invention;

图2为本发明的一种基于改进的粒子群算法的Nginx服务器智能缓存方法的算法原理图。 Fig. 2 is an algorithm schematic diagram of a kind of Nginx server intelligent caching method based on the improved particle swarm optimization algorithm of the present invention.

具体实施方式 Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。 In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

实施例一 Embodiment one

附图1 是该智能缓存工作的原理架构图,此功能是加入到Nginx请求处理之后的handler模块的并行功能,根据检测到的Nginx服务器运行状态来判断是否申请缓存和链接服务器,Nginx服务器启动以后就主动去连接后台服务器,检测服务器的状态和可用资源,根据智能学习算法查找资源,并返回到当前的缓存中,通过判断有没有客户端的请求来决定是否检索缓存中的资源。 Attached Figure 1 is a schematic diagram of the working principle of the smart cache. This function is a parallel function of the handler module added to the Nginx request processing. According to the detected running status of the Nginx server, it is judged whether to apply for the cache and connect to the server. After the Nginx server is started Take the initiative to connect to the background server, detect the status of the server and available resources, search for resources according to the intelligent learning algorithm, and return to the current cache, and determine whether to retrieve the resources in the cache by judging whether there is a request from the client.

函数流程如下: The function flow is as follows:

#Define Ngx_CSIZE 4096 #Define Ngx_CSIZE 4096

Ngx_Clever_Cache(ngx_string *info) Ngx_Clever_Cache(ngx_string *info)

{

    if (NGX_ON==status) if (NGX_ON==status)

       { {

           Pcache=pcalloc(Ngx_CSIZE); Pcache=pcalloc(Ngx_CSIZE);

           Initial(sys);//初始化系统参数 Initial(sys);//Initialize system parameters

        } }

    If (NULL!=*info) If (NULL!=*info)

       { {

         Handler(*info) Handler(*info)

         Return Search(Pcache)                 } Return Search(Pcache) }

} }

如附图2所示,本实施例应用的是一种改进的粒子群优化算法(PSO)检索优先级最高的服务器资源,算法原型:一群鸟在随机搜索食物。在这个区域里只有一块食物。所有的鸟都不知道食物在哪里。但是他们知道当前的位置离食物还有多远。那么找到食物的最优策略是什么呢。最简单有效的策略就是搜寻目前离食物最近的鸟的周围区域。 As shown in Figure 2, this embodiment uses an improved particle swarm optimization algorithm (PSO) to retrieve server resources with the highest priority. The algorithm prototype: a group of birds are randomly searching for food. There is only one piece of food in this area. All birds don't know where the food is. But they know how far away the food is from their current location. So what is the optimal strategy for finding food. The simplest and most effective strategy is to search the area around the bird that is currently closest to food.

PSO 初始化为一群随机粒子,每个优化问题的解都是搜索空间中的一只鸟。我们称之为“粒子”。所有的例子都有一个由被优化的函数决定的适应值(fitness value),每个粒子还有一个速度决定他们飞翔的方向和距离。然后粒子们就追随当前的最优粒子在解空间中搜索,本专利中将PSO进行了改进,在原有参数的基础上添加了经验值,使得每个粒子有了记忆功能,这样会降低收敛的迭代次数。经验值是达到最优的粒子在运行过程中产生的,可以共享给离它最近的粒子,以此类推。 PSO is initialized as a swarm of random particles, and the solution to each optimization problem is a bird in the search space. We call them "particles". All examples have a fitness value determined by the function being optimized, and each particle also has a velocity that determines the direction and distance they fly. Then the particles follow the current optimal particle to search in the solution space. In this patent, PSO is improved, and experience values are added on the basis of the original parameters, so that each particle has a memory function, which will reduce the convergence rate. number of iterations. The experience value is generated during the operation of the optimal particle, which can be shared with the nearest particle, and so on.

改进后的PSO公式如下: The improved PSO formula is as follows:

Experience=1 Experience=1

 v[] = v[] + [c1 * rand() * (pbest[] - present[]) + c2 * rand() * (gbest[] - present[]) ]*Experience  present[] = persent[] + v[]  v[] = v[] + [c1 * rand() * (pbest[] - present[]) + c2 * rand() * (gbest[] - present[]) ]*Experience present[] = present[] + v[]

Experience=persent[i-1]/persent[i] Experience=persent[i-1]/persent[i]

本实施例的缓存结构如表2: The cache structure of this embodiment is shown in Table 2:

资源类别resource class 优先级priority 存放位置索引storage location index 资源内容resource content 静态资源static resources  the  the  the 动态资源dynamic resources  the  the  the

 表2 Table 2

静态资源:css、js、htm、html、jpg、gif、png、flv、swf、静态返回页面。 Static resources: css, js, htm, html, jpg, gif, png, flv, swf, static return page.

动态资源:通过调用脚本从数据库提取的数据、或者经过运算的数据,比如index.php/?Id=3,获取id为3的一条数据,不再像过去那样只保存文件名index.php,而是保存了所有信息,以便再次访问的时候进行匹配。这条数据存放在缓存中,前提是id为3的数据在存入缓存之后没有修改过,检索程序定期验证此数据是否修改,如果修改则会更新缓存内容,请求这条数据时不用去服务器提取而是根据索引找到这一动态数据,从而大大节省的时间。 Dynamic resources: data extracted from the database by calling scripts, or calculated data, such as index.php/?Id=3, to obtain a piece of data with an id of 3, instead of saving only the file name index.php as in the past, and It is to save all the information for matching when visiting again. This piece of data is stored in the cache. The premise is that the data with id 3 has not been modified after being stored in the cache. The retrieval program periodically verifies whether the data has been modified. If it is modified, the cache content will be updated. When requesting this data, it is not necessary to fetch it from the server. Instead, it finds this dynamic data based on the index, which greatly saves time.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (8)

1.一种基于改进的粒子群算法的Nginx服务器智能缓存方法,是在不影响原Nginx服务器缓存的基础上并行增加一个智能缓存,所述的智能缓存是根据粒子群算法获得,在Nginx服务器代理情况下去访问服务器资源,并根据经验、人为设定参数优化搜索结果从而将最容易访问到的资源保存在该智能缓存中。 1. A kind of Nginx server intelligent caching method based on the improved particle swarm optimization algorithm is to increase an intelligent cache in parallel on the basis of not affecting the original Nginx server cache, and the intelligent cache is obtained according to the particle swarm algorithm, and the Nginx server acts as an agent Access server resources under certain circumstances, and optimize search results based on experience and artificially set parameters to save the most accessible resources in the smart cache. 2.根据权利要求1所述的一种基于改进的粒子群算法的Nginx服务器智能缓存方法,其特征在于,Nginx服务器端收到客户端传来的访问请求,经过验证合法后,先到原Nginx服务器缓存中检索,如果找不到再到所述的智能缓存中查找,同时去相应服务器中获取,如果能找到资源就返回资源,中断去服务器访问的连接,如果在所述的智能缓存中找不到也不会影响正常访问服务器。 2. a kind of Nginx server intelligent caching method based on improved particle swarm optimization algorithm according to claim 1 is characterized in that, Nginx server end receives the access request that client transmits, and after verification is legal, first arrives at former Nginx Search in the server cache, if you can't find it, then search it in the smart cache, and get it from the corresponding server at the same time, if you can find the resource, return the resource, interrupt the connection to the server, if you find it in the smart cache It will not affect the normal access to the server. 3.根据权利要求1所述的一种基于改进的粒子群算法的Nginx服务器智能缓存方法,其特征在于,所述的智能缓存是根据参数的改进的粒子群算法寻找最容易被访问的服务器资源。 3. a kind of Nginx server intelligent caching method based on improved particle swarm optimization algorithm according to claim 1, is characterized in that, described intelligent caching is to find the server resource that is most easily accessed according to the improved particle swarm optimization algorithm of parameter . 4.根据权利要求2所述的一种基于改进的粒子群算法的Nginx服务器智能缓存方法,其特征在于,所述的Nginx服务器端在响应请求阶段挂着回调函数。 4. a kind of Nginx server intelligent caching method based on improved particle swarm optimization algorithm according to claim 2, is characterized in that, described Nginx server end hangs callback function in response request stage. 5.根据权利要求1或2所述的一种基于改进的粒子群算法的Nginx服务器智能缓存方法,其特征在于,所述的Nginx服务器端在启动之后即申请缓存,连接服务器。 5. a kind of Nginx server intelligent caching method based on improved particle swarm optimization algorithm according to claim 1 and 2, is characterized in that, described Nginx server end promptly applies for cache after starting, connects server. 6.根据权利要求1所述的一种基于改进的粒子群算法的Nginx服务器智能缓存方法,其特征在于,所述的智能缓存跟随Ngnix服务器端启动就申请了空间,对智能缓存设定自动清理阈值,对低优先级的资源及时进行清理。 6. a kind of Nginx server intelligent caching method based on improved particle swarm optimization algorithm according to claim 1, is characterized in that, described intelligent cache follows the Ngnix server end and starts and just applied for space, automatically clears up intelligent cache setting Threshold, clean up low-priority resources in a timely manner. 7.根据权利要求1所述的一种基于改进的粒子群算法的Nginx服务器智能缓存方法,其特征在于,所述的智能缓存不但缓存了静态资源,也缓存了部分常用的动态资源。 7. a kind of Nginx server intelligent caching method based on improved particle swarm optimization algorithm according to claim 1, is characterized in that, described intelligent caching has not only cached static resources, also has cached part commonly used dynamic resources. 8.根据权利要求1所述的一种基于改进的粒子群算法的Nginx服务器智能缓存方法,其特征在于,所述的原Nginx服务器缓存与智能缓存之间采用了并行技术,在智能缓存找不到资源的情况下不会影响原Nginx服务器缓存去后台服务获取资源的效率,在大并发的情况下,智能缓存会降低速度让出更多的资源给Nginx服务器主进程。 8. a kind of Nginx server intelligent caching method based on improved particle swarm optimization algorithm according to claim 1, is characterized in that, has adopted parallel technology between described former Nginx server cache and intelligent cache, can't find in intelligent cache In the case of resources, it will not affect the efficiency of the original Nginx server cache to the background service to obtain resources. In the case of large concurrency, the smart cache will slow down the speed and give more resources to the main process of the Nginx server.
CN201310672250.5A 2013-12-12 2013-12-12 Nginx server intelligent cache method based on improved particle swarm optimization Pending CN103747030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310672250.5A CN103747030A (en) 2013-12-12 2013-12-12 Nginx server intelligent cache method based on improved particle swarm optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310672250.5A CN103747030A (en) 2013-12-12 2013-12-12 Nginx server intelligent cache method based on improved particle swarm optimization

Publications (1)

Publication Number Publication Date
CN103747030A true CN103747030A (en) 2014-04-23

Family

ID=50504017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310672250.5A Pending CN103747030A (en) 2013-12-12 2013-12-12 Nginx server intelligent cache method based on improved particle swarm optimization

Country Status (1)

Country Link
CN (1) CN103747030A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618392A (en) * 2015-02-25 2015-05-13 浪潮电子信息产业股份有限公司 Intelligent matching method for NGINX-MODSECURITY security rules
CN104753807A (en) * 2015-04-03 2015-07-01 浪潮电子信息产业股份有限公司 Link load balancing method based on intelligent identification link algorithm
CN106326213A (en) * 2015-06-19 2017-01-11 北京京东尚科信息技术有限公司 Method and device for translating WEB site
CN107306292A (en) * 2016-04-25 2017-10-31 北京京东尚科信息技术有限公司 Service end webpage includes implementation method and device
CN107967270A (en) * 2016-10-19 2018-04-27 北京京东尚科信息技术有限公司 Realize the method and system of multi-functional caching

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101819651A (en) * 2010-04-16 2010-09-01 浙江大学 Method for parallel execution of particle swarm optimization algorithm on multiple computers
CN102081650A (en) * 2010-12-29 2011-06-01 上海网达软件有限公司 Method for rapidly displaying user interface of embedded type platform
CN102479250A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 An Embedded Browser Disk Cache Method
US20130290441A1 (en) * 2012-04-27 2013-10-31 Mobitv, Inc. Server logging module

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101819651A (en) * 2010-04-16 2010-09-01 浙江大学 Method for parallel execution of particle swarm optimization algorithm on multiple computers
CN102479250A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 An Embedded Browser Disk Cache Method
CN102081650A (en) * 2010-12-29 2011-06-01 上海网达软件有限公司 Method for rapidly displaying user interface of embedded type platform
US20130290441A1 (en) * 2012-04-27 2013-10-31 Mobitv, Inc. Server logging module

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618392A (en) * 2015-02-25 2015-05-13 浪潮电子信息产业股份有限公司 Intelligent matching method for NGINX-MODSECURITY security rules
CN104618392B (en) * 2015-02-25 2018-09-21 浪潮电子信息产业股份有限公司 Intelligent matching method for NGINX-MODSECURITY security rules
CN104753807A (en) * 2015-04-03 2015-07-01 浪潮电子信息产业股份有限公司 Link load balancing method based on intelligent identification link algorithm
CN106326213A (en) * 2015-06-19 2017-01-11 北京京东尚科信息技术有限公司 Method and device for translating WEB site
CN107306292A (en) * 2016-04-25 2017-10-31 北京京东尚科信息技术有限公司 Service end webpage includes implementation method and device
CN107967270A (en) * 2016-10-19 2018-04-27 北京京东尚科信息技术有限公司 Realize the method and system of multi-functional caching

Similar Documents

Publication Publication Date Title
CN104133882B (en) A kind of small documents processing method based on HDFS
US9497256B1 (en) Static tracker
CN108156267B (en) A method of using cache to improve website access latency in fog computing architecture
CN105550338B (en) A kind of mobile Web cache optimization method based on HTML5 application cache
CN103747030A (en) Nginx server intelligent cache method based on improved particle swarm optimization
WO2023050712A1 (en) Task scheduling method for deep learning service, and related apparatus
CN107302561B (en) A kind of hot spot data Replica placement method in cloud storage system
CN106339508B (en) WEB caching method based on paging
CN111083179B (en) Internet of Things cloud platform, device interaction method and device based on Internet of Things cloud platform
CN109819039B (en) File acquisition method, file storage method, server and storage medium
CN102439574B (en) Data replacement method in system cache and multi-core communication processor
CN103324713B (en) Data processing method and device in multistage server and data processing system
CN103279392A (en) Method for classifying operated load in virtual machine under cloud computing environment
WO2015103997A1 (en) Method and system for scheduling web crawlers according to keyword search
CN114356893A (en) Metadata tuning method, device, equipment and storage medium based on machine learning
CN107329910A (en) A kind of web front end data based on localStorage are locally stored and access method
CN103107944B (en) A kind of content positioning method and routing device
CN105915619B (en) Take the cyberspace information service high-performance memory cache method of access temperature into account
WO2019109798A1 (en) Method, device, terminal and storage medium for loading resource
CN107580052A (en) From the network self-adapting reptile method and system of evolution
US9400547B2 (en) Processing device and method thereof
WO2025124477A1 (en) Method and system for grayscale resource distribution by means of page redirection, and storage medium
CN116560562A (en) A method and device for reading and writing data
CN104036186A (en) Anti-attack engine implementation method
CN104270371A (en) CDN cache server selecting method based on fuzzy logic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140423