Mass stratum data scheduling and visualization method, device, equipment and medium
By applying a multi-resolution data scheduling algorithm and cache management strategy based on external memory technology in the processing of massive strata data, the problem of low processing efficiency of massive strata data is solved, and efficient data extraction and display are achieved.
Patent Information
- Application Number
- CN202311061565.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is difficult to efficiently process and display massive stratigraphic data, resulting in low user interaction performance and low efficiency.
Through a multi-resolution data scheduling algorithm and cache management strategy based on external memory technology, rapid extraction and display of massive stratigraphic data is achieved. The specific steps include initializing the LOD model based on user interaction parameters, determining the data display range, scheduling the data block index number, judging and loading the target data block, and performing data assembly and drawing.
It improves user interaction performance and disk read and write efficiency during large-scale data drawing, and solves the problem of low scheduling and visualization efficiency of massive stratigraphic data.
Smart Images

Figure CN119513182A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer visualization technology, and in particular to a method, device, equipment and medium for scheduling and visualizing massive stratum data. Background Art
[0002] In seismic interpretation, it is often necessary to process and display layered entity models with attributes. Massive grid data must be stored in external storage devices in the form of external memory. In order to improve the data transmission capacity of the drawing pipeline, avoid or reduce the adverse effects of pipeline bottlenecks, and maximize the hardware capabilities to speed up drawing, it is necessary to make full use of various means based on external memory technology to schedule and visualize massive stratigraphic data.
[0003] Existing data scheduling and rendering technologies based on external storage are mainly aimed at terrain data, especially digital elevation models (DEMs), while there are relatively few studies on stratigraphic grid data in geological modeling and seismic interpretation, which leads to the inability to quickly extract and display massive stratigraphic data, reduces the user interaction performance during large-scale data rendering, and thus has low efficiency in scheduling and visualizing massive stratigraphic data. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention provide a method, device, equipment and medium for scheduling and visualizing massive formation data.
[0005] In a first aspect, an embodiment of the present invention provides a method for scheduling and visualizing massive formation data, including:
[0006] Initialize the preset LOD model according to the user interaction parameters, obtain the attribute display parameters, and determine the data display range according to the attribute display parameters;
[0007] Using a preset multi-resolution data scheduling algorithm to schedule the data block index number within the data display range;
[0008] Determine whether the target data block corresponding to the data block index number exists in a preset buffer;
[0009] When the target data block exists in the buffer, displaying the target data block through a preset display thread;
[0010] When the target data block does not exist in the buffer, the target data block is sent to the buffer through a preset data reading thread, and the process returns to the step of displaying the target data block through a preset display thread;
[0011] The displayed target data blocks are assembled and drawn to obtain visualized stratigraphic data.
[0012] According to an embodiment of the present invention, the step of initializing a preset LOD model according to the user interaction parameter to obtain the attribute display parameter includes:
[0013] Calculate the line coverage data block index number of the target profile according to the preset profile line direction and the user interaction parameter;
[0014] Calculate the track coverage data block index number of the target profile according to the preset profile track direction;
[0015] Calculate the index number of the polyline coverage data block of the target section according to the preset polyline direction of the section;
[0016] The stratigraphic data in the preset LOD model is segmented according to the line coverage data block index number, the track coverage data block index number and the broken line coverage data block index number to obtain the attribute display parameters.
[0017] According to an embodiment of the present invention, determining the data display range according to the attribute display parameter includes:
[0018] Determine a first data display area according to the attribute display parameter;
[0019] Determine the second data display area by a preset display area threshold;
[0020] The first data display area and the second data display area are aggregated into the data display range.
[0021] According to an embodiment of the present invention, scheduling the data block index number within the data display range by using a preset multi-resolution data scheduling algorithm includes:
[0022] Add the top data block index in the LOD octree within the data display range to the priority queue;
[0023] Determine whether the queue data stored in the priority queue is full;
[0024] When the data stored in the priority queue is not full, indexing the head data block in the priority queue out of the queue;
[0025] Determine whether there is a data sub-block that has not been queued in the queue data block index, and when the data sub-block does not exist in the queue data block index, return to the step of determining whether the queue data stored in the priority queue is full;
[0026] When the data sub-block exists, determining whether the data sub-block is in the visible viewing area; when the data sub-block does not exist in the visible viewing area, returning to the step of determining whether the head data block index has a data sub-block that has not been queued;
[0027] When the data sub-block is within the visible viewing area, calculating the priority function value of the data sub-block;
[0028] Select the data sub-block with the highest priority function value and add it to the priority queue, and return to the step of determining whether there is any unqueued data sub-block at the head data block index;
[0029] When the data stored in the priority queue is full, the data block index number within the display data range is determined according to the data block index in the priority queue.
[0030] According to an embodiment of the present invention, the calculating the priority function value of the data sub-block includes:
[0031] The priority function value of the data sub-block is calculated using a preset priority function, wherein the priority function is:
[0032]
[0033] Among them, P is the priority function value, Camera is the attribute display parameter, Brick is the data block, dist is the distance between the data block and the viewpoint position in the attribute display parameter, level is the depth of the data block in the octree LOD model, α is the angle between the normal vector of the stratigraphic section in the data block and the line of sight direction in the attribute display parameter, and sin is the sine function.
[0034] According to an embodiment of the present invention, the step of performing data assembly and drawing on the displayed target data block to obtain visualized stratigraphic data includes:
[0035] Detecting the spatial topological relationship of control points in the displayed target data block;
[0036] Using a preset quadrilateral grid, extracting profile data of the target stratum according to the spatial topological relationship;
[0037] Converting the profile data into a data stream form;
[0038] The data stream is loaded into the video memory for rendering using a preset vertex array mechanism to obtain visualized stratum data.
[0039] According to an embodiment of the present invention, sending the target data block into a buffer through a preset data reading thread includes:
[0040] Selecting target elements in the buffer one by one according to a preset element threshold;
[0041] Construct a maximum heap according to the timestamp of the target element;
[0042] Compare the timestamps of the unselected target elements in the buffer with the top elements of the maximum heap one by one to obtain timestamp differences;
[0043] When the timestamp difference is less than zero, the top element of the heap is replaced by the target element that has not been selected, and the maximum heap is adjusted according to the timestamp to obtain an updated maximum heap;
[0044] Eliminate the target old element in the updated maximum heap according to the memory address of the target element in the updated maximum heap;
[0045] According to the memory address corresponding to the target old element, the target data block is sent to the buffer through a preset data reading thread.
[0046] In a second aspect, an embodiment of the present invention provides a massive formation data scheduling and visualization device, characterized in that it includes:
[0047] A data display range determination module, used to initialize a preset LOD model according to user interaction parameters, obtain attribute display parameters, and determine a data display range according to the attribute display parameters;
[0048] A data block index number scheduling module, used for scheduling the data block index numbers within the data display range by using a preset multi-resolution data scheduling algorithm;
[0049] A target data block determination module is used to determine whether the target data block corresponding to the data block index number exists in a preset buffer;
[0050] A target data block display module, configured to display the target data block through a preset display thread when the target data block exists in the buffer;
[0051] a target data block reading module, used for sending the target data block into the buffer through a preset data reading thread when the target data block does not exist in the buffer, and returning to the step of displaying the target data block through a preset display thread;
[0052] The data assembly and drawing module is used to perform data assembly and drawing on the displayed target data blocks to obtain visualized stratigraphic data.
[0053] In a third aspect, an embodiment of the present invention provides a device, comprising:
[0054] processor;
[0055] a memory for storing instructions executable by the processor;
[0056] Wherein, the processor is configured to execute the instructions to implement a method for scheduling and visualizing massive formation data as described in the first aspect.
[0057] In a fourth aspect, an embodiment of the present invention provides a medium on which a computer program is stored. When the program is executed by a processor, a method for scheduling and visualizing massive formation data as described in the first aspect is implemented.
[0058] Compared with the prior art, the above technical solution of the present invention has the following beneficial effects:
[0059] The embodiment of the present invention makes full use of the means based on external memory technology to realize the rapid extraction and display of the profile data in the line, track and broken line directions of the layered entity model with attributes, accelerates the scheduling of multi-resolution data through a top-down spatial search strategy, and schedules the index number of the data block required within the display range; and designs cache management according to the locality of user data in time and space; balances resources between the system foreground and background through the concurrent design of display threads and data reading threads and multi-threading technology, ensuring that the system foreground can respond to user requests in real time; gives full play to the advantages of OpenGL's vertex cache technology, organizes the data to be drawn into quadrilateral data streams, improves the drawing efficiency, effectively improves the disk reading and writing efficiency during large-scale data scheduling, and improves the user interaction performance during large-scale data drawing. Therefore, the method, device, equipment and medium for scheduling and visualizing massive stratigraphic data proposed by the present invention can solve the problem of low efficiency in scheduling and visualizing massive stratigraphic data. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Figure 1 A schematic diagram showing the structure of a method for scheduling and visualizing massive formation data according to a first embodiment of the present invention is shown;
[0062] Figure 2 A schematic diagram showing a flow chart of a method for scheduling and visualizing massive formation data according to a first embodiment of the present invention;
[0063] Figure 3 A schematic top view of a target selected stratum according to a first embodiment of the present invention is shown;
[0064] Figure 4 A schematic top view of a stratum formed by a block according to the first embodiment of the present invention is shown;
[0065] Figure 5A schematic diagram showing the coverage of detail data blocks at different levels by broken line segments according to the first embodiment of the present invention;
[0066] Figure 6a A schematic diagram of profile attributes extracted at a designated line in a stratum according to the first embodiment of the present invention is shown;
[0067] Figure 6b A schematic diagram showing the profile attributes extracted at a designated path in a stratum according to the first embodiment of the present invention is shown;
[0068] Figure 6c A schematic diagram showing the cross-sectional properties in the first fold line direction of the first embodiment of the present invention is shown;
[0069] Figure 6d A schematic diagram showing the cross-sectional properties in the second fold line direction of the first embodiment of the present invention is shown;
[0070] Figure 7 A schematic diagram showing a flow chart of a multi-resolution scheduling strategy according to the first embodiment of the present invention;
[0071] Figure 8a A schematic diagram showing an enlarged first cross-sectional view of the first embodiment of the present invention is shown;
[0072] Figure 8b A schematic diagram showing an enlarged display of the second cross-section direction of the first embodiment of the present invention is shown;
[0073] Figure 8c The third cross-sectional view of the first embodiment of the present invention is enlarged and displayed;
[0074] Figure 9a A schematic diagram showing the frame rate variation when a buffer zone is not used according to the first embodiment of the present invention is shown;
[0075] Figure 9b A schematic diagram showing the frame rate change of the first buffer in the first embodiment of the present invention is shown;
[0076] Fig.9c A schematic diagram showing the frame rate change of the second buffer in the first embodiment of the present invention is shown;
[0077] Figure 9d A schematic diagram showing a frame rate change of the third buffer zone according to the first embodiment of the present invention is shown;
[0078] Fig.10 A schematic diagram showing cache management according to the first embodiment of the present invention is shown;
[0079] Fig.11 A schematic diagram of a ring stack according to a first embodiment of the present invention is shown;
[0080] Fig.12aA schematic diagram of a frame rate curve under ultra-high-speed viewpoint operation according to the first embodiment of the present invention is shown;
[0081] Figure 12b A schematic diagram of a frame rate curve under high-speed viewpoint operation according to the first embodiment of the present invention is shown;
[0082] Fig.12c A schematic diagram of a frame rate curve under medium-speed viewpoint operation according to the first embodiment of the present invention is shown;
[0083] Fig.12d A schematic diagram of a frame rate curve under low-speed viewpoint operation according to the first embodiment of the present invention is shown;
[0084] Fig.13 A functional module diagram of a massive formation data scheduling and visualization device according to a third embodiment of the present invention is shown;
[0085] Fig.14 A schematic diagram of the composition structure of a device for implementing the method for scheduling and visualizing massive formation data according to the fourth embodiment of the present invention is shown. DETAILED DESCRIPTION
[0086] The present disclosure is further described below in conjunction with the embodiments shown in the accompanying drawings.
[0087] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0088] The present invention proposes a method for scheduling and visualizing massive stratigraphic data using computer visualization technology. Based on the theory of external memory data scheduling, the multi-resolution data scheduling method is combined to build a buffer zone to achieve stratigraphic data scheduling and visualization. Compared with traditional methods, the massive stratigraphic data scheduling and visualization technology is more efficient and reduces human subjectivity, and has great potential and application prospects in seismic data interpretation applications.
[0089] Embodiment 1
[0090] like Figure 1 As shown, the present invention proposes a structural schematic diagram of a method for scheduling and visualizing massive stratum data, including a management layer, a scheduling layer and a rendering layer.
[0091] Management layer: Located at the bottom of the system, it is responsible for finding the required data blocks in the disk, completing the real-time loading of data from external storage to internal memory, and providing a data query interface to the upper scheduling layer. This layer should reuse data as much as possible, reduce the number of disk reads and writes, and reduce the adverse effects of low-speed I / O processes on the entire system.
[0092] Scheduling layer: Located in the middle layer, it is responsible for determining the resolution level to be adopted and the range of data blocks to be read at the level according to the current display hardware performance and display parameters such as viewpoint and frustum, and then calling the data interface of the management layer to obtain the actual data;
[0093] Rendering layer: Obtains interactive parameters from users, such as parameter information of lines, paths, and polylines; assembles the data blocks dispatched by the lower layer, organizes them into vertex and index data streams, and hands them over to the rendering engine for drawing.
[0094] like Figure 2 As shown, the present invention proposes a method for scheduling and visualizing massive formation data, comprising the following steps:
[0095] S1. Initialize a preset LOD model according to user interaction parameters to obtain attribute display parameters, and determine a data display range according to the attribute display parameters.
[0096] In an embodiment of the present invention, the user interaction parameters are obtained through a user interface, such as parameter information of line, track, and broken line directions, and the LOD model can obtain stratigraphic data displaying different levels of detail in different situations through resolution, and the stratigraphic data can be graded through resolution, and the size of each data block in the stratigraphic data can be input by the user to form an interface that can interact with the user, and the stratigraphic data can be pre-processed through the user interaction parameters, and then the corresponding attributes can be extracted from the stratigraphic data and displayed according to the user interaction parameters.
[0097] Furthermore, the attribute information of the stratigraphic data is an important part of the layered entity model data after attribute modeling. It contains some important internal properties of the stratigraphic data, such as temperature, pressure, density, etc., which plays a vital role in the oil and gas reservoir modeling and geological interpretation system. Researchers often need to visualize the stratigraphic attributes to inspect and process the stratigraphic data in an intuitive form. Usually, the stratigraphic grid model is observed in the form of a cross-section slice, which can be divided into three categories according to the different cross-section forms: line, track, and broken line directions.
[0098] In an embodiment of the present invention, the attribute display parameters include the current display hardware performance and display parameters such as viewpoint and viewing cone, determine the resolution level to be adopted and the range of data blocks to be read at the level, and then call the data interface of the management layer to obtain the actual data.
[0099] In the embodiment of the present invention, the step of initializing the preset LOD model according to the user interaction parameter to obtain the attribute display parameter includes:
[0100] Calculate the line coverage data block index number of the target profile according to the preset profile line direction and the user interaction parameter;
[0101] Calculate the track coverage data block index number of the target profile according to the preset profile track direction;
[0102] Calculate the index number of the polyline coverage data block of the target section according to the preset polyline direction of the section;
[0103] The stratigraphic data in the preset LOD model is segmented according to the line coverage data block index number, the track coverage data block index number and the broken line coverage data block index number to obtain the attribute display parameters.
[0104] In detail, Figure 3 As shown in the figure, it is a top view schematic diagram (XY plane) of the target selected stratum. The line and track directions are the arrangement directions of the original sampling data in the stratum, which are consistent with the two axial directions of the X and Y planes; the broken line direction is defined in the form of any multiple coordinate points and their connecting lines on the XY plane. It is relatively easy to collect the stratum data in the line and track direction. Each stratum block records the line and track number range in the block_head structure. For the section position of a given line and track coordinate, the index number of the data block covered on the section can be calculated.
[0105] Specifically, the acquisition of stratigraphic data in the direction of the broken line is more flexible and more complicated than the data acquisition in the direction of the line and track. The preprocessing of stratigraphic data is also mainly carried out on the section in the direction of the broken line, and the broken line is divided into several line segments for separate processing. For each stratigraphic block in the same stratum, the Liang Youdong-Barsky algorithm is first used to clip the line segments that make up the broken line, calculate the coordinates of the intersection of the line segment and the block boundary, and then determine the range of the broken line segment to which the block belongs. Figure 4As shown in the figure, it is a top view of the stratum composed of three blocks A, B, and C. The section position in the broken line direction is defined by five points a, b, c, d, and e. After segment clipping, four endpoints P1, P2, P3, and P4 are added. The corresponding relationship between the stratum blocks and the broken line segments can be determined. For example, the line segments to which block A belongs are P1-b and b-P2, and the remaining broken line segments block A can be ignored. The main purpose of preprocessing the data in the broken line direction is to obtain the data block index number on the broken line path. For each intersecting line segment of the stratum block, firstly, the line segment is sampled with a unit step length on one coordinate axis in a processing method similar to the line drawing algorithm, and the coordinate value on the other coordinate axis is calculated according to the slope and intercept, so as to determine the positions of several intersections of the line segment and the regular sampling grid. Then, the index numbers of several data blocks covered by the line segment are determined according to the regular sampling grid. This is the most refined level of data blocks covered by the broken line segment, which is located at the bottom of the octree structure of the stratum grid LOD model. Finally, according to the position relationship of the data blocks and the grid range, the data blocks are merged and the index numbers are calculated upward along the octree structure to generate a coarser level of data block sets. This process is iterated continuously until the top level of the octree. After data preprocessing, the index number of the data block covered by each polyline segment has been obtained and can be directly used for the next step of data block scheduling.
[0106] For example, the octree structure of the stratigraphic grid LOD model builds data block indexes based on the x-direction, y-direction, and z-axis direction. In a section, the data can be arbitrarily divided into different shapes by polylines. It is necessary to recreate the data block index based on the data in the octree and the data on the polyline, merge the data blocks and calculate the index number upward along the octree structure to generate a coarser level data block set, such as Figure 5 As shown in the figure, it is a schematic diagram of the coverage of different levels of detail data blocks by the polyline segment. Through the arbitrary shape of the polyline segment in the section, a coarser level data block set is generated through the octree. This process is iterated continuously until the top level of the octree. These data blocks are located at different levels of the octree and can meet the drawing requirements of different levels of precision.
[0107] Furthermore, according to the data block index numbers in the three categories of line, track, and broken line directions in different section slices, their internal properties can be observed, that is, the stratigraphic data is segmented through the LOD model into data blocks of different levels, thereby obtaining the attribute display parameters of the stratigraphic data, and then determining the data display range of the stratigraphic data according to the attribute display parameters.
[0108] In one of the practical application scenarios of the present invention, a multi-resolution scheduling and visualization framework for massive stratigraphic grid data is implemented using C++. The test data is a stratigraphic attribute model named STRATA_05. The LOD model has 7 levels of detail, a total of 84,105 data blocks, and a total data volume of about 20GB. The attribute profile slices of the STRATA_05 model are generated in the specified line, track, and polyline directions, and quadrilaterals are used as drawing primitives, such as Figure 6a As shown in , it is a schematic diagram of the profile attributes extracted at the specified line in the stratum, which shows the profile extracted according to the line direction; Figure 6b As shown in , it is a schematic diagram of the profile attributes extracted at a specified track in the stratum, which shows the profile extracted according to the track direction; Figure 6c As shown in the figure, it is a schematic diagram of the profile attributes in the first broken line direction. The left side is an irregular broken line on the XY plane specified by the user during interaction, and the right side is the profile attributes defined in the formation for the corresponding broken line. Figure 6d The figure shows the profile attributes of the second polyline direction. The left side shows an irregular polyline on the XY plane specified by the user during interaction, and the right side shows the profile attributes defined by the corresponding polyline in the stratum. The experiment shows that the scheduling system can extract and display the corresponding attributes from the stratum data according to the user interaction parameters, which basically meets the data management and visualization requirements in the fields of geological exploration.
[0109] In the embodiment of the present invention, the data display range is based on the display parameters of the current user's display screen, and the data outside the display screen is preloaded in advance to prevent the user from panning or zooming, so as to improve the display speed.
[0110] In the embodiment of the present invention, determining the data display range according to the attribute display parameter includes:
[0111] Determine a first data display area according to the attribute display parameter;
[0112] Determine the second data display area by a preset display area threshold;
[0113] The first data display area and the second data display area are aggregated into the data display range.
[0114] In detail, the first data display area is the data range displayed according to the attribute display parameters, and the second data display area is the data range displayed within a preset display area threshold based on other than the attribute display parameters, thereby combining the first data display area and the second data display area into a data display range.
[0115] Exemplarily, according to the current attribute display parameters displayed on the display screen, data outside the display screen needs to be preloaded in advance to prevent the user from panning or zooming the display range in the display screen to improve the display speed. For example, the location information in the map is loaded piece by piece, so the image is processed in blocks, and data other than the seen data is loaded in for prediction to improve the display speed.
[0116] Furthermore, since the multi-resolution data is very large and cannot be loaded into the memory for display at one time, it is necessary to select a suitable detail level based on the current display parameters and the hardware performance of the machine used. At the same time, it is not necessary to load all the data blocks on this level into the main memory. It is only necessary to load some of the data blocks that are being or to be drawn in real time according to the current display parameters, thereby improving the disk read and write efficiency.
[0117] S2. Schedule the data block index numbers within the data display range using a preset multi-resolution data scheduling algorithm.
[0118] In the embodiment of the present invention, after data preprocessing, the massive stratigraphic grid data presents several levels of detail models with different degrees of precision. The models of each level are spatially organized in the form of data blocks, and the data are stored in the form of files on the disk. When drawing, a suitable level of detail can be selected according to the current display parameters and the hardware performance of the machine used. At the same time, it is not necessary to call all the data blocks on the level into the main memory. Only part of the data blocks that are being or will be drawn need to be called in real time according to the current display parameters. That is, the index number of the data block within the data display range is scheduled according to the user display parameters.
[0119] In the embodiment of the present invention, the method of scheduling the data block index number within the data display range by using a preset multi-resolution data scheduling algorithm includes:
[0120] Add the top data block index in the LOD octree within the data display range to the priority queue;
[0121] Determine whether the queue data stored in the priority queue is full;
[0122] When the data stored in the priority queue is not full, indexing the head data block in the priority queue out of the queue;
[0123] Determine whether there is a data sub-block that has not been queued in the queue data block index, and when the data sub-block does not exist in the queue data block index, return to the step of determining whether the queue data stored in the priority queue is full;
[0124] When the data sub-block exists, determining whether the data sub-block is in the visible viewing area; when the data sub-block does not exist in the visible viewing area, returning to the step of determining whether the head data block index has a data sub-block that has not been queued;
[0125] When the data sub-block is within the visible viewing area, calculating the priority function value of the data sub-block;
[0126] Select the data sub-block with the highest priority function value and add it to the priority queue, and return to the step of determining whether there is any unqueued data sub-block at the head data block index;
[0127] When the data stored in the priority queue is full, the data block index number within the display data range is determined according to the data block index in the priority queue.
[0128] In detail, Figure 7 As shown in the figure, it is a flowchart of the multi-resolution scheduling strategy, which more specifically represents the multi-resolution scheduling strategy, that is, the priority queue PriorQueue is implemented with a maximum heap, which stores the index of the data block currently entering the scheduling system and arranges them according to the priority function value P(Node, Camera). This value reflects the degree to which the data block should be refined. The closer the data block is to the head of the queue, the more it should be refined in the next scheduling operation. Whenever a new data block index enters the queue from the tail of the PriorQueue, or the data block index with the highest priority is dequeued from the head of the PriorQueue, the PriorQueue must perform a top-down or bottom-up heap adjustment to ensure the correct priority sorting. The length of the PriorQueue is the maximum number of data blocks that the scheduling system can currently draw, which can be set or adjusted by the user according to the hardware performance.
[0129] Specifically, in order to eliminate the invisible parts in the scene, reduce the data submitted to the rendering engine as much as possible, and improve the rendering speed, it is necessary to advance the projection space clipping originally performed in the rendering engine to the object space, perform visibility tests on the data that will enter the rendering engine in advance, and eliminate the obviously invisible data in the object space. Only retain some valid data and send it to the rendering engine, thereby greatly reducing the data transmission pressure on the graphics card bus and alleviating the adverse effects of the bus bandwidth limitation on the entire rendering system. The judgment of whether the data sub-block is in the visible view area is based on the 3D clipping system, which usually includes frustum clipping, back clipping and occlusion clipping. Among them, occlusion clipping and back clipping require a lot of calculations in the object space, which are generally implemented by the rendering engine (OpenGL). Frustum clipping uses a flat-headed prism to simulate the view of a person (View Frustum), and all objects that are not in this frustum are eliminated, and the octree LOD model based on data block is very beneficial to view area clipping. On the one hand, the granularity of the visibility test is raised from the primitive level to the data block level: the eight vertices of a single data block are tested for visibility separately. If all eight vertices are outside the view cone, the entire data block is marked as invisible and all are removed before being sent to the bus. This eliminates the need to test a large number of primitives in the data block separately, which improves the computational efficiency of viewport clipping. On the other hand, the data refinement process in the multi-resolution rendering system can be implemented as the process of viewport clipping along the octree descent in the LOD model. The spatial segmentation characteristics of the octree can greatly reduce the number of visibility tests on data blocks during the data refinement process. The number of data blocks at the top level of the octree is relatively small, and each data block covers a larger range. In this way, only the top-level data blocks are tested for visibility in the early stages of data refinement. If all eight vertices of a top-level data block are outside the viewing cone, the data block is invisible, and all its child nodes are invisible, so there is no need to recursively test its child nodes by descending the octree; if all eight vertices are inside the viewing cone, the data block is not only visible, but all its child nodes are visible, and there is no need to recursively test the child nodes, only to mark them as visible; only the data blocks at the edge of the viewing cone do not have all eight vertices inside or outside the viewing cone, and it is necessary to perform visibility tests on the child nodes by descending the octree. Therefore, the octree LOD model can eliminate a large range of data at a very low cost, improving the efficiency of data refinement.
[0130] For example, to demonstrate the superiority of the multi-resolution scheduling system in large-scale data rendering, a LOD test based on external memory is performed on a certain line direction section of the STRATA_05 model, and the average frame rate is recorded during user interaction (such as translation, zooming, rotation, etc.), such as Figure 8a As shown, it is a schematic diagram of the first cross-section direction, where the multi-resolution level is 3, the number of polygons is 15877, and the average frame rate is 15.8. Figure 8b As shown, it is a schematic diagram of the second cross-section direction, where the multi-resolution level is 2, the number of polygons is 21704, and the average frame rate is 13.0. Figure 8c As shown, it is a schematic diagram of the third section direction, where the multi-resolution level is 1, the number of polygons is 25236, and the average frame rate is 14.1. Figure 8b for Figure 8a The result after the partial enlargement of the white line frame part. Figure 8c for Figure 8b The result after partial enlargement of the white frame part in the middle. Figure 8a , Figure 8b , Figure 8c They are located at three different levels of detail, and the distance from the viewpoint is constantly decreasing. As can be seen from the figure, when the user's viewpoint is closer to the stratigraphic section, the number of data blocks clipped by the view cone in the section increases, and the visible data blocks in the view area are drawn at a higher resolution to depict more detailed information in the section attributes; at the same time, the number of quadrilaterals sent to the rendering engine has not increased significantly, thus maintaining a relatively stable frame rate, and there is no obvious sense of stagnation when drawing. Experiments show that the multi-resolution scheduling system can adaptively adjust the multi-resolution levels of massive stratigraphic LOD models according to user interaction and display parameters, and maximize the image drawing quality while ensuring a certain frame rate, with good visual effects and user interaction performance.
[0131] Furthermore, when the data sub-block is within the visible field of view, it is also necessary to use a preset priority function to calculate the priority function value of the data sub-block. The priority function value determines the order of the data block in the priority queue PriorQueue, reflecting the trend that the data block should be refined. The data block with a higher priority function value will be replaced by its eight sub-blocks sooner.
[0132] In the embodiment of the present invention, the calculating the priority function value of the data sub-block includes:
[0133] The priority function value of the data sub-block is calculated using a preset priority function, wherein the priority function is:
[0134]
[0135] Among them, P is the priority function value, Camera is the attribute display parameter, Brick is the data block, dist is the distance between the data block and the viewpoint position in the attribute display parameter, level is the depth of the data block in the octree LOD model, α is the angle between the normal vector of the stratigraphic section in the data block and the line of sight direction in the attribute display parameter, and sin is the sine function.
[0136] In detail, the parameter Camera represents the current display parameters of the drawing system, such as the viewpoint position ViewPoint, the orientation Orientation, the perspective angle, etc.; the parameter Brick refers to the attributes of the relevant data block. dist is the distance between the Brick and the viewpoint ViewPoint. The closer the Brick is to the ViewPoint, the greater the contribution of the Brick refinement to the overall image effect; level is the depth of the Brick in the octree LOD model, and the data blocks at a shallower level in the octree should be refined first; α is the angle between the normal vector of the stratigraphic section in the Brick and the sight direction Orientation. When sin(α) is 1, the Brick has no contribution to the final image. The smaller sin(α) is, the section is facing the viewpoint, and the greater the effect of refinement.
[0137] Furthermore, the data organization technology based on external memory requires the data scheduling module to constantly access the external memory device to obtain new data to update the old data currently displayed. From the perspective of the way users browse geological data, the possibility that the currently visible data block will still be visible in the near future is quite high (frame-to-frame correlation), that is, the access to external memory data has temporal locality. Therefore, in order to reduce the number of disk I / O interactions and effectively utilize the data that has been read into the memory before, a cache management scheme for the formation LOD model is designed to minimize the adverse effects of the bottleneck of internal and external memory data interaction on the performance of the entire multi-resolution scheduling and visualization system.
[0138] S3. Determine whether the target data block corresponding to the data block index number exists in a preset buffer.
[0139] In one of the practical application scenarios of the present invention, in a multi-resolution scheduling system, the use of a buffer is particularly important for efficient disk data exchange. In order to fully test the performance of the entire system, a viewpoint trajectory is defined for the display of the STRATA_05 model, and the change in frame rate is measured during the viewpoint transformation process. This viewpoint trajectory includes operations such as translation, rotation, and scaling, involving most areas of the STRATA_05 model. A total of about 500MB of data needs to be read from the LOD file (wherein there may be repeated data blocks read in). The entire display process totals about 300 frames, and under ideal conditions, it takes about 20 seconds of rendering time, and the average frame rate can be maintained at around 13 frames / second. In order to demonstrate the important role of the adopted cache management solution in improving system performance, the frame rates of the above viewpoint trajectories are measured and recorded without using a buffer and using buffers of different sizes.
[0140] In detail, Figure 9aThe figure shows the frame rate change when no buffer is used, that is, all operations are performed sequentially, and the entire system has only one thread responsible for the entire process of viewport clipping, data scheduling, disk reading, and rendering display. Figure 9a The frame rate represented by the middle curve is extremely unstable, with frequent serious frame drops, frequent screen freezes during display, and user interaction failures, which seriously affect the normal use of users. These phenomena are all caused by the single-threaded system waiting for slow disk data exchange; Figure 9b As shown in the figure, it is a schematic diagram of the frame rate change of the first buffer. The buffer is set to 50 data blocks, and the total memory usage is 12MB. The shape of the frame rate curve is compared with Figure 9a There are some minor improvements, and serious frame drops have been reduced; such as Fig.9c As shown in FIG. 1 , it is a schematic diagram of the frame rate change of the second buffer. The buffer is set to 200 data blocks, and the memory occupies 50MB. The shape of the frame rate curve is significantly improved, and most of the long downward barbs are eliminated. The display process does not show obvious stagnation, and the response is relatively fast during user interaction, but the frame rate is not stable enough. Figure 9d The figure shows the frame rate change of the third buffer. The buffer is set to 1000 data blocks and the memory occupancy is 250MB. The figure shows that the stability of the frame rate has been greatly improved. Although there are still some minor frame drops, it hardly affects the normal use of users. The data drawing process is natural and smooth, and the user operation is sensitive, which basically meets the real-time visualization requirements of geological modeling and interpretation software. A cache solution is adopted, and an asynchronous data reading thread is added to be responsible for disk interaction, separating slow operations from user interaction, and achieving good results. The proposed cache management solution effectively improves the disk read and write efficiency during large-scale data scheduling and improves the user interaction performance during large-scale data drawing.
[0141] In the embodiment of the present invention, in order to improve the user interaction performance when drawing large-scale data, it is necessary to open up a space in the memory in advance as a buffer of the entire scheduling system, and add the new data block in the formation LOD model from the disk to the buffer, and use the data block index number as the unique identifier. In addition, a request queue (Fetching Queue) and a pre-fetching request queue (PreFetching Queue) are set up, both of which are implemented as a ring stack, and are used to manage the data reading request and the pre-fetching request based on data prediction in the scheduling system. It also includes three external interfaces: AddNewRequest, AddPreFetch and GetBrickAddress.
[0142] In detail, Fig.10As shown in the figure, it is a schematic diagram of cache management. The multi-resolution data scheduling system calls the AddNewRequest interface to send the required data block index number into the request queue; the data prediction thread calls the AddPreFetch interface to send the pre-fetched data block index number into the pre-fetch queue; the display thread calls the GetBrickAddress interface to obtain the memory address of the data block to be drawn in the buffer. There is also an internal data reading thread (ReadDataToBuffer) responsible for taking out data requests from the request queue and the pre-fetch queue, and then checking the buffer according to the data block index number. If the data block is not in the buffer, the data block is read from the corresponding position of the disk file and sent to the buffer; if the buffer is full, an elimination strategy needs to be applied, similar to LRU. In the two request queues, the Fetching Queue has a higher priority than the PreFetchingQueue. Only when the Fetching Queue is empty, the data reading thread will use the idle machine time to perform data pre-fetching operations.
[0143] Furthermore, the correlation between frames is utilized to avoid a large number of repeated disk read and write operations, effectively reducing the I / O load and improving the performance of the entire scheduling system. The size of the request queue and buffer can be set and adjusted by the user according to hardware performance or application requirements, thereby controlling the memory usage of the entire scheduling and drawing system.
[0144] S4. When the target data block exists in the buffer, display the target data block through a preset display thread.
[0145] In the embodiment of the present invention, when the target data block exists in the buffer, the target data block in the buffer is directly displayed through the display thread, and the display thread is a GetBrickAddress interface, which searches for a specified data block in the buffer, obtains its memory address and updates the timestamp.
[0146] In detail, the GetBrickAddress interface of the display thread inputs the index number Brick_ID of the specified data block in the input parameter, and outputs the memory address of the data block, that is, locks the buffer, searches for Brick_Data in the buffer according to the index number Brick_ID, and if Brick_Data is not found in the buffer, unlocks the buffer and returns a null pointer; if Brick_Data is found in the buffer, writes the system time to the timestamp Time_Stamp of the Brick_Data, unlocks the buffer, returns the data address &Value of the Brick_Data, and displays the target data block.
[0147] Specifically, the buffer stores the data blocks and their index numbers that have been scheduled and read from the disk file. When the number of data blocks is huge, the data management requirement for the buffer is to be able to quickly find the memory address of the corresponding data block according to the required data block index number. The buffer is organized in the form of a balanced binary search tree (such as a red-black tree, which can be implemented using the map in STL), and its element BufferElement can be defined as the following two-tuple: BufferElement = <Brick_ID, Brick_Data>, where Brick_ID is the data block index number, used as the keyword of the binary search tree; Brick_Data is the data block. In a balanced binary search tree, it can be guaranteed that the corresponding Brick_Data can be found according to the Brick_ID in O(lgN) time, avoiding inefficient O(N) linear search.
[0148] Furthermore, if the data block is not in the buffer, the data block is read from the corresponding position of the disk file and sent to the buffer. The data reading thread is responsible for taking out the data request from the request queue and the pre-fetch queue and sending the target data block to the buffer.
[0149] S5. When the target data block does not exist in the buffer, the target data block is sent to the buffer through a preset data reading thread, and the process returns to the step of displaying the target data block through a preset display thread.
[0150] In an embodiment of the present invention, when the target data block does not exist in the buffer, since the output of the multi-resolution scheduling system is the index number of all data blocks that need to be drawn at present, these index numbers are entered into the request queue as data requests, waiting for the data reading thread to process them. Since the data reading thread requires more disk interactions, the speed of processing data requests is much slower than the speed of the scheduling system generating data requests. In the case where the scheduling system continuously generates new data block indexes, data requests often accumulate in the Fetching Queue and cannot be processed in time by the data reading thread. When a new data request arrives, the data reading thread should give priority to the latest data request, because this part of the data block reflects the user's real-time display needs.
[0151] Specifically, the request queue is organized into a stack, and the later request is at the top of the stack and will be processed preferentially by the read thread. On the other hand, the stack capacity is limited. When new data requests continue to arrive and the read thread has no time to process them, the stack space will overflow. To avoid the infinite growth of the stack space, considering that the data requests at the bottom of the stack are relatively old and cannot reflect the real-time browsing of the user data area, when the stack space is full, the later data request can directly clear the original data at the bottom of the stack, that is, the stack is connected head to tail, and the request queue and pre-fetch queue are realized with a circular stack.
[0152] Specifically, Fig.11 The figure shows a schematic diagram of a circular stack. The circular stack CircleStack is implemented using an array. The length of the array is the upper limit of the number of data requests that can be stored in advance. Two pointers, top and bottom, are set to indicate the top and bottom positions of the stack respectively. The pointer top can move in both directions, indicating that elements are pushed into and popped out of the stack; the bottom pointer bottom can also move, but can only move forward when the stack is full. The stack is empty condition when top == bottom; the stack is full condition when (top+1) mod length == bottom, at this time, top and bottom move forward one position at the same time. A lock mechanism is required to protect the shared stack when elements are pushed into and popped out of the stack. The advantage of using a circular stack is that the scheduling system always gives priority to responding to the latest requests browsed by users, and the stack never overflows.
[0153] In the embodiment of the present invention, the step of sending the target data block into a buffer through a preset data reading thread includes:
[0154] Determining whether the storage area of the buffer is full;
[0155] When the storage area of the buffer is not full, the target data block is sent to the buffer through the data reading thread.
[0156] In detail, the data reading thread is the AddNewRequest interface, whose function is to add the new data request to the request queue Fetching Queue and send the target data block to the buffer, that is, the new data request new_data_request is entered in the input parameter through the data reading thread AddNewRequest interface, and the circular stack CircleStack is locked, top = (top + 1) mod length, CircleStack [top] = new_data_request, if the stack is empty, then bottom = (bottom + 1) mod length, and then the CircleStack is unlocked, and the new data request is added to the request queue, and then the target data block is sent to the buffer based on the request queue. When the target data block exists in the buffer, the step of displaying the target data block through the preset display thread will be returned, and the target data block in the buffer will be displayed through the display thread.
[0157] S6. Perform data assembly and drawing on the displayed target data blocks to obtain visualized stratigraphic data.
[0158] In the embodiment of the present invention, the target data block in the buffer is displayed and then the assembly and drawing process is entered to obtain the visualized stratum data, wherein the visualized stratum data is capable of intuitively observing the stratum data.
[0159] In the embodiment of the present invention, the step of performing data assembly and drawing on the displayed target data block to obtain visualized stratigraphic data includes:
[0160] Detecting the spatial topological relationship of control points in the displayed target data block;
[0161] Using a preset quadrilateral grid, extracting profile data of the target stratum according to the spatial topological relationship;
[0162] Converting the profile data into a data stream form;
[0163] The data stream is loaded into the video memory for rendering using a preset vertex array mechanism to obtain visualized stratum data.
[0164] In detail, the data block output by the scheduling system then enters the assembly and drawing process, and the control points in the data block to be drawn need to be checked for topological relationships in space, and the sections and their attributes extracted in the direction of lines, paths, and polylines are in the form of quadrilateral meshes. In order to more effectively submit the mesh data to the rendering engine, the present invention organizes the section data into three data streams of vertices, indices, and attributes, and uses the vertex array mechanism provided by OpenGL to reuse vertex data, thereby reducing the number of OpenGL function calls and improving the transmission efficiency of mesh data.
[0165] Specifically, OpenGL also provides an extension technology called Vertex Buffer Object (VBO), which can load the vertex, index, and attribute data streams that need to be rendered directly into the high-performance video memory of the graphics card instead of the system's RAM memory. This not only reduces the memory operations required for each frame, but also greatly reduces the amount of data transmitted between the CPU and the graphics card, thereby reducing the rendering time of each frame and improving the frame rate.
[0166] Furthermore, the visualized stratigraphic data needs to be displayed on the display screen, and the speed of the user's viewpoint movement is also an important factor affecting the system display effect. Generally speaking, when the user's operation is more frequent and the viewpoint moves faster, the continuous change range of the visible view area is also larger. In other words, as the view area is clipped, the frame correlation decreases, that is, a considerable proportion of data blocks in each frame need to be exchanged and processed by the data reading thread. At this time, the pressure of data processing and disk interaction is very high, and it is particularly important to cache the data blocks to reduce the pressure on the data bus.
[0167] For example, the frame rate is measured at different viewpoint moving speeds, such as Fig.12a As shown in FIG. 1 , it is a schematic diagram of a frame rate curve under ultra-high-speed viewpoint operation, representing 50 frames under ultra-high-speed viewpoint motion; Figure 12b As shown in FIG. 1 , it is a schematic diagram of a frame rate curve under high-speed viewpoint operation, representing 100 frames under high-speed viewpoint motion; Fig.12c As shown in FIG. 1 , it is a schematic diagram of a frame rate curve under medium-speed viewpoint operation, which represents 200 frames under medium-speed viewpoint motion; Fig.12d As shown, it is a schematic diagram of the frame rate curve under low-speed viewpoint operation, indicating 400 frames under medium-speed viewpoint movement; Figures 12a to 12d The viewpoint movement rate decreases successively, and the number of frames drawn on the same viewpoint movement trajectory increases. It can be seen that the faster the viewpoint movement rate, the lower the frame correlation, the lower the frame rate, and the frame rate curve shakes violently; on the contrary, if the user's viewpoint moves at a relatively low speed, the frame correlation plays a big role, the frame rate is high, and the frame rate curve is relatively stable.
[0168] Embodiment 2
[0169] In order to understand the present invention more clearly, a second embodiment is used below to further explain the situation in which, when the buffer is full, the target data block is read from the corresponding position of the disk file and sent to the buffer.
[0170] In the embodiment of the present invention, if the data block is not in the buffer, the data block is read from the corresponding position of the disk file and sent to the buffer; if the buffer is full, it is necessary to apply a timestamp-based elimination strategy to the element BufferElement in the buffer, and the residence time of the data block in the cache is an important basis for applying the elimination strategy. Generally speaking, the data block with a long residence time and not recently accessed should be eliminated first. Therefore, a timestamp is added to each data block in the buffer, and Brick_Data is defined as the following two-tuple: Brick_Data = <Value, Time_Stamp>, where Value is the actual data of the data block Brick_Data; Time_Stamp is the timestamp of Brick_Data, which is represented by the most recent access time, that is, the current system time is written into Time_Stamp each time the data block is accessed. When the elimination strategy is applied, the data block with the oldest timestamp is replaced.
[0171] In the embodiment of the present invention, the step of sending the target data block into a buffer through a preset data reading thread includes:
[0172] Selecting target elements in the buffer one by one according to a preset element threshold;
[0173] Construct a maximum heap according to the timestamp of the target element;
[0174] Compare the timestamps of the unselected target elements in the buffer with the top elements of the maximum heap one by one to obtain timestamp differences;
[0175] When the timestamp difference is less than zero, the top element of the heap is replaced by the target element that has not been selected, and the maximum heap is adjusted according to the timestamp to obtain an updated maximum heap;
[0176] Eliminate the target old element in the updated maximum heap according to the memory address of the target element in the updated maximum heap;
[0177] According to the memory address corresponding to the target old element, the target data block is sent to the buffer through a preset data reading thread.
[0178] In detail, if the buffer is full, it is necessary to apply a timestamp-based elimination strategy to the elements BufferElement in the buffer. This strategy attempts to select the data block with the "oldest" timestamp for replacement, but the "oldest" data block can only be selected after traversing all the elements BufferElement in the entire buffer. This is because the implementation of the buffer uses the data block index number Brick_ID as the keyword of the binary balanced search tree, rather than the timestamp Time_Stamp as the keyword. Therefore, the cost of replacing data based on timestamps in the buffer is very high. In order to reduce the number of times the elimination strategy is applied as much as possible, a batch elimination strategy is adopted. Each time the number of BufferElements in the buffer reaches the upper limit, one-third to one-fifth of the BufferElements in the buffer are eliminated at one time. By increasing the number of BufferElements eliminated each time, enough space is left to ensure a sufficient time interval between two adjacent eliminations, thereby effectively reducing the number of eliminations.
[0179] Specifically, the elimination algorithm needs to select the K oldest BufferElements from a buffer of size N, where K can usually be N / 5 or N / 4. Theoretically, this can be done in O(N) time. First, find the Kth order statistic among the N BufferElements based on the timestamp, then scan the entire buffer and mark the oldest K BufferElements. Therefore, the entire buffer needs to be scanned multiple times, and the constant factor implied in O(N) is usually large, which is not very efficient in practical applications. On the other hand, the process of counting the Kth order quantity is not "in situ", that is, the position of the BufferElement element in the buffer needs to be moved, which is extremely unfavorable for efficient management of the buffer. Therefore, an in-place, max-heap-based buffer elimination algorithm is adopted. First, a max-heap MaxHeap is established for the first K BufferElements in the buffer according to their timestamps. The elements of the max-heap are defined as the following two-tuple: HeapElement=<Time_Stamp,Address_of_BE>, where Time_Stamp is the timestamp of the corresponding BufferElement, which is used as the keyword of the max-heap; Address_of_BE is the memory address of the corresponding BufferElement. Then, the remaining N-K BufferElements in the buffer are compared with the HeapElement at the top of the heap by Time_Stamp in turn. If it is "older" than the top of the heap, it will be replaced and the max-heap will be adjusted according to Time_Stamp. The final max-heap (updated max-heap) consists of the K elements with the oldest timestamps. Scanning it again can eliminate the corresponding buffer element BufferElement according to Address_of_BE. The optimal time complexity of this algorithm is O(N), and the worst time complexity is O(N lgK). Since K is much smaller than N, it is close to the ideal situation; and except for the eliminated elements, other retained elements in the buffer are not affected.
[0180] Furthermore, the target data block is sent into the buffer through the data reading thread, and the request queue is first locked. If the request queue is empty, the request queue is unlocked and the thread waits; if the request queue is not empty, the head element request of the request queue is taken out and the request queue is unlocked; the buffer is searched according to the Brick_ID in the request, if the Brick_ID is not found, the Brick_Data is read from the disk file according to the request and a timestamp is added; the buffer is locked, the Brick_Data is added to the buffer according to the timestamp, and the buffer is unlocked; if the buffer length reaches the preset upper limit, the MaxHeap is initialized, the MaxHeap is established for the first K BufferElements in the buffer, and the remaining N-K BufferElements are compared with the Time_Stamp of the top of the heap. If they are older, the MaxHeap is replaced and adjusted; the buffer is locked, and for each HeapElement in the MaxHeap, the Address_of_BE is taken out and the pointed memory is released, and the buffer is unlocked.
[0181] Embodiment 3
[0182] like Fig.13 As shown, this embodiment also provides a functional module diagram of a massive formation data scheduling and visualization device.
[0183] The massive stratigraphic data scheduling and visualization device 100 described in this embodiment can be installed in a device. According to the functions to be implemented, the massive stratigraphic data scheduling and visualization device 100 may include a data display range determination module 101, a data block index number scheduling module 102, a target data block judgment module 103, a target data block display module 104, a target data block reading module 105 and a data assembly drawing module 106. The module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a device processor and can complete fixed functions, which are stored in the memory of the device.
[0184] In this embodiment, the functions of each module / unit are as follows:
[0185] The data display range determination module 101 is used to initialize the preset LOD model according to the user interaction parameters, obtain the attribute display parameters, and determine the data display range according to the attribute display parameters;
[0186] The data block index number scheduling module 102 is used to schedule the data block index number within the data display range using a preset multi-resolution data scheduling algorithm;
[0187] The target data block determination module 103 is used to determine whether the target data block corresponding to the data block index number exists in a preset buffer;
[0188] The target data block display module 104 is used to display the target data block through a preset display thread when the target data block exists in the buffer;
[0189] The target data block reading module 105 is used for sending the target data block into the buffer through a preset data reading thread when the target data block does not exist in the buffer, and returning to the step of displaying the target data block through a preset display thread;
[0190] The data assembly and drawing module 106 is used to perform data assembly and drawing on the displayed target data blocks to obtain visualized stratum data.
[0191] In detail, each module described in the massive stratigraphic data scheduling and visualization device 100 described in the embodiment of the present invention adopts the same technical means as the massive stratigraphic data scheduling and visualization method described in Example 1 and Example 2 when used, and can produce the same technical effects, which will not be repeated here.
[0192] Embodiment 4
[0193] like Fig.14 As shown, this embodiment also provides a computer device, which may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a massive formation data scheduling and visualization program.
[0194] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (Control Unit) of the device, and uses various interfaces and lines to connect various components of the entire device, and executes various functions of the device and processes data by running or executing programs or modules stored in the memory 11 (for example, executing a massive formation data scheduling and visualization program, etc.), and calling data stored in the memory 11.
[0195] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the device, such as a mobile hard disk of the device. In other embodiments, the memory 11 may also be an external storage device of the device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device. Further, the memory 11 may also include both an internal storage unit of the device and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the device, such as the code of a massive formation data scheduling and visualization program, but may also be used to temporarily store data that has been output or is to be output.
[0196] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0197] The communication interface 13 is used for communication between the above-mentioned device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the device and other devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the device and to display a visual user interface.
[0198] The figure only shows a device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0199] For example, although not shown, the device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0200] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0201] The massive formation data scheduling and visualization program stored in the memory 11 in the device is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0202] Initialize the preset LOD model according to the user interaction parameters, obtain the attribute display parameters, and determine the data display range according to the attribute display parameters;
[0203] Using a preset multi-resolution data scheduling algorithm to schedule the data block index number within the data display range;
[0204] Determine whether the target data block corresponding to the data block index number exists in a preset buffer;
[0205] When the target data block exists in the buffer, displaying the target data block through a preset display thread;
[0206] When the target data block does not exist in the buffer, the target data block is sent to the buffer through a preset data reading thread, and the process returns to the step of displaying the target data block through a preset display thread;
[0207] The displayed target data blocks are assembled and drawn to obtain visualized stratigraphic data.
[0208] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0209] Furthermore, if the module / unit integrated in the device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a medium. The medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0210] Embodiment 5
[0211] This embodiment provides a storage medium storing a computer program. When the computer program is executed by a processor, the steps of the method for scheduling and visualizing massive formation data as described above are implemented.
[0212] These program codes can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions executed on the computer or other programmable device for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.
[0213] Storage media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, modules of programs or other data. Examples of storage media can include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0214] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. When the terms "include" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.
[0215] It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or described herein.
[0216] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0217] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0219] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0220] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0221] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0222] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for scheduling and visualizing massive stratum data, characterized in that: The method comprises: Initialize the preset LOD model according to the user interaction parameters, obtain the attribute display parameters, and determine the data display range according to the attribute display parameters; Using a preset multi-resolution data scheduling algorithm to schedule the data block index number within the data display range; Determine whether the target data block corresponding to the data block index number exists in a preset buffer; When the target data block exists in the buffer, displaying the target data block through a preset display thread; When the target data block does not exist in the buffer, the target data block is sent to the buffer through a preset data reading thread, and the process returns to the step of displaying the target data block through a preset display thread; The displayed target data blocks are assembled and drawn to obtain visualized stratigraphic data.
2. The method for scheduling and visualizing massive stratum data according to claim 1, characterized in that: Initializing the preset LOD model according to the user interaction parameters to obtain the attribute display parameters includes: Calculate the line coverage data block index number of the target profile according to the preset profile line direction and the user interaction parameter; Calculate the track coverage data block index number of the target profile according to the preset profile track direction; Calculate the index number of the polyline coverage data block of the target section according to the preset polyline direction of the section; The stratigraphic data in the preset LOD model is segmented according to the line coverage data block index number, the track coverage data block index number and the broken line coverage data block index number to obtain the attribute display parameters.
3. The method for scheduling and visualizing massive stratum data according to claim 1, characterized in that: Determining the data display range according to the attribute display parameter includes: Determine a first data display area according to the attribute display parameter; Determine the second data display area by a preset display area threshold; The first data display area and the second data display area are aggregated into the data display range.
4. The method for scheduling and visualizing massive stratum data according to claim 1, characterized in that: The method of scheduling the data block index number within the data display range by using a preset multi-resolution data scheduling algorithm includes: Add the top data block index in the LOD octree within the data display range to the priority queue; Determine whether the queue data stored in the priority queue is full; When the data stored in the priority queue is not full, indexing the head data block in the priority queue out of the queue; Determine whether there is a data sub-block that has not been queued in the queue data block index, and when the data sub-block does not exist in the queue data block index, return to the step of determining whether the queue data stored in the priority queue is full; When the data sub-block exists, determining whether the data sub-block is in the visible viewing area; when the data sub-block does not exist in the visible viewing area, returning to the step of determining whether the head data block index has a data sub-block that has not been queued; When the data sub-block is within the visible viewing area, calculating the priority function value of the data sub-block; Select the data sub-block with the highest priority function value and add it to the priority queue, and return to the step of determining whether there is any unqueued data sub-block at the head data block index; When the data stored in the priority queue is full, the data block index number within the display data range is determined according to the data block index in the priority queue.
5. The method for scheduling and visualizing massive stratum data according to claim 4, characterized in that: The calculating the priority function value of the data sub-block comprises: The priority function value of the data sub-block is calculated using a preset priority function, wherein the priority function is: Among them, P is the priority function value, Camera is the attribute display parameter, Brick is the data block, dist is the distance between the data block and the viewpoint position in the attribute display parameter, level is the depth of the data block in the octree LOD model, α is the angle between the normal vector of the stratigraphic section in the data block and the line of sight direction in the attribute display parameter, and sin is the sine function.
6. The method for scheduling and visualizing massive stratum data according to claim 1, characterized in that: The step of performing data assembly and drawing on the displayed target data blocks to obtain visualized stratigraphic data includes: Detecting the spatial topological relationship of control points in the displayed target data block; Using a preset quadrilateral grid, extracting profile data of the target stratum according to the spatial topological relationship; Converting the profile data into a data stream form; The data stream is loaded into the video memory for rendering using a preset vertex array mechanism to obtain visualized stratum data.
7. The method for scheduling and visualizing massive stratum data according to claim 1, characterized in that: The step of sending the target data block into a buffer through a preset data reading thread includes: Selecting target elements in the buffer one by one according to a preset element threshold; Construct a maximum heap according to the timestamp of the target element; Compare the timestamps of the unselected target elements in the buffer with the top elements of the maximum heap one by one to obtain timestamp differences; When the timestamp difference is less than zero, the top element of the heap is replaced by the target element that has not been selected, and the maximum heap is adjusted according to the timestamp to obtain an updated maximum heap; Eliminate the target old element in the updated maximum heap according to the memory address of the target element in the updated maximum heap; According to the memory address corresponding to the target old element, the target data block is sent to the buffer through a preset data reading thread.
8. A massive formation data scheduling and visualization device, characterized in that: The device comprises: A data display range determination module, used to initialize a preset LOD model according to user interaction parameters, obtain attribute display parameters, and determine a data display range according to the attribute display parameters; A data block index number scheduling module, used for scheduling the data block index numbers within the data display range by using a preset multi-resolution data scheduling algorithm; A target data block determination module is used to determine whether the target data block corresponding to the data block index number exists in a preset buffer; A target data block display module, configured to display the target data block through a preset display thread when the target data block exists in the buffer; a target data block reading module, used for sending the target data block into the buffer through a preset data reading thread when the target data block does not exist in the buffer, and returning to the step of displaying the target data block through a preset display thread; The data assembly and drawing module is used to perform data assembly and drawing on the displayed target data blocks to obtain visualized stratigraphic data.
9. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for scheduling and visualizing massive formation data as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for scheduling and visualizing massive formation data as described in any one of claims 1 to 7 is implemented.