CN103685309A - Asynchronous request queue model oriented to map visualization tile service - Google Patents

Asynchronous request queue model oriented to map visualization tile service Download PDF

Info

Publication number
CN103685309A
CN103685309A CN201310729316.XA CN201310729316A CN103685309A CN 103685309 A CN103685309 A CN 103685309A CN 201310729316 A CN201310729316 A CN 201310729316A CN 103685309 A CN103685309 A CN 103685309A
Authority
CN
China
Prior art keywords
request
tile
queue
priority
access
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.)
Granted
Application number
CN201310729316.XA
Other languages
Chinese (zh)
Other versions
CN103685309B (en
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.)
Institute of Remote Sensing and Digital Earth of CAS
Original Assignee
Institute of Remote Sensing and Digital Earth of CAS
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 Institute of Remote Sensing and Digital Earth of CAS filed Critical Institute of Remote Sensing and Digital Earth of CAS
Priority to CN201310729316.XA priority Critical patent/CN103685309B/en
Publication of CN103685309A publication Critical patent/CN103685309A/en
Application granted granted Critical
Publication of CN103685309B publication Critical patent/CN103685309B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明提供一种面向地图可视化瓦片服务接入的异步请求队列模型,属于计算机网络技术和队列控制技术领域。该模型主要应用排队论的原理与方法,解决网络化地图可视化瓦片服务的接入问题,实现客户端有层次、实时、流畅的地图瓦片访问。首先设置一个固定容量的请求队列,当有新的请求到来时,根据队列状态、优先级情况确定该请求是否放入队列或者舍弃;另一方面,建立与并发请求相等数目的线程,执行瓦片获取过程,并以回调的方式返回结果。该模型涉及高频度可视化请求下的优先级控制、并发请求量控制、网络异步请求、请求队列管理等技术,是一个具备优先级控制的高频度、高时效的网络异步请求队列模型,适用于地图可视化瓦片网络服务接入。

Figure 201310729316

The invention provides an asynchronous request queue model for map visualization tile service access, and belongs to the technical fields of computer network technology and queue control. This model mainly applies the principle and method of queuing theory to solve the access problem of network map visualization tile service, and realize hierarchical, real-time and smooth map tile access by clients. First, set up a fixed-capacity request queue. When a new request arrives, determine whether the request is placed in the queue or discarded according to the queue status and priority; Get the process and return the result as a callback. This model involves technologies such as priority control under high-frequency visualization requests, concurrent request volume control, network asynchronous requests, and request queue management. It is a high-frequency, high-time-effective network asynchronous request queue model with priority control. It is applicable Access to map visualization tile network services.

Figure 201310729316

Description

面向地图可视化瓦片服务接入的异步请求队列模型Asynchronous request queue model for map visualization tile service access

技术领域technical field

本发明涉及计算机网络技术和队列控制技术,具体地说,涉及高频度可视化请求下的优先级控制、并发请求量控制、网络异步请求、请求队列管理等技术。本发明是一个具备优先级控制的高频度、高时效的网络异步请求队列模型,适用于地图可视化瓦片网络服务接入。The present invention relates to computer network technology and queue control technology, in particular to priority control under high-frequency visualization requests, concurrent request volume control, network asynchronous request, request queue management and other technologies. The invention is a high-frequency and high-time-effective network asynchronous request queue model with priority control, which is suitable for map visualization tile network service access.

背景技术Background technique

地图可视化瓦片客户端请求具有请求频度高、时效性高、优先级条件严格的要求。随着用户不断转换视图的操作,瓦片请求在后台频繁地发生;当前视图中心的瓦片始终是最优先的请求;同时视图外围和相邻层级的瓦片以不同的优先权重进行请求。其中包括基于HTTP网络协议的异步并发访问机制、优先权请求队列模型等相关技术。Map visualization tile client requests have the requirements of high request frequency, high timeliness, and strict priority conditions. As the user continues to switch views, tile requests frequently occur in the background; the tiles in the center of the current view are always requested with the highest priority; at the same time, the tiles on the periphery and adjacent levels of the view are requested with different priority weights. It includes asynchronous concurrent access mechanism based on HTTP network protocol, priority request queue model and other related technologies.

超文本传输协议(Hypertext transfer protocol,HTTP)是分布式,协作式,超媒体系统应用之间的通信协议,是万维网交换信息的基础,具有简单快捷、灵活、无连接、无状态等特点。HTTP的请求类型常用的主要有GET和POST两种,均为同步访问方式,请求时为阻塞状态;异步的实现方法较为复杂,编程难度高,但请求开销小,适用于频繁访问的应用环境。主要参考文献包括http://www.w3.org/Protocols/;http://progrium.com/blog/2012/12/06/async-http- responses-with-response-redirection/等。Hypertext transfer protocol (Hypertext transfer protocol, HTTP) is a distributed, collaborative, communication protocol between hypermedia system applications, and is the basis for exchanging information on the World Wide Web. The commonly used HTTP request types are GET and POST, both of which are synchronous access methods, and the request is in a blocking state; the asynchronous implementation method is more complicated and difficult to program, but the request overhead is small, and it is suitable for application environments with frequent access. The main references include http://www.w3.org/Protocols/; http://progrium.com/blog/2012/12/06/async-http-responses-with-response-redirection/ , etc.

排队论是运筹学和应用概率学的重要分支,在现实生活中,排队论的应用实例随处可见,并正在发挥其重要作用。它主要由三部分组成:输入过程,排队规则和服务系统。输入过程描述服务系统的顾客按照怎样的规则到达;排队规则描述服务是否允许排队,顾客是否允许排队;服务系统主要描述服务台的数量和组织方式,以及顾客所需时间的分布方式。在排队系统中,顾客和服务机构最关心的是队列长度,顾客在系统中的等待、逗留时间及其分布,服务台的忙期等问题,这些指标也是排队系统最重要的特征。主要参考文献包括QingchunJiang,Sharma Chakravarthy.Queueing analysis of relational operators for continuous data streams,Technical Report CSE,2003(02).;Yingxian Liang.Application of mathematical logic in queuetheory,Journal of Shenyang Institute ofAeronautcal Engineering,2003等。Queuing theory is an important branch of operations research and applied probability. In real life, the application examples of queuing theory can be seen everywhere and are playing an important role. It mainly consists of three parts: input process, queuing discipline and service system. The input process describes the rules by which customers arrive in the service system; the queuing rules describe whether the service is allowed to queue and whether the customers are allowed to queue; the service system mainly describes the number and organization of service desks, and the distribution of time required by customers. In the queuing system, customers and service agencies are most concerned about the length of the queue, the waiting time of customers in the system, their stay time and distribution, the busy period of the service desk, etc. These indicators are also the most important characteristics of the queuing system. The main references include QingchunJiang, Sharma Chakravarthy. Queueing analysis of relational operators for continuous data streams, Technical Report CSE, 2003(02).; Yingxian Liang. Application of mathematical logic in queue theory, Journal of Shenyang Institute, 2Engerona, etc.

面向地图可视化瓦片服务接入的异步请求队列模型结合了异步网络请求技术和优先级控制的排队论方法,其中具体涉及了地图瓦片优先级控制、并发请求量控制、请求队列管理等技术问题,目前可见文献/专利中比较系统的解决方案还未出现。The asynchronous request queue model for map visualization tile service access combines the asynchronous network request technology and the queuing method of priority control, which specifically involves technical issues such as map tile priority control, concurrent request volume control, and request queue management. , so far, it can be seen that there are no more systematic solutions in the literature/patents.

发明内容Contents of the invention

本发明的目的是针对网络化地图可视化瓦片服务的接入问题,建立一种支持高频度访问,同时具备优先级控制和网络访问量控制,具有高时效性的异步网络访问请求队列模型,实现客户端有层次、实时、流畅的地图瓦片访问。The purpose of the present invention is to establish an asynchronous network access request queue model that supports high-frequency access, has priority control and network access control, and has high timeliness for the access problem of networked map visualization tile services. Realize hierarchical, real-time, and smooth access to map tiles by the client.

本发明的基本思路为:设置一个固定容量的请求队列,队列中的每一项可容纳一个瓦片请求的信息;当有新的请求到来时,根据队列状态、优先级情况确定该请求是否放入队列或者舍弃;另一方面,建立与并发请求量对应数目的线程,从队列中取出优先级最高的请求执行瓦片获取过程,并以回调的方式返回结果。该过程实例化了一个具备输入过程、排队规则和服务系统的异步请求队列模型。The basic idea of the present invention is: set a fixed-capacity request queue, and each item in the queue can accommodate the information of a tile request; Enqueue or discard; on the other hand, create threads corresponding to the number of concurrent requests, take out the highest priority request from the queue to execute the tile acquisition process, and return the result in the form of a callback. This procedure instantiates an asynchronous request queue model with an input procedure, queuing discipline, and service system.

本发明的技术方案提供了一种具有优先级和流量控制的异步请求队列模型,具体包含以下的实施步骤:The technical solution of the present invention provides an asynchronous request queue model with priority and flow control, specifically including the following implementation steps:

1)由用户定义一个连接数初值,表示同时向服务端发出请求的个数;1) The user defines an initial value of the number of connections, indicating the number of requests sent to the server at the same time;

2)定义固定长度(连接数×2)的瓦片请求队列,队列中的每一项保存了瓦片请求的信息,包括瓦片编号、优先级、时间戳、请求状态和返回数据指针五项;2) Define a tile request queue with a fixed length (number of connections × 2), each item in the queue stores tile request information, including tile number, priority, timestamp, request status and return data pointer ;

3)定义用于异步返回瓦片的回调函数,回调信息包括与瓦片请求队列相对应的瓦片编号、时间戳和瓦片数据;3) Define a callback function for returning tiles asynchronously, and the callback information includes the tile number, timestamp and tile data corresponding to the tile request queue;

4)根据用户浏览地图的视点实时生成和更新瓦片待请求列表,按照视图定义优先级,基本的优先级规则从高到低依次为:视点中心、视点边缘、相邻下层、相邻上层;4) Generate and update the list of tiles to be requested in real time according to the viewpoint of the user browsing the map, and define the priority according to the view. The basic priority rules from high to low are: center of viewpoint, edge of viewpoint, adjacent lower layer, adjacent upper layer;

5)开启排队请求线程循环地读取瓦片待请求列表中的每一项,调用队列请求函数进行瓦片请求,直至队列为空时停止线程;5) Start the queuing request thread to cyclically read each item in the tile pending request list, call the queue request function to request tiles, and stop the thread until the queue is empty;

6)瓦片请求发生时,首先判断瓦片请求队列是否已满,若未满则将请求加入队列;否则若当前请求的优先级高于队列中最低优先级的项,则替换之;当以上两个条件均不满足时,将当前请求抛弃;6) When a tile request occurs, first determine whether the tile request queue is full, and if not, add the request to the queue; otherwise, if the priority of the current request is higher than the lowest priority item in the queue, replace it; when the above When the two conditions are not met, the current request is discarded;

7)开启多个网络请求线程,线程数量与用户定义的连接数一致,每个线程执行如下操作:从瓦片请求队列中取出优先级最高的请求,并将其解析组成URL服务访问地址,向可视化服务请求瓦片,瓦片返回后,将相应的请求从瓦片请求队列和瓦片待请求列表中移除,并通过回调函数返回结果。7) Open multiple network request threads, the number of threads is consistent with the number of connections defined by the user, each thread performs the following operations: take out the request with the highest priority from the tile request queue, and parse it to form a URL service access address, Request tiles from the visualization service, and after the tiles are returned, remove the corresponding request from the tile request queue and tile pending request list, and return the result through the callback function.

上述步骤的特征在于:The above steps are characterized by:

Figure BSA0000099543250000021
步骤2)和步骤3)定义了瓦片请求队列和回调函数的内容,确定了异步访问的形式;同时定义了瓦片请求队列的长度,确定了瓦片流量控制的形式;
Figure BSA0000099543250000021
Step 2) and step 3) define the content of the tile request queue and the callback function, and determine the form of asynchronous access; at the same time, define the length of the tile request queue, and determine the form of tile flow control;

步骤4)和步骤5)为外部输入过程,依据用户视点生成带优先级的瓦片请求,由后台线程以快速的时间间隔循环地向队列模型发出瓦片访问请求; Step 4) and step 5) are external input processes, generating tile requests with priority according to the user's viewpoint, and the background thread sends tile access requests to the queue model cyclically at fast time intervals;

Figure BSA0000099543250000031
步骤4)和步骤5)中叙述的瓦片待请求列表和瓦片请求队列形成了一个双队列模式,前者维护请求发起方的队列缓存,由用户程序生成,内容符合步骤2)中的定义;后者维护处理请求的队列缓存,是优先级和流量控制的结构基础;
Figure BSA0000099543250000031
The tile pending request list and tile request queue described in step 4) and step 5) form a double queue mode, the former maintains the queue cache of the request initiator, which is generated by the user program, and the content conforms to the definition in step 2); The latter maintains a queue cache for processing requests, which is the structural basis for priority and flow control;

步骤6)实现了队列模型中优先级的核心机制,在外部线程不断发出请求的过程中,确保进入队列的是优先级最高的请求; Step 6) The core mechanism of priority in the queue model is realized, and in the process of continuously sending requests from external threads, it is ensured that the request entering the queue is the request with the highest priority;

Figure BSA0000099543250000034
步骤7)通过多线程实现了瓦片请求的流量控制、优先级控制和异步特性,具体来讲,线程数与用户定义的连接数一致,控制了流量;按照优先级顺序处理请求,实现了优先级控制;通过回调函数返回结果,实现了异步化。
Figure BSA0000099543250000034
Step 7) Through multi-threading, the flow control, priority control and asynchronous characteristics of the tile request are realized. Specifically, the number of threads is consistent with the number of connections defined by the user, and the flow is controlled; the requests are processed according to the order of priority, which realizes Priority control; the result is returned through the callback function, which realizes asynchrony.

本发明与现有技术相比具有如下特点:(1)支持高频度的实时瓦片访问接入,外部用户程序可连续、批量发送请求,获得实时响应效果;(2)将优先级控制和流量控制相结合,确保快速、及时、准确地响应瓦片请求的同时,有效减轻可视化瓦片服务的负载。Compared with the prior art, the present invention has the following characteristics: (1) it supports high-frequency real-time tile access, and external user programs can send requests continuously and in batches to obtain real-time response effects; (2) the priority control and The combination of flow control ensures fast, timely and accurate response to tile requests while effectively reducing the load of the visualized tile service.

附图说明Description of drawings

图1本发明总体流程Fig. 1 general flow of the present invention

图2基于二维视图的优先级生成示意图Figure 2 Schematic diagram of priority generation based on two-dimensional view

图3基于三维视图的优先级生成示意图Figure 3 Schematic diagram of priority generation based on 3D view

图4瓦片请求队列的多线程访问Figure 4 Multi-threaded access to the tile request queue

图5二维显示效果图Figure 5 two-dimensional display renderings

具体实施方式Detailed ways

本发明要求用户输入初始的连接数,该连接数由网络状况等指标确定,默认值为6,以下实施步骤以该值为例进行说明。The present invention requires the user to input the initial number of connections, which is determined by indicators such as network conditions, and the default value is 6. The following implementation steps will be described using this value as an example.

图1示意了本发明的总体流程,在整体上由三个部分组成:(1)输入过程:外部程序根据视图显示状态生成带优先级的瓦片请求,并向队列模型模块持续发送请求;(2)排队规则:基于优先级和流量控制原则,队列模型将并发地响应优先级最高的前6个请求;(3)服务系统:队列模型访问瓦片服务返回瓦片结果,将相应的请求从队列中移除,并通过回调函数交由外部程序处理。Fig. 1 illustrates the overall process of the present invention, which is composed of three parts as a whole: (1) input process: the external program generates a tile request with priority according to the view display state, and continuously sends the request to the queue model module; ( 2) Queuing rules: Based on the principle of priority and flow control, the queue model will concurrently respond to the top 6 requests with the highest priority; (3) Service system: The queue model accesses the tile service and returns the tile result, and sends the corresponding request from It is removed from the queue and handed over to an external program for processing through a callback function.

本发明定义的一个瓦片请求的结构包括以下几个部分:The structure of a tile request defined by the present invention includes the following parts:

Figure BSA0000099543250000033
瓦片编号:由用户自定义,用于在异步调用机制中唯一标识一个瓦片,本发明采用[X,Y,D]表示,将全球范围划分为平面网格(瓦片),X、Y、D分别表示横向编号、纵向编号和深度编号,这是一种常见的瓦片划分方法,本发明不限于此种划分方法,在此不赘述;
Figure BSA0000099543250000033
Tile number: defined by the user, used to uniquely identify a tile in the asynchronous call mechanism, the present invention uses [X, Y, D] to represent, and divides the global scope into flat grids (tiles), X, Y , D represent horizontal numbering, vertical numbering and depth numbering respectively, this is a kind of common tile division method, the present invention is not limited to this kind of division method, do not go into details here;

Figure BSA0000099543250000041
优先级变量:用一个整形变量代表瓦片请求的优先级,在队列模型内部处理时,按照变量值越大优先级越高的原则排序,优先处理变量值大的请求,具体数值的确定由用户自定义,后续将以二维和三维视图为例进一步说明;
Figure BSA0000099543250000041
Priority variable: An integer variable is used to represent the priority of the tile request. When processing inside the queue model, it is sorted according to the principle that the larger the variable value is, the higher the priority is. Priority is given to processing requests with large variable values. The specific value is determined by the user Customization, which will be further explained by taking 2D and 3D views as examples;

Figure BSA0000099543250000042
时间戳:表示瓦片请求进入队列模型时的时间,精确到毫秒,用于判断瓦片请求是否超时,若超时则认为目标服务器没有该瓦片数据,将请求从队列中移除;
Figure BSA0000099543250000042
Timestamp: Indicates the time when the tile request enters the queue model, accurate to milliseconds, and is used to determine whether the tile request times out. If it times out, it is considered that the target server does not have the tile data, and the request is removed from the queue;

请求状态:瓦片请求包括待请求、正在请求、请求完成三种状态,分别代表请求进入队列模型、正在接入瓦片服务、瓦片服务返回结果,这里需要说明的是,当请求状态为正在请求时,该瓦片请求将被锁定,不会被其他请求所替代,直至结果返回或服务超时等异常情况出现。 Request status: tile requests include three states: pending request, requesting, and request completed, respectively representing the request entering the queue model, accessing tile service, and tile service returning results. What needs to be explained here is that when the request status is in progress When a request is made, the tile request will be locked and will not be replaced by other requests until abnormal conditions such as result return or service timeout occur.

外部用户程序按照上述的结构定义,根据不同的视图特点生成瓦片请求。图2示意了一种二维视图的瓦片请求优先级生成规则,粗体实线框代表二维视图的窗体边界,虚线框代表了视图缓存的边界,方格为瓦片,瓦片内的数字代表了优先级,优先级按照从视点中心到周围螺旋式递减。图3示意了一种三维视图的瓦片请求优先级生成规则,按照视角所涉及的瓦片由近及远,相应地生成优先级由高到低的瓦片请求。The external user program generates tile requests according to the above structure definition according to different view characteristics. Figure 2 illustrates a tile request priority generation rule for a two-dimensional view. The bold solid line box represents the window boundary of the two-dimensional view, and the dotted line box represents the boundary of the view cache. The squares are tiles. The number in represents the priority, and the priority descends spirally from the center of the viewpoint to the surroundings. FIG. 3 illustrates a tile request priority generation rule for a three-dimensional view. According to the order of tiles involved in the viewing angle from near to far, tile requests with priority from high to low are correspondingly generated.

图4示意了队列模型的多线程工作机制,其中外部排队请求线程的执行路径用蓝色箭头线表示,队列模型瓦片请求线程的执行路径用红色箭头线表示;“请求接口”以上为外部用户程序,“请求接口”以下为队列模型程序。Figure 4 illustrates the multi-threaded working mechanism of the queue model, in which the execution path of the external queuing request thread is indicated by the blue arrow line, and the execution path of the queue model tile request thread is indicated by the red arrow line; above the "request interface" is the external user Program, the following "request interface" is the queue model program.

以下例举一种外部程序的处理方案。每当视图发生变化,产生新的瓦片需求时,外部用户程序生成瓦片请求,形成一个瓦片待请求列表,接着开启排队请求线程,持续、循环地向队列模型发送瓦片请求,线程工作流程(图4“请求接口”以上蓝线部分)的伪代码如下:The following is an example of a processing solution for an external program. Whenever the view changes and a new tile requirement is generated, the external user program generates a tile request to form a tile pending request list, and then starts the queuing request thread to continuously and cyclically send tile requests to the queue model, and the thread works The pseudocode of the process (the blue line above the "request interface" in Figure 4) is as follows:

Figure BSA0000099543250000044
Figure BSA0000099543250000044

同时,外部程序实现回调函数,由队列模型程序调用,函数原型如下:At the same time, the external program implements the callback function, which is called by the queue model program. The function prototype is as follows:

CallbackTile(瓦片编号,瓦片数据)CallbackTile(tile number, tile data)

回调函数首先将瓦片数据拷贝并交由上层程序处理,然后将对应的瓦片请求从瓦片待请求列表中移除,为避免多线程访问冲突,移除时需锁定列表。The callback function first copies the tile data and submits it to the upper-level program for processing, and then removes the corresponding tile request from the tile pending request list. In order to avoid multi-thread access conflicts, the list needs to be locked when removing.

队列模型的主体部分由请求接口(图4“请求接口”以下蓝线部分)和瓦片请求线程(图4“请求接口”以下红线部分)两部分组成,前者用伪代码表示如下:The main part of the queue model consists of two parts: the request interface (the blue line below the "request interface" in Figure 4) and the tile request thread (the red line below the "request interface" in Figure 4). The former is expressed in pseudocode as follows:

Figure BSA0000099543250000051
Figure BSA0000099543250000051

请求接口实现了队列模型中请求到来时的排队规则,瓦片请求线程则实现了服务系统的工作过程,如上述伪代码所述,线程在请求到来时启动,最大线程数为6,其执行过程用伪代码表示如下:The request interface realizes the queuing rule when the request arrives in the queue model, and the tile request thread realizes the working process of the service system. As described in the above pseudo code, the thread starts when the request arrives, and the maximum number of threads is 6. The execution process Expressed in pseudocode as follows:

Figure BSA0000099543250000052
Figure BSA0000099543250000052

上述步骤实现了一个最大并发量为6个瓦片请求的队列模型,利用队列规则避免了重复发送请求并使高优先级瓦片得到实时响应。瓦片请求队列设定为连接数的2倍,即12个,一方面确保了瓦片请求的实时性,充当了时间优先级规则的角色,另一方面避免了队列过长,耗费资源。The above steps implement a queue model with a maximum concurrent request of 6 tiles, and use queue rules to avoid repeated requests and enable high-priority tiles to get real-time responses. The tile request queue is set to twice the number of connections, that is, 12. On the one hand, it ensures the real-time nature of tile requests and acts as a time priority rule. On the other hand, it avoids excessively long queues and consumes resources.

