CN114463476A - Visual parallel rendering method, device and system and storage medium - Google Patents
Visual parallel rendering method, device and system and storage medium Download PDFInfo
- Publication number
- CN114463476A CN114463476A CN202210373654.3A CN202210373654A CN114463476A CN 114463476 A CN114463476 A CN 114463476A CN 202210373654 A CN202210373654 A CN 202210373654A CN 114463476 A CN114463476 A CN 114463476A
- Authority
- CN
- China
- Prior art keywords
- image data
- node
- rendering
- synthesis strategy
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2210/00—Indexing scheme for image generation or computer graphics
- G06T2210/52—Parallel processing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Image Generation (AREA)
Abstract
The invention discloses a visual parallel drawing method, a device, a system and a storage medium, wherein the method comprises the steps of determining a target synthesis strategy when a drawing instruction is received; sending the target synthesis strategy to at least one second drawing node, so that the second drawing node processes the first image data when receiving the first image data to obtain second image data, and sending the second image data to the target drawing node according to the target synthesis strategy; and after receiving all the second image data, splicing the received second image data according to a target synthesis strategy to obtain a parallel drawing image. According to the invention, the target synthesis strategy is sent to the second rendering nodes, and the visual parallel rendering process of the synthesis while exchanging is realized by utilizing the exchange and processing of the image information between the second rendering nodes and the summarization of the first rendering nodes, so that the visual parallel rendering efficiency is improved.
Description
Technical Field
The invention relates to the technical field of image drawing, in particular to a visual parallel drawing method, device and system and a storage medium.
Background
With the continuous improvement of computing power, supercomputers show unique functions in various fields, particularly in the field of scientific computing simulation, data with huge scale is brought by outstanding computing power, and therefore how to process the increasing data scale and analyze the internal relation of the data scale becomes a problem to be solved urgently. The visualization technology is an effective data analysis technology, and has an indispensable position in the field of data analysis, but the massive data brings huge pressure on the traditional graph drawing technology. In order to solve the problem that a single computer cannot process large-scale data, a parallel drawing technology is used as a graph drawing technology in a cluster environment, and the pressure of graph drawing brought by mass data is relieved to a certain extent by integrating computing resources by utilizing the inherent advantages of the cluster environment.
Parallel rendering (Parallel rendering) is a technique for rendering graphics using a high-performance computing cluster environment. In parallel rendering, each computing node may perform a task of rendering an image in parallel, but rendering the image in parallel also causes the image to be distributed on each node, and it is necessary to ensure a correct final rendering result through sorting, thereby causing the efficiency of rendering the image not to be high. Therefore, how to improve the rendering efficiency of visualization parallel is a technical problem which needs to be solved urgently.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a visual parallel rendering method, device, system and storage medium, and aims to solve the technical problem that the existing visual parallel rendering efficiency is not high.
In order to achieve the above object, the present invention provides a visualized parallel rendering method, which is used for a first rendering node of a visualized parallel rendering system, wherein the visualized parallel rendering system further comprises at least one second rendering node, the first rendering node is connected to each of the second rendering nodes, and each of the second rendering nodes is connected to each other, and the method comprises the following steps:
when a drawing instruction is received, determining a target synthesis strategy;
sending the target synthesis strategy to at least one second drawing node, so that the second drawing node processes the first image data when receiving the first image data to obtain second image data, and sending the second image data to the target drawing node according to the target synthesis strategy; the target drawing node is a first drawing node or a second drawing node;
and after receiving all the second image data, splicing the received second image data according to the target synthesis strategy to obtain a parallel drawing image.
In the invention, the target synthesis strategy is sent to the second rendering nodes, and the visual parallel rendering process of the synthesis while exchanging is realized by utilizing the exchange and processing of the image information between the second rendering nodes and the summarization of the first rendering nodes, so that the visual parallel rendering efficiency is improved.
Optionally, the step of determining a target synthesis strategy when the drawing instruction is received specifically includes:
when a drawing instruction is received, extracting a synthesis strategy identifier in the drawing instruction;
based on the synthesis strategy identification, calling a synthesis strategy library to match a target synthesis strategy corresponding to the synthesis strategy identification; wherein the synthesis strategy library is pre-stored with at least one synthesis strategy.
According to the invention, the corresponding target synthesis strategy is selected through the synthesis strategy identification in the drawing instruction, and the synthesis strategy suitable for the adaptation of the data processing capacity of the current equipment can be selected according to the actual drawing requirement, so that the drawing flexibility is improved.
Optionally, the synthesis strategy library prestores one or more synthesis strategies of a tree synthesis strategy, a Direct Send synthesis strategy, a Binary Swap synthesis strategy, a 2-3 Swap synthesis strategy, a Radix-k synthesis strategy, and a 234 grouping synthesis strategy.
According to the invention, a tree synthesis strategy, a Direct Send synthesis strategy, a Binary Swap synthesis strategy, a 2-3 Swap synthesis strategy, a Radix-k synthesis strategy and a 234 grouping synthesis strategy are provided for a user to select, a synthesis strategy suitable for adapting the data processing capacity of the current equipment can be selected according to the actual drawing requirement, and the drawing flexibility is improved.
Optionally, after the step of determining the target synthesis strategy when the drawing instruction is received, the method further includes:
creating a node task list according to the target synthesis strategy; the node task list comprises a processing sequence and a processing task of a second drawing node;
and sending the node task list and the target synthesis strategy to at least one second drawing node, so that the second drawing node executes the processing task on the first image data according to the processing sequence when receiving the first image data to obtain second image data, and executes the step of sending the second image data to the target drawing node according to the target synthesis strategy.
According to the invention, the node task list is created according to the target synthesis strategy, the coordination and task execution of a plurality of drawing nodes are realized according to the node task list, the data processing task is distributed, and the drawing efficiency is improved.
Optionally, the first image data is image original data or second image data sent by the remaining second rendering nodes.
In the invention, the second drawing node can process the original image data of the second drawing node or process the second image data sent by other second drawing nodes, establishes the relevance among a plurality of drawing nodes, reasonably distributes data processing tasks and improves the drawing efficiency.
Optionally, the processing task includes a first processing task and a second processing task; the step of executing the processing task on the first image data specifically includes:
executing the first processing task on the original image data to obtain second image data; or
And executing the first processing task on the original image data to obtain second image data, and executing a second processing task on the second image data and the second image data sent by the rest of the second rendering nodes to obtain synthesized second image data.
In the invention, the processing tasks executed by each node comprise the processing of own original data and the synthesis processing of own original data and received image data, so that each node can flexibly select the execution tasks and the drawing efficiency is improved.
Optionally, the second rendering node is a VTK terminal, and the second image data is image rendering data output by a visualization pipeline of the VTK terminal; wherein the image rendering data comprises pixel values and depth information of an image.
In the invention, the second drawing node adopts a VTK terminal, and the parallelized multi-node drawing of the invention is executed through the existing widely used graphic processing terminal, so that the cost for realizing the drawing is reduced.
In order to achieve the above object, the present invention also provides a parallel visualization rendering apparatus, including:
the determining module is used for determining a target synthesis strategy when a drawing instruction is received;
the sending module is used for sending the target synthesis strategy to at least one second drawing node so as to enable the second drawing node to process first image data when receiving the first image data to obtain second image data, and sending the second image data to the target drawing node according to the target synthesis strategy; the target drawing node is a first drawing node or a second drawing node;
and the splicing module is used for splicing the received second image data according to the target synthesis strategy after receiving all the second image data to obtain a parallel drawing image.
In addition, in order to achieve the above object, the present invention provides a visualization parallel rendering system, including:
a first drawing node; the first rendering node comprises a memory, a processor and a visually parallel rendering program stored on the memory and executable on the processor, the visually parallel rendering program, when executed by the processor, implementing the steps of the visually parallel rendering method as described above;
at least one second drawing node; the first drawing node is connected with each second drawing node, and the second drawing nodes are connected with each other.
In order to achieve the above object, the present invention further provides a storage medium, wherein the storage medium stores thereon a visualization parallel rendering program, and the visualization parallel rendering program, when executed by a processor, implements the steps of the visualization parallel rendering method as described above.
The embodiment of the invention provides a visual parallel rendering method, a visual parallel rendering device, a visual parallel rendering system and a storage medium, wherein the method comprises the steps of determining a target synthesis strategy when a rendering instruction is received; sending the target synthesis strategy to at least one second drawing node, so that the second drawing node processes the first image data when receiving the first image data to obtain second image data, and sending the second image data to the target drawing node according to the target synthesis strategy; the target drawing node is a first drawing node or a second drawing node; and after receiving all the second image data, splicing the received second image data according to the target synthesis strategy to obtain a parallel drawing image. According to the invention, the target synthesis strategy is sent to each second drawing node, and the visual parallel drawing process of the synthesis while exchanging is realized by utilizing the exchange and processing of the image information between the second drawing nodes and the summarization of the first drawing nodes, so that the visual parallel drawing efficiency is improved.
Drawings
Fig. 1 is a schematic structural diagram of a visualization parallel rendering system according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a first drawing node and a second drawing node in the embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram illustrating an embodiment of a visual parallel rendering method according to the present invention;
fig. 4 is a structural block diagram of a visualization parallel rendering apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a visual parallel rendering system, and referring to fig. 1, fig. 1 is a schematic structural diagram of the visual parallel rendering system.
In this embodiment, the visualized parallel rendering system includes:
a first drawing node 100; the first rendering node 100 comprises a memory, a processor and a visually parallel rendering program stored on the memory and executable on the processor, the visually parallel rendering program, when executed by the processor, implementing the steps of the visually parallel rendering method;
at least one second drawing node 200; the first drawing node 100 connects each of the second drawing nodes 200, and each of the second drawing nodes 200 is connected to each other.
It is easy to understand that when a first drawing node receives a drawing instruction, a target synthesis strategy is determined, the target synthesis strategy is sent to at least one second drawing node, when the second drawing node receives first image data, the first image data is processed to obtain second image data, the second image data is sent to the first drawing node or other second drawing nodes according to the target synthesis strategy, image information exchange and processing among the second drawing nodes are further achieved, finally, all the second image data are received at the first drawing node, and the received second image data are spliced according to the target synthesis strategy to obtain a parallel drawing image.
In the embodiment, the visual parallel rendering system sends the target synthesis strategy to each second rendering node, and realizes the visual parallel rendering process of the edge-exchange and edge-synthesis by using the exchange and processing of image information between the second rendering nodes and the summarization of the first rendering nodes, thereby improving the efficiency of the visual parallel rendering.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a first drawing node and a second drawing node according to an embodiment of the present invention.
The first drawing node and the second drawing node may be a User Equipment (UE) such as a Mobile phone, a smart phone, a laptop, a digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, a Mobile Station (MS), or the like. The first drawing node and the second drawing node may be referred to as a user terminal, a portable terminal, a desktop terminal, or the like.
Typically, the first drawing node and the second drawing node comprise: at least one processor 301, a memory 302, and a visualization parallel rendering program stored on the memory and executable on the processor, the visualization parallel rendering program being configured to implement the steps of the visualization parallel rendering method as described before.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. The processor 301 may further include an AI (Artificial Intelligence) processor for processing related visualization parallel rendering operations so that the visualization parallel rendering model may be trained autonomously for learning, improving efficiency and accuracy.
In some embodiments, the first drawing node and the second drawing node may further optionally include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected by a bus or signal lines. Various peripheral devices may be connected to communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, a display screen 305, and a power source 306.
The communication interface 303 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 301 and the memory 302. The communication interface 303 is used for receiving the movement tracks of the plurality of mobile terminals uploaded by the user and other data through the peripheral device. In some embodiments, processor 301, memory 302, and communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the communication interface 303 may be implemented on a single chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 304 communicates with a communication network and other communication devices through electromagnetic signals, so as to obtain the movement tracks and other data of a plurality of mobile terminals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, the front panel of the electronic device; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display screen 305 may be a flexible display screen disposed on a curved surface or a folded surface of the electronic device. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (liquid crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 306 is used to power various components in the electronic device. The power source 306 may be alternating current, direct current, disposable or rechargeable. When the power source 306 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the architecture shown in fig. 2 does not constitute a definition of a first drawing node and a second drawing node, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
Based on the visualization parallel rendering system shown in fig. 1, an embodiment of the present invention provides a visualization parallel rendering method, and referring to fig. 3, fig. 3 is a schematic flow diagram of an embodiment of the visualization parallel rendering method of the present invention.
In this embodiment, the visualized parallel rendering method includes the following steps:
step S100, when a drawing instruction is received, determines a target composition policy.
In practical application, in the existing parallel rendering process, each computing node can perform an image rendering task in parallel, but the parallel rendering of the image also causes the image to be distributed on each node, so that the final rendering result needs to be ensured to be correct through sorting. According to different occasions when the sequencing occurs, the parallel drawing architecture is divided into three modes of Sort-first, Sort-middle and Sort-last.
Specifically, the sorting stage of the Sort-first parallel rendering architecture occurs before the geometric pipeline processing, and the sorted objects are original geometric primitives. In the parallel drawing architecture, a final image needs to be divided, a one-to-one correspondence relationship between image blocks and computing nodes is established, and each computing node is only responsible for drawing the corresponding image block; the ordering process of the Sort-middle parallel rendering architecture occurs after the geometry pipeline processing and before the rasterization processing. Generating geometric primitives of an image space after the geometric pipeline processing, dividing the final image, and only drawing the geometric primitives in the corresponding image blocks by each computing node; after rasterization processing is carried out on the Sort process of the Sort-last parallel rendering framework, the Sort object is original data of a part responsible for each computing node, and finally, the output results of each computing node are sorted and synthesized according to the depth information, and a correct complete image is finally obtained.
In the three parallel rendering architectures, although the Sort-first is easier to understand, under the condition of complex scenes, a large number of communication transmission processes are required, so that the method is only suitable for rendering scenes with small scale; the method is difficult to realize on a hardware platform due to the fact that a geometric pipeline and rasterization processing are often closely connected, and intermediate results are difficult to obtain; the Sort-last has good expandability and is more suitable for large-scale parallel drawing. Compared with Sort-first and Sort-middle, the Sort-last architecture has an additional image synthesis stage, so the performance bottleneck in the architecture is the image synthesis stage.
In this embodiment, a Sort-last architecture is adopted to perform parallel rendering on an image, where parallel image synthesis is one of the main factors affecting the Sort-last parallel rendering architecture. Common methods for parallel image synthesis include a tree synthesis strategy, a Direct Send synthesis strategy, a Binary Swap synthesis strategy, a 2-3 Swap synthesis strategy, a Radix-k synthesis strategy, and a 234-block synthesis strategy. Each parallel image synthesis strategy has its unique advantages and is suitable for use in different environments.
The specific principles of each synthetic strategy are known to those skilled in the art as:
tree synthesis strategy: and performing pairwise grouping synthesis on all the intermediate result images until all the intermediate result images are synthesized into a complete result image. The tree synthesis strategy has the advantages that the tree synthesis strategy supports simultaneous synthesis of a plurality of computing nodes, so that the synthesis efficiency is greatly improved, but the utilization rate of the computing nodes is not high because the computing nodes are separated from the synthesis operation at each stage.
Direct Send synthetic strategy: each computing node is responsible for synthesizing a part of data of the image space, and each computing node only needs to receive the image data of the part of the computing node, and then synthesizes the image data and sends the synthesized image data to the computing node responsible for synthesizing a larger part of images. The utilization rate of the compute nodes of the Direct Send synthesis strategy is higher than that of the tree synthesis strategy, but the communication overhead is high.
A Binary Swap synthesis strategy; the synthesis strategy is similar to a tree synthesis strategy, and is different in that after pairwise grouping, complete image transmission is not performed, images are divided into halves, and the paired computing nodes are respectively responsible for half of the images, so that the computing nodes are prevented from being separated from operation, the node utilization rate is improved, but the traditional Binary Swap synthesis strategy only supports the situation that the number of the computing nodes is the power of 2.
2-3 Swap Synthesis strategy: the synthesis strategy is an extension and improvement of a Binary Swap synthesis strategy, in a 2-3 Swap synthesis strategy, the calculation nodes are divided into 2 or 3 groups by using the principle that any integer can be expressed as the sum of a group of integer sequences consisting of 2 and 3, and then Direct Send synthesis is adopted in the groups and between the groups respectively.
Radix-k Synthesis strategy: the synthesis strategy is further generalized processing of a Binary Swap synthesis strategy, the Radix-k synthesis strategy realizes the process of calculating node grouping by adding a base vector k, the node grouping is not only grouped into 2 or 3 any more, but is grouped according to the k value, then the same intra-group and inter-group respectively adopt Direct Send synthesis, when the k value takes a sequence of 2, the Radix-k synthesis strategy is a Binary Swap synthesis strategy, and when the k value is only one, the Radix-k synthesis strategy is a Direct Send synthesis strategy.
234 grouping and combining strategy: different from the thought of Radix-k, in the 234 grouping synthesis strategy, the calculation nodes are mainly grouped by 2,3 or 4 based on the Binary Swap synthesis strategy, so that the grouping number is ensured to be the power of 2, and the Binary Swap can be used for image synthesis in the second stage.
In this embodiment, a composition policy library is provided at a first rendering node of the visual parallel rendering system, and the composition policy library prestores any one or more of the composition policies. And when a drawing instruction is received, extracting a synthesis strategy identifier in the drawing instruction, and calling a set synthesis strategy library based on the synthesis strategy identifier to match a target synthesis strategy corresponding to the synthesis strategy identifier.
It is easy to understand that the obtained target synthesis strategy can be selected by the user according to the number of currently required computing nodes and the size of the image space. In each synthesis strategy, a user can select a proper image synthesis strategy according to the requirements of the user by utilizing the characteristics of each image synthesis strategy to realize corresponding grouping and data communication interfaces, and further set the operation required by executing visual parallel rendering in advance.
Step S200, sending the target synthesis strategy to at least one second drawing node, so that the second drawing node processes first image data when receiving the first image data to obtain second image data, and sending the second image data to the target drawing node according to the target synthesis strategy; and the target drawing node is a first drawing node or a second drawing node.
Specifically, after the step of determining the target synthesis strategy, a node task list may be created according to the target synthesis strategy; the node task list comprises a processing sequence and a processing task of a second drawing node; and sending the node task list and the target synthesis strategy to at least one second drawing node, so that the second drawing node executes the processing task on the first image data according to the processing sequence when receiving the first image data to obtain second image data, and executes the step of sending the second image data to the target drawing node according to the target synthesis strategy.
In some embodiments, the first image data may be image raw data or second image data sent by the remaining second rendering nodes through the interconnected second rendering nodes.
Further, the processing task includes a first processing task and a second processing task. Thus, performing the processing task on the first image data comprises: executing the first processing task on the original image data to obtain second image data; or executing the first processing task on the image original data to obtain second image data, and executing a second processing task on the second image data and second image data sent by other second rendering nodes to obtain synthesized second image data.
It will be readily appreciated that after the target composition policy obtained by the first rendering node is sent to the second rendering node, the second rendering node may perform the corresponding processing, receiving and sending tasks according to the grouping and switching rules described in the received composition policy. In order to improve the synthesis speed of the final effect graph and reduce the synthesis load of the main node, in each round of image data exchange process, the exchange rule according to each node comprises the following steps:
a) when image data needs to be sent, the node sends the current pixel value and the depth information of the node to the corresponding node, and the current pixel value and the depth information of the node may be original data obtained by self rendering or image data obtained by synthesizing the original data obtained by self rendering and the pixel values and the depth information of other nodes received in the previous multi-round data exchange process.
b) When image data needs to be received, after the nodes receive the image data from other nodes, the data and the image data existing in the nodes are preliminarily synthesized according to the grouping list received from the main node in the step one.
Based on the process, the first drawing node not only improves the image synthesis speed, but also can reduce the load of the main node through a mechanism of distributing and summarizing during the image information distributing and summarizing process.
In some embodiments, a second rendering node may employ a VTK terminal, the second image data being image rendering data output by a visualization pipeline of the VTK terminal; wherein the image rendering data comprises pixel values and depth information of an image.
As will be appreciated by those skilled in the art, vtk (visualization toolkit) is an open-source free graphic processing tool library, mainly used for three-dimensional computer graphics, image processing and visualization, and has been widely used in data processing in various fields such as medicine, meteorology, biology, aerospace, and the like. However, the VTK supports fewer image synthesis strategies in the aspect of parallel rendering, and has a weak capability in meeting different user requirements.
In the embodiment, a VTK-based general visual parallel rendering method is provided, so that on the premise of maintaining good generality, multiple composition strategies can be supported, and a user can select the most appropriate image composition strategy to perform image parallel composition.
Specifically, in order to make the VTK-based parallel rendering method support a plurality of image composition strategies, it is first necessary to introduce a plurality of image composition strategies to the VTK. Inside the VTK, the selection of the image composition policy is decided by vtkCompositer, and the composition policy unified management is realized by transferring the generated composer into vtkCompositeRenderManager of the VTK. Therefore, in order to introduce various image synthesis strategies, respective synthesis strategy classes are derived from VTK composition classes for the tree synthesis strategy, Direct Send synthesis strategy, Binary Swap synthesis strategy, 2-3 Swap synthesis strategy, Radix-k synthesis strategy and 234 grouping synthesis strategy respectively (for the convenience of understanding, we can respectively name vtkbinaryTreeComposer, vtkDirectSendComposer, vtkBinarySwapComposer, VTK23 SwapComposer, vtkRadixKCompositer and VTK234 Composer). Considering that in the Sort-last parallel rendering architecture, the object for which the image synthesis is directed is a pixel, each node needs to extract the pixel information from the VTK visualization pipeline. In the parallel rendering visualization pipeline of the VTK, the rendering result of each node is transmitted to a CompsiteBuffer function and is stored in an array form.
In order to ensure the universality of the parallel rendering system, two situations need to be considered for pixel information, one is an RGB value, namely color information of a pixel point, and the other is an RGBA value, namely transparency information is also available in addition to the color information of the pixel point. For these two different cases, the VTK itself is not processed, and in this embodiment, the composebuffer function needs to be reloaded and processed according to each synthesis strategy.
After receiving the target synthesis strategy, the VTK processes the first image data, acquires image information obtained by respective rendering from a visualization pipeline of the VTK and stores the image information in an array form; wherein the image information comprises pixel values and depth information.
In the embodiment, a rendering result in a VTK visualization pipeline is independently extracted for parallel rendering synthesis, so that a plurality of image synthesis strategies are conveniently introduced into the VTK, the parallel rendering efficiency of the VTK is improved to a certain extent by an image data exchange algorithm for simultaneous exchange and synthesis, and finally, the high-efficiency parallel rendering method for supporting a plurality of image synthesis strategies based on the VTK makes full use of the universality of a VTK visualization tool library and supports the selection of a plurality of image synthesis strategies, and the combination of the two improves the application scene of the parallel rendering method.
And step S300, after receiving all the second image data, splicing the received second image data according to the target synthesis strategy to obtain a parallel drawing image.
Specifically, after receiving all the second image data, the first rendering node receives, processes and sends the image data through at least one second rendering node, all the image information is gathered into a few second rendering nodes, and the first rendering node can directly perform uniform splicing on the received image information according to a target synthesis strategy and a splicing sequence of the received image information to obtain a final visual parallel-rendered image.
It is easy to understand that, in the visual parallel rendering method provided in this embodiment, the target composition policy is sent to the second rendering node, and the exchange and processing of image information between the second rendering nodes and the summarization of the first rendering node are used to implement the visual parallel rendering process of composition while exchanging, so that the visual parallel rendering efficiency is improved.
In this embodiment, a parallel rendering system based on VTK is provided, which has good universality for various visualization models, and the support of VTK for various image synthesis strategies is realized by adjusting the selected image synthesis strategy, so that a user can autonomously select a suitable image synthesis strategy when performing visualization parallel rendering through VTK, and the parallel rendering capability is stronger.
Referring to fig. 4, fig. 4 is a block diagram illustrating a first embodiment of a visual parallel rendering apparatus according to the present invention.
As shown in fig. 4, a visual parallel rendering apparatus according to an embodiment of the present invention includes:
a determining module 10, configured to determine a target synthesis strategy when a drawing instruction is received;
a sending module 20, configured to send the target synthesis policy to at least one second drawing node, so that when receiving first image data, the second drawing node processes the first image data to obtain second image data, and sends the second image data to the target drawing node according to the target synthesis policy; the target drawing node is a first drawing node or a second drawing node;
and the splicing module 30 is configured to splice the received second image data according to the target synthesis strategy after receiving all the second image data, so as to obtain a parallel rendering image.
As an embodiment, the determining module 10 is further configured to, when receiving a drawing instruction, extract a composition policy identifier in the drawing instruction;
based on the synthesis strategy identification, calling a synthesis strategy library to match a target synthesis strategy corresponding to the synthesis strategy identification; wherein the synthesis strategy library is pre-stored with at least one synthesis strategy.
As one implementation, the synthesis strategy library is prestored with one or more synthesis strategies including a tree synthesis strategy, a Direct Send synthesis strategy, a Binary Swap synthesis strategy, a 2-3 Swap synthesis strategy, a Radix-k synthesis strategy and a 234 grouping synthesis strategy.
As an embodiment, the visualization parallel rendering apparatus further includes a creating module 40, and the creating module 40 is configured to, after the step of determining the target composition policy when the rendering instruction is received, further include: creating a node task list according to the target synthesis strategy; the node task list comprises a processing sequence and a processing task of a second drawing node; and sending the node task list and the target synthesis strategy to at least one second drawing node, so that the second drawing node executes the processing task on the first image data according to the processing sequence when receiving the first image data to obtain second image data, and sends the second image data to the target drawing node according to the target synthesis strategy.
In one embodiment, the first image data is image raw data or second image data sent by the remaining second rendering nodes.
As an embodiment, the creating module 40 is further configured to execute the first processing task on the image raw data, so as to obtain second image data; or executing the first processing task on the image original data to obtain second image data, and executing a second processing task on the second image data and second image data sent by other second rendering nodes to obtain synthesized second image data.
In one embodiment, the second rendering node is a VTK terminal, and the second image data is image rendering data output by a visualization pipeline of the VTK terminal; wherein the image rendering data comprises pixel values and depth information of an image.
According to the visual parallel rendering device provided by the embodiment, the target synthesis strategy is sent to the second rendering nodes, the image information exchange and processing between the second rendering nodes and the summarization of the first rendering nodes are utilized, the visual parallel rendering process of simultaneous exchange and simultaneous synthesis is realized, and the visual parallel rendering efficiency is improved.
Other embodiments or specific implementation manners of the visual parallel rendering device of the present invention may refer to the above method embodiments, and are not described herein again.
Furthermore, an embodiment of the present invention further provides a storage medium, where a visualized parallel rendering program is stored, and when executed by a processor, the visualized parallel rendering program implements the steps of the visualized parallel rendering method as described above. Therefore, a detailed description thereof will be omitted. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application. It is determined that, by way of example, the program instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
It should be noted that the above-described embodiments of the apparatus are merely illustrative, where the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be 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 the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus necessary general hardware, and may also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions may be various, such as analog circuits, digital circuits, or dedicated circuits. However, the software program implementation is a better implementation mode for the present invention in more cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, where the computer software product is stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a Read-only memory (ROM), a random-access memory (RAM), a magnetic disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
Claims (10)
1. A parallel rendering method for visualization, wherein the method is applied to a first rendering node of a parallel rendering system, the parallel rendering system further comprises at least one second rendering node, the first rendering node is connected to each of the second rendering nodes, and each of the second rendering nodes is connected to each other, the parallel rendering method for visualization comprises the following steps:
when a drawing instruction is received, determining a target synthesis strategy;
sending the target synthesis strategy to at least one second drawing node, so that the second drawing node processes the first image data when receiving the first image data to obtain second image data, and sending the second image data to the target drawing node according to the target synthesis strategy; the target drawing node is a first drawing node or a second drawing node;
and after receiving all the second image data, splicing the received second image data according to the target synthesis strategy to obtain a parallel drawing image.
2. The visualization parallel rendering method of claim 1, wherein the step of determining the target composition strategy when the rendering instruction is received, specifically comprises:
when a drawing instruction is received, extracting a synthesis strategy identifier in the drawing instruction;
based on the synthesis strategy identification, calling a synthesis strategy library to match a target synthesis strategy corresponding to the synthesis strategy identification; wherein the synthesis strategy library is pre-stored with at least one synthesis strategy.
3. The visual parallel rendering method of claim 2, wherein the synthesis strategy library prestores one or more synthesis strategies including a tree synthesis strategy, a Direct Send synthesis strategy, a Binary Swap synthesis strategy, a 2-3 Swap synthesis strategy, a Radix-k synthesis strategy, and a 234-grouping synthesis strategy.
4. The visualization parallel rendering method of claim 1, wherein after the determining a target composition strategy step when the rendering instruction is received, the visualization parallel rendering method further comprises:
creating a node task list according to the target synthesis strategy; the node task list comprises a processing sequence and a processing task of a second drawing node;
and sending the node task list and the target synthesis strategy to at least one second drawing node, so that when the second drawing node receives first image data, the second drawing node executes the processing task on the first image data according to the processing sequence to obtain second image data, and sends the second image data to the target drawing node according to the target synthesis strategy.
5. The visualization parallel rendering method of claim 4, wherein the first image data is image raw data or second image data sent by the remaining second rendering nodes.
6. The visualization parallel rendering method of claim 5, wherein the processing task comprises a first processing task and a second processing task; the step of executing the processing task on the first image data specifically includes:
executing the first processing task on the original image data to obtain second image data; or
And executing the first processing task on the original image data to obtain second image data, and executing a second processing task on the second image data and the second image data sent by the rest of the second rendering nodes to obtain synthesized second image data.
7. The parallel rendering method for visualization according to claim 2, wherein the second rendering node is a VTK terminal, and the second image data is image rendering data output by a visualization pipeline of the VTK terminal; wherein the image rendering data comprises pixel values and depth information of an image.
8. A visualization parallel rendering apparatus, characterized in that the visualization parallel rendering apparatus comprises:
the determining module is used for determining a target synthesis strategy when a drawing instruction is received;
the sending module is used for sending the target synthesis strategy to at least one second drawing node so as to enable the second drawing node to process first image data when receiving the first image data to obtain second image data, and sending the second image data to the target drawing node according to the target synthesis strategy; the target drawing node is a first drawing node or a second drawing node;
and the splicing module is used for splicing the received second image data according to the target synthesis strategy after receiving all the second image data to obtain a parallel drawing image.
9. A visualization parallel rendering system, comprising:
a first drawing node; the first rendering node comprises a memory, a processor and a visually parallel rendering program stored on the memory and executable on the processor, the visually parallel rendering program when executed by the processor implementing the steps of the visually parallel rendering method of any one of claims 1 to 7;
at least one second drawing node; the first drawing node is connected with each second drawing node, and the second drawing nodes are connected with each other.
10. A storage medium, characterized in that the storage medium has stored thereon a visualization parallel rendering program which, when executed by a processor, implements the steps of the visualization parallel rendering method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210373654.3A CN114463476B (en) | 2022-04-11 | 2022-04-11 | Visual parallel rendering method, device and system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210373654.3A CN114463476B (en) | 2022-04-11 | 2022-04-11 | Visual parallel rendering method, device and system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114463476A true CN114463476A (en) | 2022-05-10 |
CN114463476B CN114463476B (en) | 2022-06-28 |
Family
ID=81416771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210373654.3A Active CN114463476B (en) | 2022-04-11 | 2022-04-11 | Visual parallel rendering method, device and system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114463476B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101334891A (en) * | 2008-08-04 | 2008-12-31 | 北京理工大学 | Multichannel distributed plotting system and method |
CN102034263A (en) * | 2010-11-03 | 2011-04-27 | 北京航空航天大学 | Shear-warp-based parallel volume rendering system |
CN102722549A (en) * | 2012-05-28 | 2012-10-10 | 中国科学院遥感应用研究所 | Cluster-based real-time rendering service of remote sensing data set |
CN111932663A (en) * | 2020-08-11 | 2020-11-13 | 中国空气动力研究与发展中心计算空气动力研究所 | Parallel drawing method based on multi-level asymmetric communication management |
CN113253965A (en) * | 2021-06-25 | 2021-08-13 | 中国空气动力研究与发展中心计算空气动力研究所 | Mass data multi-view-port visual interaction method, system, equipment and storage medium |
-
2022
- 2022-04-11 CN CN202210373654.3A patent/CN114463476B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101334891A (en) * | 2008-08-04 | 2008-12-31 | 北京理工大学 | Multichannel distributed plotting system and method |
CN102034263A (en) * | 2010-11-03 | 2011-04-27 | 北京航空航天大学 | Shear-warp-based parallel volume rendering system |
CN102722549A (en) * | 2012-05-28 | 2012-10-10 | 中国科学院遥感应用研究所 | Cluster-based real-time rendering service of remote sensing data set |
CN111932663A (en) * | 2020-08-11 | 2020-11-13 | 中国空气动力研究与发展中心计算空气动力研究所 | Parallel drawing method based on multi-level asymmetric communication management |
CN113253965A (en) * | 2021-06-25 | 2021-08-13 | 中国空气动力研究与发展中心计算空气动力研究所 | Mass data multi-view-port visual interaction method, system, equipment and storage medium |
Non-Patent Citations (4)
Title |
---|
李瑞瑞等: "并行绘制系统中基于网络处理单元的图像合成及显示", 《计算机应用》 * |
王攀等: "最小通信开销的Direct Send并行图像合成方法", 《计算机研究与发展》 * |
范良等: "一种基于sort-last架构的非结构网络并行体可视化方法", 《大数据》 * |
韩伟杰等: "并行图形绘制技术综述", 《计算机工程》 * |
Also Published As
Publication number | Publication date |
---|---|
CN114463476B (en) | 2022-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020199693A1 (en) | Large-pose face recognition method and apparatus, and device | |
CN113177645B (en) | Federal learning method and device, computing equipment and storage medium | |
US20220241689A1 (en) | Game Character Rendering Method And Apparatus, Electronic Device, And Computer-Readable Medium | |
CN103778591A (en) | Method and system for processing graphic operation load balance | |
WO2023040197A1 (en) | Cross-node communication method and apparatus, device, and readable storage medium | |
CN112883036A (en) | Index creation method, device, storage server and storage medium | |
CN111045732B (en) | Data processing method, chip, device and storage medium | |
CN109711540B (en) | Computing device and board card | |
WO2024169893A1 (en) | Model construction method and apparatus, virtual image generation method and apparatus, device, and medium | |
CN106293571A (en) | A kind of splice displaying system of mobile phone screen | |
CN111949187B (en) | Electronic whiteboard content editing and sharing method, system, equipment and server | |
CN117519874A (en) | Picture updating method and device, electronic equipment and storage medium | |
CN114463476B (en) | Visual parallel rendering method, device and system and storage medium | |
JP2005055573A (en) | High-speed display processor | |
WO2023169287A1 (en) | Beauty makeup special effect generation method and apparatus, device, storage medium, and program product | |
CN115378937B (en) | Distributed concurrency method, device, equipment and readable storage medium for tasks | |
CN115775199B (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
WO2024007496A1 (en) | Image processing method and apparatus, and electronic device and storage medium | |
CN114978974B (en) | Wireless communication module testing method, device, equipment and storage medium | |
CN116820577A (en) | Parallel processing method and device for model, first computing equipment and electronic equipment | |
CN114298895B (en) | Image realism style migration method, device, equipment and storage medium | |
CN116402091A (en) | Hybrid engine intelligent computing method and device for artificial intelligent chip | |
EP4401006A1 (en) | Data processing apparatus and method | |
CN115840648A (en) | Simulation task processing method and device and electronic equipment | |
CN115861510A (en) | Object rendering method, device, electronic equipment, storage medium and program product |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |