CN111722887A - A method and system for processing and displaying massive scatter data - Google Patents

A method and system for processing and displaying massive scatter data Download PDF

Info

Publication number
CN111722887A
CN111722887A CN202010482582.7A CN202010482582A CN111722887A CN 111722887 A CN111722887 A CN 111722887A CN 202010482582 A CN202010482582 A CN 202010482582A CN 111722887 A CN111722887 A CN 111722887A
Authority
CN
China
Prior art keywords
data
processing
request
display
configuration
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
CN202010482582.7A
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.)
Nanjing Hengge Zero One Information Technology Co ltd
Original Assignee
Nanjing Hengge Zero One Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Hengge Zero One Information Technology Co ltd filed Critical Nanjing Hengge Zero One Information Technology Co ltd
Priority to CN202010482582.7A priority Critical patent/CN111722887A/en
Publication of CN111722887A publication Critical patent/CN111722887A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4494Execution paradigms, e.g. implementations of programming paradigms data driven

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)

Abstract

本发明公开了一种对海量散点数据的处理和显示的方法和系统。包括以下步骤:将外部的原数据转换为设计好的中间缓存格式,且需要使用到工作线程;用户发起请求后,对所述中间缓存格式的数据进行配置、请求和计算;完成配置、请求和计算后,将处理结果分段反馈给用户。本发明不依赖显卡,尤其是特定品牌的显卡;不需要额外引入门槛较高的并行计算API(CUDA和OpenCL),降低了学习和维护的成本;相比常规的单工作线程或单线程线性处理方式,该方案能在短时间内完成对大量数据的处理和展示,提升用户的流畅度体验。

Figure 202010482582

The invention discloses a method and system for processing and displaying massive scattered data. It includes the following steps: converting the external original data into a designed intermediate cache format, and using a worker thread; after the user initiates a request, configure, request and calculate the data in the intermediate cache format; complete the configuration, request and After the calculation, the processing results are fed back to the user in stages. The invention does not depend on graphics cards, especially graphics cards of specific brands; it does not need to introduce additional parallel computing APIs (CUDA and OpenCL) with higher thresholds, which reduces the cost of learning and maintenance; This solution can complete the processing and display of a large amount of data in a short time, and improve the user's fluency experience.

Figure 202010482582

Description

一种对海量散点数据的处理和显示的方法和系统A method and system for processing and displaying massive scatter data

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种对海量散点数据的处理和显示的方法和系统。The invention relates to the field of computer technology, and in particular, to a method and system for processing and displaying massive scatter data.

背景技术Background technique

目前针对离散型数据的处理思路就是“多线开工”——利用其“上下文无关”的特性在多个流水线上同时处理。较为成熟的方案为使用CUDA,但其本身依赖于英伟达的显卡,这意味着会使程序本身对硬件的依赖增大,且同时考验着显卡的性能;另外也有OpenCL同样可胜任,但相比CUDA,虽然脱离了特定品牌显卡的约束,但使用难度却进一步提升。其中:At present, the processing idea for discrete data is "multi-line start"-using its "context-independent" feature to process simultaneously on multiple pipelines. The more mature solution is to use CUDA, but it relies on NVIDIA's graphics card, which means that the program itself is more dependent on hardware, and at the same time tests the performance of the graphics card; in addition, OpenCL is also competent, but compared to CUDA , although it is out of the constraints of a specific brand of graphics card, the difficulty of use is further increased. in:

上下文无关:指数据个体之间没有关联约束,各自的处理过程和结果均不会影响到其他数据。Context-free: means that there are no association constraints between data individuals, and their respective processing processes and results will not affect other data.

CUDA:CUDA(Compute Unified Device Architecture),是显卡厂商NVIDIA推出的运算平台。CUDA是一种由NVIDIA推出的通用并行计算架构,该架构使GPU能够解决复杂的计算问题。它包含了CUDA指令集架构(ISA)以及GPU内部的并行计算引擎。开发人员可以使用C语言来为CUDA架构编写程序,C语言是应用最广泛的一种高级编程语言。所编写出的程序可以在支持CUDA的处理器上以超高性能运行。CUDA: CUDA (Compute Unified Device Architecture), is a computing platform launched by the graphics card manufacturer NVIDIA. CUDA is a general-purpose parallel computing architecture introduced by NVIDIA that enables GPUs to solve complex computing problems. It contains the CUDA instruction set architecture (ISA) and the parallel computing engine inside the GPU. Developers can use C, the most widely used high-level programming language, to write programs for the CUDA architecture. Programs written can run with ultra-high performance on processors that support CUDA.

OpenCL:全称Open Computing Language,开放运算语言。OpenCL是一个为异构平台编写程序的框架,此异构平台可由CPU,GPU或其他类型的处理器组成。OpenCL由一门用于编写kernels(在OpenCL设备上运行的函数)的语言(基于C99)和一组用于定义并控制平台的API组成。OpenCL提供了基于任务分割和数据分割的并行计算机制。OpenCL: the full name of Open Computing Language, open computing language. OpenCL is a framework for writing programs for heterogeneous platforms, which can consist of CPUs, GPUs, or other types of processors. OpenCL consists of a language (based on C99) for writing kernels (functions that run on OpenCL devices) and a set of APIs for defining and controlling the platform. OpenCL provides a parallel computing mechanism based on task partitioning and data partitioning.

线程池的工作线程可以避免将工作堆积在主线程,进而引发界面阻塞;多线程并行计算可以大大提高效率。界面绘制时,数据量大只是一种表象,背后涉及到的主要是执行方式产生的巨大开销——即散点越多,需要执行的单次绘制点的指令越多,因此尽可能将数据一口气传递给目标,也是减小开销的有效手段。因此,亟待提出一种对海量散点数据的处理和显示的方法和系统,以解决现有技术散点图数据在十分庞大时,在处理上带来的耗时和卡顿问题。针对离散型数据的处理需要依赖显卡,需要额外引入门槛较高的并行计算API(CUDA和OpenCL),降低了学习和维护的成本的问题。The worker threads of the thread pool can avoid accumulating work on the main thread and cause interface blocking; multi-threaded parallel computing can greatly improve efficiency. When the interface is drawn, the large amount of data is only an appearance, and the main thing behind it is the huge overhead generated by the execution method - that is, the more scattered points, the more instructions that need to be executed for a single drawing point, so the data is as much as possible. Passing the breath to the target is also an effective means of reducing overhead. Therefore, it is urgent to propose a method and system for processing and displaying massive scatter data, so as to solve the problem of time-consuming and stuttering in processing when the scatter data in the prior art is very large. The processing of discrete data needs to rely on graphics cards, and additional parallel computing APIs (CUDA and OpenCL) with high thresholds need to be introduced, which reduces the cost of learning and maintenance.

发明内容SUMMARY OF THE INVENTION

有鉴于现有技术的上述缺陷,本发明所要解决的技术问题是提供一种对海量散点数据的处理和显示的方法和系统,以解决现有技术针对离散型数据的处理需要依赖显卡,需要额外引入门槛较高的并行计算API(CUDA和OpenCL),降低了学习和维护的成本的问题。In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is to provide a method and system for processing and displaying massive scattered data, so as to solve the problem that the processing of discrete data in the prior art needs to rely on a graphics card and requires The additional introduction of high-threshold parallel computing APIs (CUDA and OpenCL) reduces the cost of learning and maintenance.

为实现上述目的,本发明提供了一种对海量散点数据的处理和显示的方法,包括以下步骤:In order to achieve the above purpose, the present invention provides a method for processing and displaying massive scatter data, comprising the following steps:

将外部的原数据转换为设计好的中间缓存格式,且需要使用到工作线程;Convert external raw data into a designed intermediate cache format, and need to use worker threads;

用户发起请求后,对所述中间缓存格式的数据进行配置、请求和计算;After the user initiates the request, configure, request and calculate the data in the intermediate cache format;

完成配置、请求和计算后,将处理结果分段反馈给用户。After completing the configuration, request and calculation, the processing results are fed back to the user in stages.

优选的,所述缓存为使用多级散列表或散列表搭配顺序容器的方式设计缓存。Preferably, the cache is designed by using a multi-level hash table or a hash table with sequential containers.

优选的,所述工作线程是一个工作线程,或者是一个线程池。Preferably, the worker thread is a worker thread or a thread pool.

优选的,所述配置、请求和计算具体为:Preferably, the configuration, request and calculation are specifically:

配置:按照设计好的格式,组织用于请求计算的配置项,配置项内容包含采样的位置和大小、横纵方向的缩放比例;Configuration: According to the designed format, the configuration items used for request calculation are organized, and the content of the configuration items includes the location and size of the sampling, and the scaling ratio in the horizontal and vertical directions;

请求:将配置项传递给处理单元,并使其运行处理;request: pass the configuration item to the processing unit and make it run the processing;

计算:按照配置项对缓存数据进行分割、创建线程池、分发切割块,由多个工作线程异步完成各个块的处理工作。Calculation: Divide the cached data according to the configuration items, create a thread pool, distribute the cut blocks, and use multiple worker threads to asynchronously complete the processing of each block.

优选的,所述配置过程还包括对于某个采样区域的任意缩放倍率展示需求,其散点数据的处理有如下公式:Preferably, the configuration process also includes the display requirements for any zoom ratio of a certain sampling area, and the processing of the scattered point data has the following formula:

Xaisplay=Scalex*(Xsplash-Xtopleft)X aisplay =Scale x *(X splash -X topleft )

Ydisplay=Scaley,*(Ysplash-Ytopleft)Y display =Scale y ,*(Y splash -Y topleft )

其中display指展示,scale为缩放倍率,splash为散点;topleft为采样区域的左上角坐标。Where display refers to display, scale is the zoom ratio, splash is the scatter point; topleft is the upper left corner coordinate of the sampling area.

优选的,用户取得处理结果后,将结果显示到GUI界面上:如果选择输出为块数据集,即包含左上角坐标和散点集,则使用绘制点的功能;如果得到的是8-bit图片,则使用绘制图片的功能。Preferably, after the user obtains the processing result, the result is displayed on the GUI interface: if the output is selected as a block data set, that is, including the coordinates of the upper left corner and the scatter set, the function of drawing points is used; if the obtained 8-bit image is , use the function to draw a picture.

一种对海量散点数据的处理和显示的系统,包括:A system for processing and displaying massive scattered data, including:

数据转换模块,用于将外部的原数据转换为设计好的中间缓存格式,且需要使用到工作线程;The data conversion module is used to convert the external original data into the designed intermediate cache format, and requires the use of worker threads;

数据请求处理模块,用于用户发起请求后,对所述中间缓存格式的数据进行配置、请求和计算;a data request processing module, used for configuring, requesting and calculating the data in the intermediate cache format after the user initiates a request;

数据反馈模块,用于完成配置、请求和计算后,将处理结果分段反馈给用户。The data feedback module is used to feed back the processing results to the user in stages after completing the configuration, request and calculation.

优选的,所述数据转换模块,用于将外部的原数据转换为设计好的中间缓存格式:所述缓存为使用多级散列表或散列表搭配顺序容器的方式设计缓存。Preferably, the data conversion module is used to convert the external original data into a designed intermediate cache format: the cache is designed by using a multi-level hash table or a hash table with a sequential container.

优选的,所述数据转换模块使用到的工作线程是一个工作线程,或者是一个线程池。Preferably, the worker thread used by the data conversion module is a worker thread or a thread pool.

优选的,所述数据请求处理模块在用户发起请求后,对中间缓存格式的数据进行配置、请求和计算,具体为:Preferably, after the user initiates the request, the data request processing module configures, requests and calculates the data in the intermediate cache format, specifically:

配置:按照设计好的格式,组织用于请求计算的配置项,配置项内容包含采样的位置和大小、横纵方向的缩放比例;Configuration: According to the designed format, the configuration items used for request calculation are organized, and the content of the configuration items includes the location and size of the sampling, and the scaling ratio in the horizontal and vertical directions;

请求:将配置项传递给处理单元,并使其运行处理;request: pass the configuration item to the processing unit and make it run the processing;

计算:按照配置项对缓存数据进行分割、创建线程池、分发切割块,由多个工作线程异步完成各个块的处理工作。Calculation: Divide the cached data according to the configuration items, create a thread pool, distribute the cut blocks, and use multiple worker threads to asynchronously complete the processing of each block.

优选的,所述数据请求处理模块的配置过程还包括对于某个采样区域的任意缩放倍率展示需求,其散点数据的处理有如下公式:Preferably, the configuration process of the data request processing module further includes the display requirement of any zoom ratio for a certain sampling area, and the processing of the scattered data has the following formula:

Xdisplay=Scalex*(Xsplash-Xtopleft)X display =Scale x *(X splash -X topleft )

Ydisplay=Scale3*(Ysplash-Ytopleft)Y display =Scale 3 *(Y splash -Y topleft )

其中,display指展示,scale为缩放倍率,splash为散点;topleft为采样区域的左上角坐标。Among them, display refers to the display, scale is the zoom ratio, splash is the scatter point; topleft is the coordinate of the upper left corner of the sampling area.