利用本发明实现的二维视图显示效果见图5,该视图的尺寸为宽1091像素、高636像素,每个瓦片的尺寸为宽256像素、高256像素。图中所需的瓦片数为20个,请求的优先级顺序是从视图中心向周围呈螺旋状递减,实际显示顺序见图中红色阿拉伯数字。在单个瓦片平均响应时间为0.5秒时视图全部显示用时小于3秒。本发明适用于优先级控制下的高频度细粒度网络访问,可实现网络化地图可视化瓦片服务的有层次、实时、流畅访问。The display effect of the two-dimensional view realized by the present invention is shown in FIG. 5 . The size of the view is 1091 pixels in width and 636 pixels in height, and the size of each tile is 256 pixels in width and 256 pixels in height. The number of tiles required in the picture is 20, and the priority order of the request is spirally decreasing from the center of the view to the surrounding. The actual display order is shown in the red Arabic numerals in the picture. When the average response time of a single tile is 0.5 seconds, it takes less than 3 seconds to display all the views. The invention is suitable for high-frequency and fine-grained network access under priority control, and can realize hierarchical, real-time and smooth access to networked map visualization tile services.

Claims (3)

1.面向地图可视化瓦片服务接入的异步请求队列模型,其特征在于包括以下实施步骤:  1. An asynchronous request queue model for map visualization tile service access, characterized in that it includes the following implementation steps: 步骤1,由用户定义一个连接数初值,表示同时向服务端发出请求的个数;  Step 1, the user defines an initial value of the number of connections, indicating the number of requests sent to the server at the same time; 步骤2,定义长度为连接数2倍的瓦片请求队列,队列中的每一项保存了瓦片请求的信息,包括瓦片编号、优先级、时间戳、请求状态和返回的数据指针五项;  Step 2. Define a tile request queue whose length is twice the number of connections. Each item in the queue stores tile request information, including tile number, priority, timestamp, request status, and returned data pointer. ; 步骤3,定义用于异步返回瓦片的回调函数,回调信息包括与瓦片请求队列相对应的瓦片编号、时间戳和瓦片数据;  Step 3, define a callback function for asynchronously returning tiles, the callback information includes the tile number, timestamp and tile data corresponding to the tile request queue; 步骤4,根据用户浏览地图的视点实时生成和更新瓦片待请求列表,按照视图定义优先级,基本的优先级规则从高到低依次为:视点中心、视点边缘、相邻下层、相邻上层;  Step 4: Generate and update the list of tiles to be requested in real time according to the viewpoint of the user browsing the map, define the priority according to the view, and the basic priority rules from high to low are: center of viewpoint, edge of viewpoint, adjacent lower layer, adjacent upper layer ; 步骤5,开启排队请求线程循环地读取瓦片待请求列表中的每一项,调用队列请求函数进行瓦片请求,直至队列为空时停止线程;  Step 5, start the queuing request thread to cyclically read each item in the tile pending request list, call the queue request function to request tiles, and stop the thread until the queue is empty; 步骤6,瓦片请求发生时,首先判断瓦片请求队列是否已满,若未满则将请求加入队列;否则若当前请求的优先级高于队列中最低优先级的项,则替换之;当以上两个条件均不满足时,将当前请求抛弃;  Step 6, when a tile request occurs, first judge whether the tile request queue is full, if not, add the request to the queue; otherwise, if the priority of the current request is higher than the lowest priority item in the queue, replace it; when When the above two conditions are not met, the current request is discarded; 步骤7,开启数量与用户定义的连接数一致的网络请求线程,每个线程执行如下操作:从瓦片请求队列中取出优先级最高的请求,并将其解析组成URL服务访问地址,向可视化服务请求瓦片,瓦片数据返回后,将相应的请求从瓦片请求队列和瓦片待请求列表中移除,并通过回调函数返回结果。  Step 7: Start the network request threads whose number is consistent with the number of connections defined by the user. Each thread performs the following operations: take out the request with the highest priority from the tile request queue, parse it to form a URL service access address, and send it to the visualization The service requests a tile, and after the tile data is returned, the corresponding request is removed from the tile request queue and tile pending request list, and the result is returned through the callback function. the 2.根据权利要求1所述的异步请求队列模型,其特征在于用同步的HTTP网络访问协议实现了异步的瓦片访问形式,支持高频度的实时瓦片访问接入,外部用户程序可连续、批量地发送请求,获得实时的响应效果。  2. The asynchronous request queue model according to claim 1, characterized in that a synchronous HTTP network access protocol is used to realize the asynchronous tile access form, support high-frequency real-time tile access, and external user programs can be continuously , Send requests in batches to obtain real-time response effects. the 3.根据权利要求1所述的异步请求队列模型,其特征在于将优先级控制和流量控制相结合,确保快速、及时、准确地响应瓦片请求的同时,有效减轻可视化瓦片服务的负载。  3. The asynchronous request queue model according to claim 1, characterized in that priority control and flow control are combined to ensure fast, timely and accurate response to tile requests while effectively reducing the load of the visualized tile service. the
CN201310729316.XA 2013-12-26 2013-12-26 Method for establishing an asynchronous request queue for map visualization tile service access Expired - Fee Related CN103685309B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310729316.XA CN103685309B (en) 2013-12-26 2013-12-26 Method for establishing an asynchronous request queue for map visualization tile service access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310729316.XA CN103685309B (en) 2013-12-26 2013-12-26 Method for establishing an asynchronous request queue for map visualization tile service access

Publications (2)

Publication Number Publication Date
CN103685309A true CN103685309A (en) 2014-03-26
CN103685309B CN103685309B (en) 2019-09-13

Family

ID=50321623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310729316.XA Expired - Fee Related CN103685309B (en) 2013-12-26 2013-12-26 Method for establishing an asynchronous request queue for map visualization tile service access

Country Status (1)

Country Link
CN (1) CN103685309B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156482A (en) * 2014-08-26 2014-11-19 天津市普迅电力信息技术有限公司 Map tile data publishing method
CN104731899A (en) * 2015-03-19 2015-06-24 浪潮通用软件有限公司 Data high-concurrency processing method based on asynchronous processing
CN104917833A (en) * 2015-06-08 2015-09-16 北京集奥聚合网络技术有限公司 Asynchronous information processing method based on NIO request
CN105069058A (en) * 2015-07-24 2015-11-18 中国地质大学(武汉) Quick response method of network map request for high-frequency interaction environment
CN107294872A (en) * 2017-05-05 2017-10-24 中广热点云科技有限公司 A kind of method and system for improving communication base station efficiency of service
CN107430627A (en) * 2015-04-01 2017-12-01 微软技术许可有限责任公司 The priority ranking request of map layer
CN108021462A (en) * 2017-12-08 2018-05-11 北京百度网讯科技有限公司 Method and apparatus for calling cloud service
CN108255853A (en) * 2016-12-29 2018-07-06 卓望数码技术(深圳)有限公司 The request asynchronous processing method and system of a kind of plug-in type
CN108334555A (en) * 2017-12-31 2018-07-27 广州都市圈网络科技有限公司 Vector is changed the line map velocity optimization method, system, electronic equipment and storage medium
CN109631874A (en) * 2018-12-11 2019-04-16 四川省交通运输厅交通勘察设计研究院 The method of real-time stream is superimposed on three-dimensional electronic navigation channel chart
CN112902968A (en) * 2021-02-01 2021-06-04 成都紫瑞青云航空宇航技术有限公司 High-efficiency three-dimensional digital navigation earth generation method and system
CN113691604A (en) * 2021-08-18 2021-11-23 深圳鼎盛电脑科技有限公司 An adaptive current limiting method, device, device and medium for network requests
CN115037802A (en) * 2022-06-02 2022-09-09 北京百度网讯科技有限公司 Request processing method and device, electronic equipment and storage medium
CN117171288A (en) * 2023-11-02 2023-12-05 中国地质大学(武汉) Grid map analysis method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750180A (en) * 2012-05-28 2012-10-24 中国科学院遥感应用研究所 Multithreading display mechanism of two-dimensional map tiles
CN102968442A (en) * 2012-10-22 2013-03-13 武大吉奥信息技术有限公司 Network map tile service aggregation method and system
CN103279487A (en) * 2013-04-25 2013-09-04 中国科学院遥感与数字地球研究所 Organization and management method of map tile caching

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750180A (en) * 2012-05-28 2012-10-24 中国科学院遥感应用研究所 Multithreading display mechanism of two-dimensional map tiles
CN102968442A (en) * 2012-10-22 2013-03-13 武大吉奥信息技术有限公司 Network map tile service aggregation method and system
CN103279487A (en) * 2013-04-25 2013-09-04 中国科学院遥感与数字地球研究所 Organization and management method of map tile caching

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈桦,李艳明,朱美正: "一种支持大量并发用户的瓦片缓存方案研究", 《计算机工程与科学》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156482A (en) * 2014-08-26 2014-11-19 天津市普迅电力信息技术有限公司 Map tile data publishing method
CN104731899A (en) * 2015-03-19 2015-06-24 浪潮通用软件有限公司 Data high-concurrency processing method based on asynchronous processing
CN107430627B (en) * 2015-04-01 2020-12-11 微软技术许可有限责任公司 Map layer prioritization requests
CN107430627A (en) * 2015-04-01 2017-12-01 微软技术许可有限责任公司 The priority ranking request of map layer
CN104917833A (en) * 2015-06-08 2015-09-16 北京集奥聚合网络技术有限公司 Asynchronous information processing method based on NIO request
CN105069058A (en) * 2015-07-24 2015-11-18 中国地质大学(武汉) Quick response method of network map request for high-frequency interaction environment
CN105069058B (en) * 2015-07-24 2018-11-27 中国地质大学(武汉) Network map for high frequency interactive environment requests fast response method
CN108255853A (en) * 2016-12-29 2018-07-06 卓望数码技术(深圳)有限公司 The request asynchronous processing method and system of a kind of plug-in type
CN107294872A (en) * 2017-05-05 2017-10-24 中广热点云科技有限公司 A kind of method and system for improving communication base station efficiency of service
CN107294872B (en) * 2017-05-05 2019-07-30 中广热点云科技有限公司 A kind of method and system improving communication base station efficiency of service
CN108021462A (en) * 2017-12-08 2018-05-11 北京百度网讯科技有限公司 Method and apparatus for calling cloud service
CN108334555A (en) * 2017-12-31 2018-07-27 广州都市圈网络科技有限公司 Vector is changed the line map velocity optimization method, system, electronic equipment and storage medium
CN109631874A (en) * 2018-12-11 2019-04-16 四川省交通运输厅交通勘察设计研究院 The method of real-time stream is superimposed on three-dimensional electronic navigation channel chart
CN112902968A (en) * 2021-02-01 2021-06-04 成都紫瑞青云航空宇航技术有限公司 High-efficiency three-dimensional digital navigation earth generation method and system
CN112902968B (en) * 2021-02-01 2024-10-22 成都紫瑞青云航空宇航技术有限公司 High-efficiency three-dimensional digital navigation earth generation method and system
CN113691604A (en) * 2021-08-18 2021-11-23 深圳鼎盛电脑科技有限公司 An adaptive current limiting method, device, device and medium for network requests
CN115037802A (en) * 2022-06-02 2022-09-09 北京百度网讯科技有限公司 Request processing method and device, electronic equipment and storage medium
CN115037802B (en) * 2022-06-02 2024-03-08 北京百度网讯科技有限公司 Request processing method and device, electronic equipment and storage medium
CN117171288A (en) * 2023-11-02 2023-12-05 中国地质大学(武汉) Grid map analysis method, device, equipment and medium
CN117171288B (en) * 2023-11-02 2024-01-12 中国地质大学(武汉) Grid map analysis method, device, equipment and medium

Also Published As

Publication number Publication date
CN103685309B (en) 2019-09-13

Similar Documents

Publication Publication Date Title
CN103685309B (en) Method for establishing an asynchronous request queue for map visualization tile service access
US8788760B2 (en) Adaptive caching of data
JP5450841B2 (en) Mechanisms for supporting user content feeds
CN106657379A (en) Implementation method and system for NGINX server load balancing
JP2016514311A (en) Database system providing single tenant and multi-tenant environments
CN106547882A (en) A kind of real-time processing method and system of big data of marketing in intelligent grid
CN103345514A (en) Streamed data processing method in big data environment
CN103279526A (en) WebGIS three-dimensional lunar system based on ActiveX and realizing method of WebGIS three-dimensional lunar system
WO2019219005A1 (en) Data processing system and method
CN101719148B (en) Storage method, device, system and query system for three-dimensional spatial information
CN103198097A (en) Massive geoscientific data parallel processing method based on distributed file system
CN105786611A (en) Method and device for task scheduling of distributed cluster
CN106570145B (en) Distributed database result caching method based on hierarchical mapping
CN110020273B (en) Method, device and system for generating thermodynamic diagram
CN114372084A (en) Real-time processing system for sensing stream data
CN104035807A (en) Metadata cache replacement method of cloud storage system
Perwej The ambient scrutinize of scheduling algorithms in big data territory
CN111049898A (en) Method and system for realizing cross-domain architecture of computing cluster resources
CN111638946A (en) Request information hierarchical processing method and device
CN106302102A (en) Instant message delivery system
Kang et al. PDDS: Scalable sensor data distribution for cyber-physical systems using GPGPUs
CN102902593A (en) Protocol distribution processing system based on cache mechanism
Dalčeković et al. Enabling the IoT paradigm through multi-tenancy supported by scalable data acquisition layer
CN106603637A (en) Inter-heterogeneous gridding management platform data exchange method and system
Sun et al. Application of improved storage technology in Intelligent Transportation System.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190913

Termination date: 20201226

CF01 Termination of patent right due to non-payment of annual fee