[go: up one dir, main page]

CN103067396A - Three-dimensional (3d) geographic information system (GIS) asynchronous communication transmission system and method of asynchronous communication transmission - Google Patents

Three-dimensional (3d) geographic information system (GIS) asynchronous communication transmission system and method of asynchronous communication transmission Download PDF

Info

Publication number
CN103067396A
CN103067396A CN2012105920631A CN201210592063A CN103067396A CN 103067396 A CN103067396 A CN 103067396A CN 2012105920631 A CN2012105920631 A CN 2012105920631A CN 201210592063 A CN201210592063 A CN 201210592063A CN 103067396 A CN103067396 A CN 103067396A
Authority
CN
China
Prior art keywords
data
server
client
message
dimensional space
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
CN2012105920631A
Other languages
Chinese (zh)
Other versions
CN103067396B (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.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology 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 Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN201210592063.1A priority Critical patent/CN103067396B/en
Publication of CN103067396A publication Critical patent/CN103067396A/en
Application granted granted Critical
Publication of CN103067396B publication Critical patent/CN103067396B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种三维GIS异步通信传输系统,包括客户端和服务器,其中:客户端与服务器建立连接后发送三维空间数据查询消息至服务器,服务器接收三维空间数据查询消息并解析,转换为三维空间数据库查询任务,执行数据库查询任务并返回查询结果,将查询结果中的数据序列化为字节流的形式,并进行压缩得到压缩数据包,获取客户端的通信句柄,并根据所述通信句柄将压缩数据包发送至客户端,客户端接收压缩数据包,对压缩数据包进行数据重组、解压缩与解序列化操作,得到待查询的三维空间数据对象,进行三维可视化与三维空间分析等操作。

A three-dimensional GIS asynchronous communication transmission system, including a client and a server, wherein: the client sends a three-dimensional spatial data query message to the server after establishing a connection with the server, and the server receives and analyzes the three-dimensional spatial data query message, and converts it into a three-dimensional spatial database query task , execute the database query task and return the query result, serialize the data in the query result into a byte stream form, and compress it to obtain a compressed data packet, obtain the communication handle of the client, and send the compressed data packet according to the communication handle To the client, the client receives the compressed data package, performs data reorganization, decompression and deserialization operations on the compressed data package, obtains the 3D spatial data object to be queried, and performs operations such as 3D visualization and 3D spatial analysis.

Description

三维GIS异步通信传输系统及其异步通信传输的方法3D GIS Asynchronous Communication Transmission System and Its Asynchronous Communication Transmission Method

技术领域technical field

本发明涉及网络技术,尤其涉及一种三维GIS异步通信传输系统及其异步通信传输的方法。The invention relates to network technology, in particular to a three-dimensional GIS asynchronous communication transmission system and an asynchronous communication transmission method thereof.

背景技术Background technique

随着大规模三维GIS数据一体化管理、数据安全性、分布式环境下的多用户共享应用等方面的需求日益强烈,传统的两层客户端/数据库服务器的三维GIS网络应用模式,随着数据规模的不断增大,多用户并发数的增加,数据库服务器负载压力过大,且在多用户并发访问时导致数据库服务器严重的I/O瓶颈和性能瓶颈,使多用户并发的三维GIS在满足流畅可视化、高性能三维空间分析等实时应用方面遇到了难以克服的障碍。为了减少数据库服务器的I/O瓶颈和多用户并发所带来负载压力,一般采用客户端、应用服务器和数据库服务器多层架构:应用服务器和数据库服务器分别部署在不同的主机上。用户界面和部分应用处理逻辑在客户端部署,应用服务器承担部分处理逻辑,数据在数据库服务器中部署。这种多层架构方式在客户端与应用服务器、应用服务器与数据库服务器之间的交互都需要高效的网络通信。With the growing demand for integrated management of large-scale 3D GIS data, data security, and multi-user shared applications in a distributed environment, the traditional two-tier client/database server 3D GIS network application With the continuous increase of the scale, the increase of the number of concurrent users, the load pressure of the database server is too large, and the serious I/O bottleneck and performance bottleneck of the database server are caused by the concurrent access of multiple users, so that the multi-user concurrent 3D GIS can meet the smooth Real-time applications such as visualization and high-performance 3D spatial analysis have encountered insurmountable obstacles. In order to reduce the I/O bottleneck of the database server and the load pressure caused by multi-user concurrency, a multi-layer architecture of client, application server and database server is generally adopted: the application server and database server are respectively deployed on different hosts. The user interface and part of the application processing logic are deployed on the client, the application server undertakes part of the processing logic, and the data is deployed on the database server. This multi-layer architecture requires efficient network communication for the interaction between the client and the application server, and between the application server and the database server.

网络传输模式直接决定网络应用软件的性能。网络传输模式分为同步模式和异步模式两种。同步网络传输的特点是客户端发送请求后,必须在服务器端响应后才发送下一个请求。这种工作模式的特点是客户端不能并发多个消息,导致客户端数据调度效率低下。异步网络传输,指客户端在发送请求后,不必等待服务端的回应就可以发送下一个请求。其优势在于避免了消息同步时间,提高了数据调度效率。异步传输策略有助于高效地利用网络,减少高延迟带来的影响。然而,同步传输模式和异步传统模式,都未针对三维GIS平台的三维空间数据调度与三维可视化的特点进行三维空间对象进行消息处理、调度任务处理、压缩处理以及传输方法处理,因此都很难针对三维GIS平台达到高效的网络数据调度与网络传输效果。Network transmission mode directly determines the performance of network application software. The network transmission mode is divided into synchronous mode and asynchronous mode. The characteristic of synchronous network transmission is that after the client sends a request, the next request must be sent after the server responds. The characteristic of this working mode is that the client cannot send multiple messages concurrently, resulting in low efficiency of client data scheduling. Asynchronous network transmission means that after the client sends a request, it can send the next request without waiting for the response from the server. Its advantage is that it avoids message synchronization time and improves data scheduling efficiency. The asynchronous transmission strategy helps to efficiently utilize the network and reduce the impact of high latency. However, both the synchronous transmission mode and the asynchronous traditional mode do not carry out message processing, scheduling task processing, compression processing, and transmission method processing for 3D spatial objects according to the characteristics of 3D spatial data scheduling and 3D visualization of the 3D GIS platform. The 3D GIS platform achieves efficient network data scheduling and network transmission effects.

发明内容Contents of the invention

有鉴于此,有必要提供一种三维GIS异步通信传输系统及其传输方法,来有效地将三维空间数据调度与数据网络传输有效的结合起来,达到最佳的网络数据调度与传输效率。In view of this, it is necessary to provide a 3D GIS asynchronous communication transmission system and its transmission method to effectively combine 3D spatial data scheduling and data network transmission to achieve the best network data scheduling and transmission efficiency.

本发明提供的一种三维GIS异步通信传输系统,包括客户端与服务器,所述服务器中包括三维空间数据库,用于管理地形数据、影像数据、城市三维模型数据及其属性数据等三维GIS数据以及用户连接权限数据,其中:所述客户端包括:第一通信模块,用于将连接请求封装成连接消息,将连接消息发送至所述服务器;所述服务器包括:监听模块,用于监听所述客户端的所述连接消息,解析连接消息中的连接请求参数;判断模块,用于从三维空间数据库获取用户连接权限数据,判断所述连接请求的参数是否正确,其中,所述监听模块还用于在所述连接请求的参数正确时建立与所述客户端的连接,所述第一通信模块还用于将三维空间数据查询请求封装成三维空间数据查询消息发送到所述服务器,所述监听模块还用于接收所述三维空间数据查询消息,并依次放到三维空间数据查询消息队列中;第二通信模块,用于从三维空间数据查询消息队列中依次取出三维空间数据查询消息,交由通信线程池中的空闲线程进行解析处理,并将三维空间数据查询消息转换为三维空间数据库查询任务,放入到数据库查询任务队列中;三维空间数据调度模块,用于从调度线程池和数据库连接池中分别取出空闲的调度线程和数据库连接执行三维空间数据库查询任务,并返回查询结果,其中,所述第二通信模块还用于接收所述查询结果,将所述查询结果中的数据序列化为字节流的形式,并进行压缩得到压缩数据包,获取所述客户端的通信句柄,并根据所述通信句柄将所述压缩数据包发送至所述客户端,所述第一通信模块还用于接收所述压缩数据包;所述客户端还包括数据处理模块,用于对所述压缩数据包进行数据重组、解压缩与解序列化操作,得到待查询的三维空间对象。A three-dimensional GIS asynchronous communication transmission system provided by the present invention includes a client and a server, and the server includes a three-dimensional spatial database for managing three-dimensional GIS data such as terrain data, image data, urban three-dimensional model data and its attribute data, and User connection authority data, wherein: the client includes: a first communication module, configured to encapsulate the connection request into a connection message, and send the connection message to the server; the server includes: a monitoring module, configured to monitor the The connection message of the client is to analyze the connection request parameters in the connection message; the judging module is used to obtain the user connection authority data from the three-dimensional space database, and judge whether the parameters of the connection request are correct, wherein the monitoring module is also used to Establishing a connection with the client when the parameters of the connection request are correct, the first communication module is further configured to encapsulate the three-dimensional spatial data query request into a three-dimensional spatial data query message and send it to the server, and the monitoring module is also configured to For receiving the three-dimensional spatial data query messages, and sequentially put them into the three-dimensional spatial data query message queue; the second communication module is used for successively taking out the three-dimensional spatial data query messages from the three-dimensional spatial data query message queue, and handing over the three-dimensional spatial data query messages to the communication thread The idle thread in the pool performs parsing and processing, and converts the three-dimensional spatial data query message into a three-dimensional spatial database query task, and puts it into the database query task queue; the three-dimensional spatial data scheduling module is used to schedule data from the scheduling thread pool and the database connection pool Respectively take out the idle scheduling thread and the database connection to execute the three-dimensional spatial database query task, and return the query result, wherein the second communication module is also used to receive the query result, and serialize the data in the query result into characters form of throttling, and perform compression to obtain a compressed data packet, obtain the communication handle of the client, and send the compressed data packet to the client according to the communication handle, and the first communication module is also used to receive The compressed data package; the client further includes a data processing module for performing data reorganization, decompression and deserialization operations on the compressed data package to obtain a three-dimensional space object to be queried.

本发明还提供一种三维GIS异步通信传输方法,用于客户端与服务器之间通信,其中,所述服务器中包括三维空间数据库,用于管理地形数据、影像数据、城市三维模型数据及其属性数据等三维GIS数据以及用户连接权限数据,所述方法包括以下步骤:所述服务器开启通信监听,监听所述客户端的连接请求;所述客户端将连接请求封装成连接消息,将连接消息发送至所述服务器;所述服务器监听所述客户端的所述连接消息,解析连接消息中的连接请求参数;服务器从所述三维空间数据库获取用户连接权限数据,判断所述连接请求的参数是否正确;若所述连接请求的参数正确,则所述服务器建立与所述客户端的连接;所述客户端将三维空间数据查询请求封装成三维空间数据查询消息发送到所述服务器;所述服务器接收所述三维空间数据查询消息,并依次放到三维空间数据查询消息队列中;所述服务器从三维空间数据查询消息队列中依次取出三维空间数据查询消息,交由通信线程池中的空闲线程进行解析处理,并将三维空间数据查询消息转换为三维空间数据库查询任务,放入到数据库查询任务队列中;所述服务器从调度线程池和数据库连接池中分别取出空闲的调度线程和数据库连接执行三维空间数据库查询任务,并返回查询结果;所述服务器接收所述查询结果,将所述查询结果中的数据序列化为字节流的形式,并进行压缩得到压缩数据包;所述服务器获取所述客户端的通信句柄,并根据所述通信句柄将所述压缩数据包发送至所述客户端;所述客户端接收所述压缩数据包;所述客户端对所述压缩数据包进行数据重组、解压缩与解序列化操作,得到待查询的三维空间对象。The present invention also provides a three-dimensional GIS asynchronous communication transmission method for communication between a client and a server, wherein the server includes a three-dimensional spatial database for managing terrain data, image data, city three-dimensional model data and their attributes Three-dimensional GIS data such as data and user connection authority data, described method comprises the following steps: described server opens communication monitoring, monitors the connection request of described client; Described client encapsulates connection request into connection message, and connection message is sent to The server; the server listens to the connection message of the client, and parses the connection request parameters in the connection message; the server obtains user connection authority data from the three-dimensional spatial database, and determines whether the connection request parameters are correct; if If the parameters of the connection request are correct, the server establishes a connection with the client; the client encapsulates the three-dimensional spatial data query request into a three-dimensional spatial data query message and sends it to the server; the server receives the three-dimensional spatial data query message and sends it to the server; Spatial data query messages, and put them in the three-dimensional spatial data query message queue in turn; the server takes out the three-dimensional spatial data query messages in turn from the three-dimensional spatial data query message queue, and submits them to the idle threads in the communication thread pool for parsing and processing, and Convert the three-dimensional spatial data query message into a three-dimensional spatial database query task, and put it into the database query task queue; the server takes out idle scheduling threads and database connections from the scheduling thread pool and database connection pool to execute the three-dimensional spatial database query task , and return the query result; the server receives the query result, serializes the data in the query result into a byte stream form, and compresses it to obtain a compressed data packet; the server obtains the communication handle of the client , and send the compressed data packet to the client according to the communication handle; the client receives the compressed data packet; the client performs data reassembly, decompression and deserialization on the compressed data packet Transformation operation to obtain the three-dimensional space object to be queried.

本发明中的三维GIS异步通信传输系统及其通信传输的方法,通过客户端连接请求与服务器建立连接,然后发送三维空间数据查询消息至服务器,利用空闲的线程处理三维空间数据查询消息,提高了网络数据调度与传输效率,避免了同步的延时。The three-dimensional GIS asynchronous communication transmission system and its communication transmission method in the present invention establish a connection with the server through a client connection request, then send a three-dimensional spatial data query message to the server, and use idle threads to process the three-dimensional spatial data query message, thereby improving the The efficiency of network data scheduling and transmission avoids the delay of synchronization.

附图说明Description of drawings

图1为本发明一实施方式中三维GIS异步通信传输系统的模块图;Fig. 1 is a block diagram of a three-dimensional GIS asynchronous communication transmission system in an embodiment of the present invention;

图2为本发明一实施方式中利用图1所示的三维GIS异步通信传输系统进行异步通信传输的方法的流程图。FIG. 2 is a flowchart of a method for asynchronous communication transmission using the three-dimensional GIS asynchronous communication transmission system shown in FIG. 1 in an embodiment of the present invention.

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

在本发明的描述中,术语“内”、“外”、“纵向”、“横向”、“上”、“下”、“顶”、“底”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明而不是要求本发明必须以特定的方位构造和操作,因此不能理解为对本发明的限制。In the description of the present invention, the orientation or positional relationship indicated by the terms "inner", "outer", "longitudinal", "transverse", "upper", "lower", "top", "bottom" etc. are based on the drawings The orientations or positional relationships shown are only for the convenience of describing the invention and do not require the invention to be constructed and operated in a specific orientation, and thus should not be construed as limitations on the invention.

请参阅图1,图1所示为本发明一实施方式中三维GIS异步通信传输系统的模块图。Please refer to FIG. 1 . FIG. 1 is a block diagram of a three-dimensional GIS asynchronous communication transmission system in an embodiment of the present invention.

在本实施方式中,三维GIS异步通信传输系统包括服务器10以及客户端20,其中,服务器10包括:监听模块102、第二通信模块104、判断模块106、三维空间数据库110以及三维空间数据调度模块112。客户端20包括第一通信模块202以及数据处理模块204。In this embodiment, the 3D GIS asynchronous communication transmission system includes a server 10 and a client 20, wherein the server 10 includes: a monitoring module 102, a second communication module 104, a judging module 106, a 3D spatial database 110 and a 3D spatial data scheduling module 112. The client 20 includes a first communication module 202 and a data processing module 204 .

在本实施方式中,三维空间数据库110中包括矢量模型数据、地形数据以及地下数据,其中所述矢量模型数据包括几何数据、材质数据、纹理数据和共享模型数据,所述地形数据包括DEM数据和DOM数据。In this embodiment, the three-dimensional spatial database 110 includes vector model data, terrain data and underground data, wherein the vector model data includes geometric data, material data, texture data and shared model data, and the terrain data includes DEM data and DOM data.

在本实施方式中,第一通信模块202用于将连接请求封装成连接消息,将连接消息发送至所述服务器10。In this embodiment, the first communication module 202 is configured to encapsulate the connection request into a connection message, and send the connection message to the server 10 .

监听模块102用于监听所述客户端的所述连接消息,解析连接消息中的连接请求参数。The monitoring module 102 is configured to monitor the connection message of the client, and analyze connection request parameters in the connection message.

判断模块106用于从三维空间数据库110中获取用户连接权限数据,判断所述连接请求的参数是否正确。The judging module 106 is used to obtain user connection authorization data from the three-dimensional space database 110, and judge whether the parameters of the connection request are correct.

在本实施方式中,所述监听模块102还用于在所述连接请求的参数正确时建立与所述客户端20的连接,所述第一通信模块202还用于将三维空间数据查询请求封装成三维空间数据查询消息发送到所述服务器10,所述监听模块102还用于接收所述三维空间数据查询消息,并依次放到三维空间数据查询消息队列中。In this embodiment, the monitoring module 102 is also used to establish a connection with the client 20 when the parameters of the connection request are correct, and the first communication module 202 is also used to encapsulate the three-dimensional spatial data query request The three-dimensional spatial data query message is sent to the server 10, and the listening module 102 is also configured to receive the three-dimensional spatial data query message and put it into the three-dimensional spatial data query message queue in sequence.

在本实施方式中,第一通信模块202通过从消息发送线程池取出一条空闲线程从消息队列中的头部依次取出一条消息,将消息发送到服务器10,该线程加锁等待服务器10返回消息。In this embodiment, the first communication module 202 fetches a message from the head of the message queue sequentially by taking an idle thread from the message sending thread pool, and sends the message to the server 10. The thread locks and waits for the server 10 to return a message.

第二通信模块104用于从三维空间数据查询消息队列中依次取出三维空间数据查询消息,交由通信线程池中的空闲线程进行解析处理,并将三维空间数据查询消息转换为三维空间数据库查询任务,放入到数据库查询任务队列。The second communication module 104 is used to successively take out the three-dimensional spatial data query message from the three-dimensional spatial data query message queue, hand it over to an idle thread in the communication thread pool for parsing and processing, and convert the three-dimensional spatial data query message into a three-dimensional spatial database query task , put into the database query task queue.

在本实施方式中,所述第二通信模块104对所述DEM数据和DOM数据采用小波变换压缩编码的方法进行压缩,城市三维模型数据通过对其三维几何数据编码形成的数据流进行无损的数据压缩,对其纹理数据也采用小波变换压缩编码方法进行压缩。In this embodiment, the second communication module 104 compresses the DEM data and DOM data using wavelet transform compression coding method, and the city 3D model data is converted into lossless data through the data stream formed by coding its 3D geometric data. Compression, its texture data is also compressed by wavelet transform compression coding method.

三维空间数据调度模块112用于从调度线程池和数据库连接池中分别取出空闲的调度线程和数据库连接执行三维空间数据库查询任务,并返回查询结果。The three-dimensional spatial data dispatching module 112 is used to take idle dispatching threads and database connections from the dispatching thread pool and the database connection pool to execute the three-dimensional spatial database query task, and return the query result.

在本实施方式中,所述第二通信模块104还用于接收所述查询结果,将所述查询结果中的数据序列化为字节流的形式,并进行压缩得到压缩数据包,获取所述客户端20的通信句柄,并根据所述通信句柄将所述压缩数据包发送至所述客户端20,所述第一通信模块202还用于接收所述压缩数据包。In this embodiment, the second communication module 104 is further configured to receive the query result, serialize the data in the query result into a byte stream, and compress to obtain a compressed data packet, and obtain the The communication handle of the client 20, and send the compressed data packet to the client 20 according to the communication handle, and the first communication module 202 is also configured to receive the compressed data packet.

在本实施方式中,三维空间数据库110中保存了客户端20的IP地址、端口号,第二通信模块104通过客户端20的IP地址以及端口号获取所述通信句柄。In this embodiment, the IP address and port number of the client 20 are saved in the three-dimensional space database 110 , and the second communication module 104 acquires the communication handle through the IP address and port number of the client 20 .

在本实施方式中,第一通信模块202收到服务器10数据返回的消息后,将该通知发给数据接收线程,该消息发送线程设为空闲状态并解锁,并回收到消息发送线程池中的空闲线程队列中,在这个过程中客户端20从消息发送线程池不断取出空闲线程依次从消息队列中取出待处理消息进行同样的消息发送、加锁、等待返回通知、通知数据接收线程,解锁等操作,数据接收线程接到数据接收通知后,开始进行数据接收。In this embodiment, after the first communication module 202 receives the message of data return from the server 10, it sends the notification to the data receiving thread, and the message sending thread is set to an idle state and unlocked, and is recycled to the message sending thread pool. In the idle thread queue, during this process, the client 20 continuously takes out idle threads from the message sending thread pool and sequentially takes out pending messages from the message queue to perform the same message sending, locking, waiting for return notification, notification data receiving thread, unlocking, etc. Operation, the data receiving thread starts to receive data after receiving the data receiving notification.

数据处理模块204用于对所述压缩数据包进行数据重组、解压缩与解序列化操作,得到待查询的三维空间对象。The data processing module 204 is used to perform data reorganization, decompression and deserialization operations on the compressed data package to obtain the three-dimensional space object to be queried.

在本实施方式中,数据处理模块204根据压缩数据包的报头信息来进行数据重组、解压缩与解序列化操作。其中报头信息包括:消息的类型以及数据包的总长度,所述客户端20中的数据处理模块204通过消息类型确定数据的类型,通过数据包的总长度确保数据的完整准确的接收。In this embodiment, the data processing module 204 performs data reassembly, decompression and deserialization operations according to the header information of the compressed data packet. The header information includes: the type of the message and the total length of the data packet. The data processing module 204 in the client 20 determines the type of data through the message type, and ensures the complete and accurate reception of the data through the total length of the data packet.

在本实施方式中,所述第二通信模块104还用于接收所述查询结果,将所述查询结果中的数据序列化为字节流的形式,并进行压缩得到压缩数据包。In this embodiment, the second communication module 104 is further configured to receive the query result, serialize the data in the query result into a form of byte stream, and perform compression to obtain a compressed data packet.

在本实施方式中,判断模块106还用于判断所述压缩数据包的大小是否大于固定值,且所述第二通信模块104在所述压缩数据包大于固定值时对所述压缩数据包进行分包。在本实施方式中,固定值为64KB。In this embodiment, the judging module 106 is also used to judge whether the size of the compressed data packet is greater than a fixed value, and the second communication module 104 performs a process on the compressed data packet when the compressed data packet is larger than a fixed value Subcontract. In this embodiment, the fixed value is 64KB.

在本实施方式中,第二通信模块104对所述压缩数据包分包时按照数据包大小为固定值进行分包,当分包后剩下的压缩数据包部分小于固定值时,则不进行分包。In this embodiment, when the second communication module 104 divides the compressed data packets into packets, the data packet size is set as a fixed value, and when the remaining part of the compressed data packets after the packetization is smaller than the fixed value, no packetization is performed. Bag.

在本实施方式中,第二通信模块104在所述压缩数据包小于等于固定值时不对所述压缩数据包进行分包。In this embodiment, the second communication module 104 does not divide the compressed data packet into packets when the compressed data packet is less than or equal to a fixed value.

在本实施方式中,第二通信模块104对所述压缩数据包实行分包是为了避免大量的丢包和重传现象。In this embodiment, the second communication module 104 divides the compressed data packets to avoid a large number of packet loss and retransmission phenomena.

请参阅图2,图2所示为本发明一实施方式中利用图1所示的三维GIS异步通信传输系统进行异步通信传输的方法的流程图。Please refer to FIG. 2 . FIG. 2 is a flowchart of a method for asynchronous communication transmission using the 3D GIS asynchronous communication transmission system shown in FIG. 1 in an embodiment of the present invention.

在本实施方式中,所述三维空间数据库110中包括矢量模型数据、地形数据以及地下数据,其中所述矢量模型数据包括几何数据、材质数据、纹理数据和共享模型数据,所述地形数据包括DEM数据和DOM数据。In this embodiment, the three-dimensional spatial database 110 includes vector model data, terrain data, and underground data, wherein the vector model data includes geometric data, material data, texture data, and shared model data, and the terrain data includes DEM data and DOM data.

在步骤S200,所述服务器10中的监听模块102开启通信监听,监听所述客户端20的连接请求。In step S200 , the monitoring module 102 in the server 10 starts communication monitoring to monitor the connection request of the client 20 .

在步骤S202,所述客户端20中的第一通信模块202将连接请求封装成连接消息,将连接消息发送至所述服务器10。In step S202 , the first communication module 202 in the client 20 encapsulates the connection request into a connection message, and sends the connection message to the server 10 .

在步骤S204,所述服务10中的监听模块102监听所述客户端20的所述连接消息,解析连接消息中的连接请求参数。In step S204, the monitoring module 102 in the service 10 monitors the connection message of the client 20, and parses the connection request parameters in the connection message.

在步骤S206,所述服务器10中的判断模块106从所述三维空间数据库110获取用户连接权限数据,判断所述连接请求的参数是否正确。In step S206, the judging module 106 in the server 10 acquires user connection authorization data from the three-dimensional spatial database 110, and judges whether the parameters of the connection request are correct.

若所述连接请求的参数正确,则在步骤S208,所述服务器10建立与所述客户端20的连接。If the parameters of the connection request are correct, then in step S208, the server 10 establishes a connection with the client 20 .

在步骤S210,所述客户端20中的第一通信模块202将三维空间数据查询请求封装成三维空间数据查询消息发送到所述服务器10。In step S210 , the first communication module 202 in the client 20 encapsulates the three-dimensional spatial data query request into a three-dimensional spatial data query message and sends it to the server 10 .

在本实施方式中,第一通信模块202通过从消息发送线程池取出一条空闲线程从消息队列中的头部依次取出一条消息,将消息发送到服务器10,该线程加锁等待服务器10返回消息。In this embodiment, the first communication module 202 fetches a message from the head of the message queue sequentially by taking an idle thread from the message sending thread pool, and sends the message to the server 10. The thread locks and waits for the server 10 to return a message.

在步骤S212,所述服务器10中的监听模块102接收所述三维空间数据查询消息,并依次放到三维空间数据查询消息队列中。In step S212, the monitoring module 102 in the server 10 receives the three-dimensional spatial data query messages, and puts them in the three-dimensional spatial data query message queue in sequence.

在步骤S214,所述服务器10中的第二通信模块104从三维空间数据查询消息队列中依次取出三维空间数据查询消息,交由通信线程池中的空闲线程进行解析处理,并将三维空间数据查询消息转换为三维空间数据库查询任务,放入到数据库查询任务队列中。In step S214, the second communication module 104 in the server 10 sequentially fetches the three-dimensional spatial data query messages from the three-dimensional spatial data query message queue, and submits the three-dimensional spatial data query messages to the idle threads in the communication thread pool for parsing and processing, and sends the three-dimensional spatial data query messages The message is converted into a three-dimensional spatial database query task and put into the database query task queue.

在本实施方式中,所述第二通信模块104对所述DEM数据和DOM数据采用小波变换压缩编码的方法进行压缩,城市三维模型数据通过对其三维几何数据编码形成的数据流进行无损的数据压缩,对其纹理数据也采用小波变换压缩编码方法进行压缩。In this embodiment, the second communication module 104 compresses the DEM data and DOM data using wavelet transform compression coding method, and the city 3D model data is converted into lossless data through the data stream formed by coding its 3D geometric data. Compression, its texture data is also compressed by wavelet transform compression coding method.

在步骤S216,所述服务器10中的三维空间数据调度模块112从调度线程池和数据库连接池中分别取出空闲的调度线程和数据库连接执行三维空间数据库查询任务,并返回查询结果。In step S216, the 3D spatial data scheduling module 112 in the server 10 fetches idle scheduling threads and database connections from the scheduling thread pool and the database connection pool to execute the 3D spatial database query task, and returns the query result.

在步骤S218,所述服务器10中的第二通信模块104接收所述查询结果,将所述查询结果中的数据序列化为字节流的形式,并进行压缩得到压缩数据包。In step S218, the second communication module 104 in the server 10 receives the query result, serializes the data in the query result into a form of byte stream, and performs compression to obtain a compressed data packet.

在本发明其他实施方式中,所述三维GIS异步通信传输方法还包括步骤S220,所述服务器10中的判断模块106判断所述压缩数据包的大小是否大于固定值。在本实施方式中,固定值为64KB。In other embodiments of the present invention, the three-dimensional GIS asynchronous communication transmission method further includes step S220, the judgment module 106 in the server 10 judges whether the size of the compressed data package is greater than a fixed value. In this embodiment, the fixed value is 64KB.

若所述压缩数据包的大小大于固定值,则在步骤S222,所述服务器10中的第二通信模块104对所述压缩数据包进行分包。If the size of the compressed data packet is greater than a fixed value, then in step S222, the second communication module 104 in the server 10 divides the compressed data packet into packets.

在本实施方式中,第二通信模块104对所述压缩数据包分包时按照数据包大小为固定值进行分包,当分包后剩下的压缩数据包部分小于固定值时,则不进行分包。In this embodiment, when the second communication module 104 divides the compressed data packets into packets, the data packet size is set as a fixed value, and when the remaining part of the compressed data packets after the packetization is smaller than the fixed value, no packetization is performed. Bag.

在本实施方式中,第二通信模块104对所述压缩数据包实行分包是为了避免大量的丢包和重传现象。In this embodiment, the second communication module 104 divides the compressed data packets to avoid a large number of packet loss and retransmission phenomena.

在步骤S224,所述服务器10中的第二通信模块104获取所述客户端20的通信句柄,并根据所述通信句柄将压缩数据包发送至所述客户端20。In step S224, the second communication module 104 in the server 10 obtains the communication handle of the client 20, and sends the compressed data packet to the client 20 according to the communication handle.

在本实施方式中,三维空间数据库110中保存了客户端20的IP地址、端口号,第二通信模块104通过客户端20的IP地址以及端口号获取所述通信句柄。In this embodiment, the IP address and port number of the client 20 are saved in the three-dimensional space database 110 , and the second communication module 104 acquires the communication handle through the IP address and port number of the client 20 .

若所述压缩数据包的大小小于等于固定值,则不需要对所述压缩数据包进行分包,直接进入步骤S224。If the size of the compressed data packet is less than or equal to a fixed value, then the compressed data packet does not need to be divided into packets, and directly enters step S224.

在步骤S226,所述客户端20的第一通信模块202接收所述压缩数据包。In step S226, the first communication module 202 of the client 20 receives the compressed data packet.

在本实施方式中,第一通信模块202收到服务器10数据返回的消息后,将该通知发给数据接收线程,该消息发送线程解锁,并回收到消息发送线程池中的空闲线程队列中,在这个过程中客户端20从消息发送线程池不断取出空闲线程依次从消息队列中取出待处理消息进行同样的消息发送、加锁、等待返回通知、通知数据接收线程,解锁等操作,数据接收线程接到数据接收通知后,开始进行数据接收。In this embodiment, after the first communication module 202 receives the message of data return from the server 10, it sends the notification to the data receiving thread, and the message sending thread is unlocked and recycled to the idle thread queue in the message sending thread pool. In this process, the client 20 continuously takes out idle threads from the message sending thread pool and successively takes out pending messages from the message queue to perform the same message sending, locking, waiting for return notification, notification data receiving thread, unlocking and other operations. After receiving the data receiving notification, start data receiving.

在步骤S228,所述客户端20的数据处理模块204对压缩数据包进行数据重组、解压缩与解序列化操作,得到待查询的数据对象,并对所述客户端20解锁。In step S228, the data processing module 204 of the client 20 performs data reorganization, decompression and deserialization operations on the compressed data packet to obtain the data object to be queried, and unlocks the client 20.

在本实施方式中,所述客户端20中的处理模块204通过解析所述压缩数据包的报头信息进行数据重组,以获取完整的压缩数据包。In this embodiment, the processing module 204 in the client 20 performs data reassembly by parsing header information of the compressed data packet, so as to obtain a complete compressed data packet.

在本实施方式中,压缩数据包的报头信息包括:消息的类型以及数据包的总长度,所述客户端20中的处理模块204通过消息类型确定数据的类型,通过数据包的总长度确保数据的完整准确的接收。In this embodiment, the header information of the compressed data packet includes: the type of message and the total length of the data packet, the processing module 204 in the client 20 determines the type of data by the message type, and ensures the data by the total length of the data packet complete and accurate reception.

本发明中的三维GIS异步通信传输系统10及其通信传输的方法,通过客户端20连接请求与服务器10建立连接,然后发送三维空间数据查询消息至服务器10,利用空闲的线程处理三维空间数据查询消息,提高了网络数据调度与传输效率,避免了同步的延时。The three-dimensional GIS asynchronous communication transmission system 10 and its communication transmission method in the present invention establish a connection with the server 10 through the connection request of the client 20, and then send a three-dimensional spatial data query message to the server 10, and use idle threads to process the three-dimensional spatial data query Messages improve network data scheduling and transmission efficiency and avoid synchronization delays.

虽然本发明参照当前的较佳实施方式进行了描述,但本领域的技术人员应能理解,上述较佳实施方式仅用来说明本发明,并非用来限定本发明的保护范围,任何在本发明的精神和原则范围之内,所做的任何修饰、等效替换、改进等,均应包含在本发明的权利保护范围之内。Although the present invention has been described with reference to the current preferred embodiments, those skilled in the art should understand that the above-mentioned preferred embodiments are only used to illustrate the present invention, and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and scope of principles shall be included in the protection scope of the present invention.

Claims (12)

1. three-dimension GIS asynchronous communication transmission system, comprise client and server, comprise the three-dimensional space data storehouse in the described server, be used for the three-dimension GIS data such as management terrain data, image data, city three-dimensional modeling data and attribute data thereof and user and connect permissions data, it is characterized in that described three-dimension GIS asynchronous communication transmission system comprises:
Described client comprises:
First communication module is used for connection request is packaged into connection message, and connection message is sent to described server;
Described server comprises:
Monitor module, be used for monitoring the described connection message of described client, resolve the connection request parameter in the connection message;
Judge module, be used for obtaining the user from the three-dimensional space data storehouse and connect permissions data, whether the parameter of judging described connection request is correct, wherein, described monitoring module also is used for parameter at described connection request and sets up when correct and being connected of described client, described first communication module is used for that also the three-dimensional space data query requests is packaged into the three-dimensional space data query messages and sends to described server, described monitoring module also is used for receiving described three-dimensional space data query messages, and is put into successively in the formation of three-dimensional space data query messages;
Second communication module, be used for taking out successively the three-dimensional space data query messages from the formation of three-dimensional space data query messages, the idle thread of transferring in the communication thread pond is carried out dissection process, and the three-dimensional space data query messages is converted to three-dimensional space data library inquiry task, put in the data base querying task queue;
The three-dimensional space data scheduler module, be used for respectively taking out idle scheduling thread from scheduling thread pond and database connection pool and be connected execution three-dimensional space data library inquiry task with database, and return Query Result, wherein, described second communication module also is used for receiving described Query Result, data sequence in the described Query Result is turned to the form of byte stream, and compress and obtain compressed data packets, obtain the communication handle of described client, and according to described communication handle described compressed data packets being sent to described client, described first communication module also is used for receiving described compressed data packets;
Described client also comprises data processing module, is used for described compressed data packets is carried out data recombination, decompression and solution sequence operation, obtains three dimensions object to be checked.
2. three-dimension GIS asynchronous communication transmission system as claimed in claim 1, it is characterized in that, described first communication module takes out a piece of news successively by take out the head of an idle thread from message queue from message send-thread pond, send a message to described server, this thread is made as busy condition and locks waits for described server return messages.
3. three-dimension GIS asynchronous communication transmission system as claimed in claim 1, it is characterized in that, after described first communication module is received the message that described server data returns, this notice is issued the data receiver thread, this message send-thread is made as idle condition and release, and is recovered in the idle thread formation in the message send-thread pond.
4. three-dimension GIS asynchronous communication transmission system as claimed in claim 1, it is characterized in that, whether the size that described judge module also is used for judging described compressed data packets greater than fixed value, and described second communication module carries out subpackage to described compressed data packets in described compressed data packets during greater than fixed value.
5. three-dimension GIS asynchronous communication transmission system as claimed in claim 4 is characterized in that, described second communication module also is used for directly described compressed data packets being sent to described client in described compressed data packets during less than or equal to fixed value.
6. such as claim 4 or 5 described three-dimension GIS asynchronous communication transmission systems, it is characterized in that described data processing module carries out data recombination by the header information of resolving described compressed data packets, to obtain complete compressed data packets.
7. three-dimension GIS asynchronous communication transmission method, be used for communicating by letter between client and the server, wherein, comprise the three-dimensional space data storehouse in the described server, be used for the three-dimension GIS data such as management terrain data, image data, city three-dimensional modeling data and attribute data thereof and user and connect permissions data, it is characterized in that, said method comprising the steps of:
Described server open communication is monitored, and monitors the connection request of described client;
Described client is packaged into connection message with connection request, and connection message is sent to described server;
Described server is monitored the described connection message of described client, resolves the connection request parameter in the connection message;
Server obtains the user from described three-dimensional space data storehouse and connects permissions data, judges whether the parameter of described connection request is correct;
If the parameter of described connection request is correct, then described server is set up and being connected of described client;
Described client is packaged into the three-dimensional space data query messages with the three-dimensional space data query requests and sends to described server;
Described server receives described three-dimensional space data query messages, and is put into successively in the formation of three-dimensional space data query messages;
Described server takes out the three-dimensional space data query messages successively from the formation of three-dimensional space data query messages, the idle thread of transferring in the communication thread pond is carried out dissection process, and the three-dimensional space data query messages is converted to three-dimensional space data library inquiry task, put in the data base querying task queue;
Described server is connected with database connection pool from the scheduling thread pond and is taken out respectively idle scheduling thread and is connected execution three-dimensional space data library inquiry task with database, and returns Query Result;
Described server receives described Query Result, and the data sequence in the described Query Result is turned to the form of byte stream, and compresses and obtain compressed data packets;
Described server obtains the communication handle of described client, and according to described communication handle described compressed data packets is sent to described client;
The described compressed data packets of described client;
Described client is carried out data recombination, decompression and solution sequence operation to described compressed data packets, obtains three dimensions object to be checked.
8. three-dimension GIS asynchronous communication transmission method as claimed in claim 7, it is characterized in that, described client is taken out a piece of news successively by take out the head of an idle thread from message queue from message send-thread pond, send a message to described server, this thread is made as busy condition and locks waits for described server return messages.
9. three-dimension GIS asynchronous communication transmission method as claimed in claim 1, it is characterized in that, after described client is received the message that described server data returns, this notice is issued the data receiver thread, this message send-thread is made as idle condition and release, and is recovered in the idle thread formation in the message send-thread pond.
10. three-dimension GIS asynchronous communication transmission method as claimed in claim 7 is characterized in that, and is further comprising the steps of:
Described server judges that whether the size of described compressed data packets is greater than fixed value;
Described server during greater than fixed value, carries out subpackage to described compressed data packets in the size of described compressed data packets;
Compressed data packets after the subpackage is sent to described client according to described communication handle.
11. three-dimension GIS asynchronous communication transmission method as claimed in claim 10 is characterized in that, and is further comprising the steps of:
Described server directly is sent to described client with described compressed data packets according to described communication handle in the size of described compressed data packets during less than or equal to fixed value.
12. such as claim 10 or 11 described three-dimension GIS asynchronous communication transmission methods, it is characterized in that described client is carried out data recombination by the header information of resolving described compressed data packets, to obtain complete compressed data packets.
CN201210592063.1A 2012-12-29 2012-12-29 The method of three-dimension GIS asynchronous communication transmission system and asynchronous communication transmission thereof Expired - Fee Related CN103067396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210592063.1A CN103067396B (en) 2012-12-29 2012-12-29 The method of three-dimension GIS asynchronous communication transmission system and asynchronous communication transmission thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210592063.1A CN103067396B (en) 2012-12-29 2012-12-29 The method of three-dimension GIS asynchronous communication transmission system and asynchronous communication transmission thereof

Publications (2)

Publication Number Publication Date
CN103067396A true CN103067396A (en) 2013-04-24
CN103067396B CN103067396B (en) 2016-04-13

Family

ID=48109858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210592063.1A Expired - Fee Related CN103067396B (en) 2012-12-29 2012-12-29 The method of three-dimension GIS asynchronous communication transmission system and asynchronous communication transmission thereof

Country Status (1)

Country Link
CN (1) CN103067396B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428273A (en) * 2013-07-18 2013-12-04 北京百度网讯科技有限公司 Method and device for responsive inquiry in asynchronous interaction
CN103634203A (en) * 2013-11-29 2014-03-12 北京奇虎科技有限公司 Message asynchronous transmission method, device and system
CN103679730A (en) * 2013-12-17 2014-03-26 深圳先进技术研究院 Video abstract generating method based on GIS
CN104536965A (en) * 2014-11-19 2015-04-22 北京思特奇信息技术股份有限公司 System and method for data query and presentation under big data condition
CN112685190A (en) * 2020-12-30 2021-04-20 平安普惠企业管理有限公司 Synchronous calling method and system based on message queue and computer equipment
CN113810489A (en) * 2021-09-14 2021-12-17 广东三水合肥工业大学研究院 An industrial internet control system and method
CN114040445A (en) * 2021-11-08 2022-02-11 聚好看科技股份有限公司 Data transmission method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040049345A1 (en) * 2001-06-18 2004-03-11 Mcdonough James G Distributed, collaborative workflow management software
CN101902473A (en) * 2010-07-22 2010-12-01 武汉中地数码科技有限公司 Realization Method of Data Synchronous Update Based on Grid GIS

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040049345A1 (en) * 2001-06-18 2004-03-11 Mcdonough James G Distributed, collaborative workflow management software
CN101902473A (en) * 2010-07-22 2010-12-01 武汉中地数码科技有限公司 Realization Method of Data Synchronous Update Based on Grid GIS

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428273A (en) * 2013-07-18 2013-12-04 北京百度网讯科技有限公司 Method and device for responsive inquiry in asynchronous interaction
CN103428273B (en) * 2013-07-18 2016-12-28 北京百度网讯科技有限公司 The method and apparatus of response inquiry is carried out in asynchronous system is mutual
CN103634203A (en) * 2013-11-29 2014-03-12 北京奇虎科技有限公司 Message asynchronous transmission method, device and system
CN103679730A (en) * 2013-12-17 2014-03-26 深圳先进技术研究院 Video abstract generating method based on GIS
CN104536965A (en) * 2014-11-19 2015-04-22 北京思特奇信息技术股份有限公司 System and method for data query and presentation under big data condition
CN104536965B (en) * 2014-11-19 2018-10-19 北京思特奇信息技术股份有限公司 A kind of data query display systems under the conditions of big data and method
CN112685190A (en) * 2020-12-30 2021-04-20 平安普惠企业管理有限公司 Synchronous calling method and system based on message queue and computer equipment
CN113810489A (en) * 2021-09-14 2021-12-17 广东三水合肥工业大学研究院 An industrial internet control system and method
CN114040445A (en) * 2021-11-08 2022-02-11 聚好看科技股份有限公司 Data transmission method and device
CN114040445B (en) * 2021-11-08 2023-08-15 聚好看科技股份有限公司 Data transmission method and device

Also Published As

Publication number Publication date
CN103067396B (en) 2016-04-13

Similar Documents

Publication Publication Date Title
CN103067396B (en) The method of three-dimension GIS asynchronous communication transmission system and asynchronous communication transmission thereof
CN106254458B (en) An image processing method, platform and system based on cloud robot vision
CN105119974B (en) A kind of things system and implementation method of mixing cloud framework
CN100492302C (en) Method for realizing interprocess asynchronous communication based on Java
CN109089029B (en) An FPGA-based Gige Vision interface image transmission system and method
CN107122422A (en) Service-oriented wisdom settlement real-time dataBase system and its method of work
CN109547162B (en) Data communication method based on two sets of one-way boundaries
CN114095537B (en) A Netty-based massive data access method and system in an Internet of Things application
CN113900810A (en) Distributed graph processing method, system and storage medium
CN114374709A (en) 5G video and Internet of things distribution network monitoring system and method based on edge cloud cooperation
CN101964739A (en) Data transmission method, device and system
CN103647706A (en) Self-adaptation protocol communication gateway and communication platform
CN103747097A (en) Mobile terminal HTTP (Hyper Text Transport Protocol) request aggregation compression system and method
CN102480335A (en) Service data sending method and system
CN105282045B (en) A kind of distributed computing and storage method based on consistency hash algorithm
CN103441952B (en) Based on multinuclear or the processing method of network data packets of many-core flush bonding processor
CN102790803A (en) Streaming media service multi-stream concurrent transmission method based on multi-terminal fusion
CN208940010U (en) A kind of intranet and extranet synchronization system
CN105245579A (en) Power distribution network system massive data communication processing method and system
CN109831321A (en) RDMA application transport parameter adaptive selection method in a kind of data center
CN112711488A (en) Equipment initialization method and system based on microservice and message queue
CN101068257A (en) Immediate communication platform
CN116684486A (en) Data transmission method for Internet of things
CN103856396B (en) Message transmission method and device, proxy plug-ins between plug-in unit
CN202424743U (en) Automatic remote communication management machine for power distribution network

Legal Events

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

Granted publication date: 20160413