优选的,所述还包括界面刷新模块,用于用户取得处理结果后,将结果显示到GUI界面上:如果选择输出为块数据集,即包含左上角坐标和散点集,则使用绘制点的功能;如果得到的是8-bit图片,则使用绘制图片的功能。Preferably, it also includes an interface refresh module, which is used to display the results on the GUI interface after the user obtains the processing results: if the output is selected as a block data set, that is, including the coordinates of the upper left corner and the scatter set, then use the drawing point's function; if you get an 8-bit picture, use the function of drawing the picture.

本发明的有益效果是:The beneficial effects of the present invention are:

本发明不依赖显卡,尤其是特定品牌的显卡;不需要额外引入门槛较高的并行计算API(CUDA和OpenCL),降低了学习和维护的成本;相比常规的单工作线程或单线程线性处理方式,该方案能在短时间内完成对大量数据的处理和展示,提升用户的流畅度体验。The invention does not depend on graphics cards, especially graphics cards of a specific brand; it does not need to introduce additional parallel computing APIs (CUDA and OpenCL) with high thresholds, which reduces the cost of learning and maintenance; This solution can complete the processing and display of a large amount of data in a short time, and improve the user's fluency experience.

以下将结合附图对本发明的构思、具体结构及产生的技术效果作进一步说明,以充分地了解本发明的目的、特征和效果。The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings, so as to fully understand the purpose, characteristics and effects of the present invention.

附图说明Description of drawings

图1是本发明的方法流程图。Figure 1 is a flow chart of the method of the present invention.

图2是本发明的系统原理框图。Fig. 2 is a system principle block diagram of the present invention.

图3是本发明的8-bit图片中,每个像素值仅用一个指向颜色表的索引值来记录的示意图。FIG. 3 is a schematic diagram showing that in the 8-bit picture of the present invention, each pixel value is recorded only by an index value pointing to the color table.

具体实施方式Detailed ways

如图1所示,本发明提供一种对海量散点数据的处理和显示的方法,包括以下步骤:As shown in Figure 1, the present invention provides a method for processing and displaying massive scattered data, comprising the following steps:

第一步:将外部的原数据转换为设计好的中间缓存格式,且需要使用到工作线程(工作线程是一个工作线程,或者是一个线程池),其考量有三;Step 1: Convert the external original data into a designed intermediate cache format, and need to use a worker thread (a worker thread is a worker thread or a thread pool), there are three considerations;

1)在原数据不变的前提下,转换后的格式便于针对不同的请求进行反复分割采样;1) On the premise that the original data remains unchanged, the converted format is convenient for repeated segmentation and sampling for different requests;

2)缓存数据需要为快速拾取检测提供支撑,使得用户能够快速判断到鼠标位置应当拾取都哪些散点;2) The cached data needs to provide support for fast pick-up detection, so that the user can quickly determine which scatter points should be picked up at the mouse position;

3)工作线程的使用,避免了大量数据转换对主线程造成阻塞。(如果主线程阻塞,那么程序在此时将无法及时响应用户行为,影响体验)。3) The use of worker threads avoids blocking the main thread due to a large number of data conversions. (If the main thread is blocked, the program will not be able to respond to user behavior in time at this time, affecting the experience).

其中,缓存为使用多级散列表或散列表搭配顺序容器的方式设计缓存。如hash<x,hash<y,vector<pointf>>>和hash<x,hash<y,set<pointf>>>,也可以是hash<point,vector<pointf>>或hash<point,set<pointf>>。其中hash指带有key和value对的散列表,vector是顺序容器,set为仅有key的散列表,x、y指散点的横纵坐标取整值,point由x和y组成,pointf是散点的原数据,其横纵坐标均为浮点数。因为多个浮点坐标求近似整数后可能具有相同整数坐标,所以x、y或point映射后,指向的是一个容器(vector或set),而非单个pointf。散列表的特性使得数据在插入和查找匹配时都非常迅速,这符合处理大量散点数据的需求定位。Among them, the cache is designed by using a multi-level hash table or a hash table with a sequential container. Such as hash<x, hash<y, vector<pointf>>> and hash<x, hash<y, set<pointf>>>, it can also be hash<point, vector<pointf>> or hash<point, set< pointf>>. Where hash refers to a hash table with key and value pairs, vector is a sequential container, set is a hash table with only key, x and y refer to the integer value of the horizontal and vertical coordinates of the scattered points, point consists of x and y, and pointf is The original data of the scatter, whose horizontal and vertical coordinates are floating point numbers. Because multiple floating-point coordinates may have the same integer coordinates after being approximated by an integer, after x, y or point is mapped, it points to a container (vector or set) instead of a single pointf. The characteristics of the hash table make data insertion and matching search very fast, which is in line with the needs of processing a large number of scattered data.

第二步:用户发起请求后,对中间缓存格式的数据进行配置、请求和计算,配置、请求和计算具体为:Step 2: After the user initiates the request, configure, request and calculate the data in the intermediate cache format. The configuration, request and calculation are as follows:

配置:按照设计好的格式,组织用于请求计算的配置项,配置项内容包含采样的位置和大小、横纵方向的缩放比例:Configuration: According to the designed format, the configuration items used for request calculation are organized. The content of the configuration items includes the location and size of the sampling, and the scaling ratio in the horizontal and vertical directions:

请求:将配置项传递给处理单元,并使其运行处理;request: pass the configuration item to the processing unit and make it run the processing;

计算:按照配置项对缓存数据进行分割、创建线程池、分发切割块,由多个工作线程异步完成各个块的处理工作。Calculation: Divide the cached data according to the configuration items, create a thread pool, distribute the cut blocks, and use multiple worker threads to asynchronously complete the processing of each block.

同时,配置过程还包括对于某个采样区域的任意缩放倍率展示需求,其散点数据的处理有如下公式:At the same time, the configuration process also includes the display requirements for any zoom ratio of a certain sampling area, and the processing of the scattered data is as follows:

Xdisplay=Scalex*(Xsplash-Xtopleft)X display =Scale x *(X splash -X topleft )

Ydisplay=Scaley*(Ysplash-Ytopleft)Y display =Scale y *(Y splash -Y topleft )

其中display指展示,scale为缩放倍率,splash为散点;topleft为采样区域的左上角坐标。根据实际处理手法不同,有两种定义:Where display refers to display, scale is the zoom ratio, splash is the scatter point; topleft is the upper left corner coordinate of the sampling area. Depending on the actual processing method, there are two definitions:

1)一次请求共享统一的左上角,该左上角坐标就是采样区域的左上角;1) A request to share a unified upper left corner, the upper left corner coordinate is the upper left corner of the sampling area;

2)各个区块再计算自己局部区域的左上角,以块为单位独立计算和处理。得到的结果(x,y)作为point存储到set中,其目的为作为key值排除重复坐标点,实现类似裁剪剔除的效果,减少后续不必要的处理动作。(set收集完毕后可以选择转为常规容器,如vector后,再反馈给下一步)2) Each block calculates the upper left corner of its own local area, and calculates and processes it independently in units of blocks. The obtained result (x, y) is stored in the set as a point, and its purpose is to exclude duplicate coordinate points as a key value, achieve a similar effect of cropping and culling, and reduce unnecessary subsequent processing actions. (After the set is collected, you can choose to convert it to a regular container, such as a vector, and then feed it back to the next step)

第三步:完成配置、请求和计算后,将处理结果分段反馈给用户。块信息包含起始点(即左上角坐标,这有助于兼容上一步提到的两种处理方式)、处理后的散点集合(可以选择使用set或vector等容器盛放)。在这之前,可以对块数据再进行一次处理:因为散点数据的展示,每个点均为单个像素点,且至少在同一批次中,颜色是一致的。根据这种常规特性,可以选用8-bit的图像来替代散点集,直接以像素图的结果反馈出去。如图3所示,8-bit图片中,每个像素值仅用一个指向颜色表的索引值来记录,而非单独的R、G、B色值,因此图片存储简单快速,且可以直接以数组的形式编写。(具体可以考虑使用Qt的QImage,format选择QImage::Format_Indexed8)。Step 3: After completing the configuration, request and calculation, the processing results are fed back to the user in stages. The block information includes the starting point (that is, the coordinates of the upper left corner, which helps to be compatible with the two processing methods mentioned in the previous step), the processed scattered point collection (you can choose to use a container such as set or vector to hold it). Before this, the block data can be processed again: because of the display of scatter data, each point is a single pixel point, and at least in the same batch, the color is consistent. According to this general characteristic, an 8-bit image can be selected to replace the scatter set, and the result of the pixel map can be directly fed back. As shown in Figure 3, in an 8-bit picture, each pixel value is only recorded with an index value pointing to the color table, rather than a separate R, G, B color value, so the picture storage is simple and fast, and can be directly written in the form of an array. (Specifically, consider using Qt's QImage, and select QImage::Format_Indexed8 for format).

最后,用户取得处理结果后,将结果显示到GUI界面上:如果选择输出为块数据集,即包含左上角坐标和散点集,则使用绘制点的功能;如果得到的是8-bit图片,则使用绘制图片的功能。Finally, after the user obtains the processing results, the results are displayed on the GUI interface: if the output is selected as a block data set, that is, including the upper left corner coordinates and a scatter set, the function of drawing points is used; if the obtained 8-bit image, Then use the function to draw a picture.

如图2所示,本发明还提供一种对海量散点数据的处理和显示的系统,包括:As shown in Figure 2, the present invention also provides a system for processing and displaying massive scattered data, including:

数据转换模块,用于将外部的原数据转换为设计好的中间缓存格式,且需要使用到工作线程;The data conversion module is used to convert the external original data into the designed intermediate cache format, and requires the use of worker threads;

数据请求处理模块,用于用户发起请求后,对中间缓存格式的数据进行配置、请求和计算;The data request processing module is used to configure, request and calculate the data in the intermediate cache format after the user initiates the request;

数据反馈模块,用于完成配置、请求和计算后,将处理结果分段反馈给用户。The data feedback module is used to feed back the processing results to the user in stages after completing the configuration, request and calculation.

其具体实现方法上述已经说明,这里不再赘述。The specific implementation method thereof has been described above, and will not be repeated here.

综上所述,本发明不依赖显卡,尤其是特定品牌的显卡;不需要额外引入门槛较高的并行计算API(CUDA和0penCL),降低了学习和维护的成本;相比常规的单工作线程或单线程线性处理方式,该方案能在短时间内完成对大量数据的处理和展示,提升用户的流畅度体验。To sum up, the present invention does not depend on graphics cards, especially graphics cards of specific brands; it does not need to introduce additional parallel computing APIs (CUDA and OpenCL) with high thresholds, which reduces the cost of learning and maintenance; compared with the conventional single worker thread Or a single-threaded linear processing method, this solution can complete the processing and display of a large amount of data in a short time, and improve the user's fluency experience.

以上详细描述了本发明的较佳具体实施例。应当理解,本领域的普通技术人员无需创造性劳动就可以根据本发明的构思做出诸多修改和变化。因此,凡本技术领域中技术人员依本发明的构思在现有技术的基础上通过逻辑分析、推理或者有限的实验可以得到的技术方案,皆应在由权利要求书所确定的保护范围内。The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and changes according to the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art through logical analysis, reasoning or limited experiments on the basis of the prior art according to the concept of the present invention shall fall within the protection scope determined by the claims.

Claims (10)

1.一种对海量散点数据的处理和显示的方法,其特征在于,包括以下步骤:1. a method for processing and displaying massive scatter data, is characterized in that, comprises the following steps: 将外部的原数据转换为设计好的中间缓存格式,且需要使用到工作线程;用户发起请求后,对所述中间缓存格式的数据进行配置、请求和计算;Convert the external original data into a designed intermediate cache format, and need to use worker threads; after the user initiates a request, configure, request and calculate the data in the intermediate cache format; 完成配置、请求和计算后,将处理结果分段反馈给用户;After completing the configuration, request and calculation, the processing results are fed back to the user in stages; 所述配置、请求和计算具体为:The configuration, request and calculation are specifically: 配置:按照设计好的格式,组织用于请求计算的配置项,配置项内容包含采样的位置和大小、横纵方向的缩放比例;Configuration: According to the designed format, the configuration items used for request calculation are organized, and the content of the configuration items includes the location and size of the sampling, and the scaling ratio in the horizontal and vertical directions; 请求:将配置项传递给处理单元,并使其运行处理;request: pass the configuration item to the processing unit and make it run the processing; 计算:按照配置项对缓存数据进行分割、创建线程池、分发切割块,由多个工作线程异步完成各个块的处理工作。Calculation: Divide the cached data according to the configuration items, create a thread pool, distribute the cut blocks, and use multiple worker threads to asynchronously complete the processing of each block. 2.如权利要求1所述的一种对海量散点数据的处理和显示的方法,其特征在于:所述缓存为使用多级散列表或散列表搭配顺序容器的方式设计缓存。2 . The method for processing and displaying massive scatter data according to claim 1 , wherein the cache is designed by using a multi-level hash table or a hash table with sequential containers. 3 . 3.如权利要求1所述的一种对海量散点数据的处理和显示的方法,其特征在于:所述工作线程是一个工作线程,或者是一个线程池。3 . The method for processing and displaying massive scattered data according to claim 1 , wherein the working thread is a working thread or a thread pool. 4 . 4.如权利要求1所述的一种对海量散点数据的处理和显示的方法,其特征在于,所述配置过程还包括对于某个采样区域的任意缩放倍率展示需求,其散点数据的处理有如下公式:4. The method for processing and displaying massive scatter data as claimed in claim 1, wherein the configuration process further comprises a display requirement for an arbitrary zoom ratio of a certain sampling area, the scatter data of which The processing has the following formula: Xdisplay=Scalex*(Xsplash-Xtopleft)X display =Scale x *(X splash -X topleft ) Ydisplay=Scaley*(Ysplash-Ytopleft)Y display =Scale y *(Y splash -Y topleft ) 其中display指展示,scale为缩放倍率,splash为散点;topleft为采样区域的左上角坐标。Where display refers to display, scale is the zoom ratio, splash is the scatter point; topleft is the upper left corner coordinate of the sampling area. 5.如权利要求1所述的一种对海量散点数据的处理和显示的方法,其特征在于:用户取得处理结果后,将结果显示到GUI界面上:如果选择输出为块数据集,即包含左上角坐标和散点集,则使用绘制点的功能;如果得到的是8-bit图片,则使用绘制图片的功能。5. a kind of method for processing and displaying massive scattered data as claimed in claim 1 is characterized in that: after the user obtains the processing result, the result is displayed on the GUI interface: if the selection output is a block data set, that is, If the upper left corner coordinate and scatter set are included, the function of drawing points is used; if the obtained 8-bit picture is obtained, the function of drawing pictures is used. 6.一种对海量散点数据的处理和显示的系统,其特征在于,包括:6. A system for the processing and display of massive scatter data, comprising: 数据转换模块,用于将外部的原数据转换为设计好的中间缓存格式,且需要使用到工作线程;The data conversion module is used to convert the external original data into the designed intermediate cache format, and requires the use of worker threads; 数据请求处理模块,用于用户发起请求后,对所述中间缓存格式的数据进行配置、请求和计算;a data request processing module, used for configuring, requesting and calculating the data in the intermediate cache format after the user initiates a request; 数据反馈模块,用于完成配置、请求和计算后,将处理结果分段反馈给用户;The data feedback module is used to feed back the processing results to the user in stages after completing the configuration, request and calculation; 所述数据请求处理模块在用户发起请求后,对中间缓存格式的数据进行配置、请求和计算,具体为:The data request processing module configures, requests and calculates the data in the intermediate cache format after the user initiates the request, specifically: 配置:按照设计好的格式,组织用于请求计算的配置项,配置项内容包含采样的位置和大小、横纵方向的缩放比例;Configuration: According to the designed format, the configuration items used for request calculation are organized, and the content of the configuration items includes the location and size of the sampling, and the scaling ratio in the horizontal and vertical directions; 请求:将配置项传递给处理单元,并使其运行处理;request: pass the configuration item to the processing unit and make it run the processing; 计算:按照配置项对缓存数据进行分割、创建线程池、分发切割块,由多个工作线程异步完成各个块的处理工作。Calculation: Divide the cached data according to the configuration items, create a thread pool, distribute the cut blocks, and use multiple worker threads to asynchronously complete the processing of each block. 7.如权利要求6所述的一种对海量散点数据的处理和显示的系统,其特征在于,所述数据转换模块,用于将外部的原数据转换为设计好的中间缓存格式:所述缓存为使用多级散列表或散列表搭配顺序容器的方式设计缓存。7. a kind of system to the processing and display of massive scattered point data as claimed in claim 6, is characterized in that, described data conversion module, is used for external original data to be converted into the intermediate cache format that is designed: The cache described above is designed to use a multi-level hash table or hash table with sequential containers. 8.如权利要求7所述的一种对海量散点数据的处理和显示的系统,其特征在于,所述数据转换模块使用到的工作线程是一个工作线程,或者是一个线程池。8 . The system for processing and displaying massive scattered data according to claim 7 , wherein the working thread used by the data conversion module is a working thread or a thread pool. 9 . 9.如权利要求8所述的一种对海量散点数据的处理和显示的系统,其特征在于,所述数据请求处理模块的配置过程还包括对于某个采样区域的任意缩放倍率展示需求,其散点数据的处理有如下公式:9. A system for processing and displaying massive scatter data as claimed in claim 8, wherein the configuration process of the data request processing module further comprises a display requirement for an arbitrary zoom ratio of a certain sampling area, The processing of the scattered data has the following formula: Xdisplay=Scalex*(Xsplash-Xtopleft)X display =Scale x *(X splash -X topleft ) Ydisplay=Scaley*(Ysplash-Ytopleft)Y display =Scale y *(Y splash -Y topleft ) 其中,display指展示,scale为缩放倍率,splash为散点;topleft为采样区域的左上角坐标。Among them, display refers to the display, scale is the zoom ratio, splash is the scatter point; topleft is the coordinate of the upper left corner of the sampling area. 10.如权利要求6所述的一种对海量散点数据的处理和显示的系统,其特征在于,所述还包括界面刷新模块,用于用户取得处理结果后,将结果显示到GUI界面上:如果选择输出为块数据集,即包含左上角坐标和散点集,则使用绘制点的功能;如果得到的是8-bit图片,则使用绘制图片的功能。10. A system for processing and displaying massive scatter data as claimed in claim 6, characterized in that it further comprises an interface refresh module for displaying the results on the GUI interface after the user obtains the processing results : If the output is selected as a block data set, that is, including the upper left corner coordinates and a scatter set, the function of drawing points is used; if the obtained 8-bit picture is obtained, the function of drawing pictures is used.
CN202010482582.7A 2020-05-30 2020-05-30 A method and system for processing and displaying massive scatter data Pending CN111722887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010482582.7A CN111722887A (en) 2020-05-30 2020-05-30 A method and system for processing and displaying massive scatter data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010482582.7A CN111722887A (en) 2020-05-30 2020-05-30 A method and system for processing and displaying massive scatter data

Publications (1)

Publication Number Publication Date
CN111722887A true CN111722887A (en) 2020-09-29

Family

ID=72565419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010482582.7A Pending CN111722887A (en) 2020-05-30 2020-05-30 A method and system for processing and displaying massive scatter data

Country Status (1)

Country Link
CN (1) CN111722887A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888840A (en) * 2014-03-27 2014-06-25 电子科技大学 Method and device for dragging and zooming video mobile terminal in real time
WO2018018941A1 (en) * 2016-07-28 2018-02-01 武汉斗鱼网络科技有限公司 Method and system for zooming image by using cooperation between opengl and opencl
CN110647013A (en) * 2019-08-30 2020-01-03 合肥芯碁微电子装备有限公司 GDSII format-based parallel data processing method for direct-write lithography machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103888840A (en) * 2014-03-27 2014-06-25 电子科技大学 Method and device for dragging and zooming video mobile terminal in real time
WO2018018941A1 (en) * 2016-07-28 2018-02-01 武汉斗鱼网络科技有限公司 Method and system for zooming image by using cooperation between opengl and opencl
CN110647013A (en) * 2019-08-30 2020-01-03 合肥芯碁微电子装备有限公司 GDSII format-based parallel data processing method for direct-write lithography machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李涛等: "基于线程池的GPU任务并行计算模式研究", 计算机学报, no. 10, 29 December 2017 (2017-12-29) *

Similar Documents

Publication Publication Date Title
US8639730B2 (en) GPU assisted garbage collection
TWI473004B (en) Drag and drop of objects between applications
CN110675480B (en) Method and apparatus for acquiring sampling position of texture operation
KR101558069B1 (en) Computational resource pipelining in general purpose graphics processing unit
CN102880509B (en) System and method for neighborhood analysis of grid digital elevation model based on CUDA
US12112428B2 (en) Shader binding management in ray tracing
CN105550974A (en) GPU-based acceleration method of image feature extraction algorithm
CN103020620B (en) Based on the remote sensing image ortho-rectification method of CPU and GPU associated treatment
US11954830B2 (en) High dynamic range support for legacy applications
US11561637B2 (en) Method and device of drawing handwriting track, electronic apparatus, medium, and program product
US9053529B2 (en) System and method for capturing digital images
US11847733B2 (en) Performance of ray-traced shadow creation within a scene
EP3410297B1 (en) Indirect argument buffers
CN104732490A (en) CUDA-based quick bilateral filtering method
US20190318533A1 (en) Realism of scenes involving water surfaces during rendering
US20220198746A1 (en) Reservoir-based spatiotemporal importance resampling utilizing a global illumination data structure
CN114529658A (en) Graph rendering method and related equipment thereof
US11397615B2 (en) Methods and apparatuses for coalescing function calls for ray-tracing
WO2018018941A1 (en) Method and system for zooming image by using cooperation between opengl and opencl
CN105957028A (en) GPU acceleration patch-based bilateral filter method based on OpenCL
CN106228506A (en) A kind of method of multiple image parallel processing based on GPU
CN101527031B (en) Ray-projection polynuclear parallel body drawing method
US9019284B2 (en) Input output connector for accessing graphics fixed function units in a software-defined pipeline and a method of operating a pipeline
CN111722887A (en) A method and system for processing and displaying massive scatter data
CN103927721A (en) Moving object edge enhancement method based on GPU

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination