CN111612881A - Multithreading-based image rendering method and system and electronic equipment - Google Patents

Multithreading-based image rendering method and system and electronic equipment Download PDF

Info

Publication number
CN111612881A
CN111612881A CN201910136436.6A CN201910136436A CN111612881A CN 111612881 A CN111612881 A CN 111612881A CN 201910136436 A CN201910136436 A CN 201910136436A CN 111612881 A CN111612881 A CN 111612881A
Authority
CN
China
Prior art keywords
rendering
image
rendered
sub
graphs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910136436.6A
Other languages
Chinese (zh)
Other versions
CN111612881B (en
Inventor
罗兆峰
李强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jingyuan Information Technology Co Ltd
Original Assignee
Shenzhen Jingyuan Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jingyuan Information Technology Co Ltd filed Critical Shenzhen Jingyuan Information Technology Co Ltd
Priority to CN201910136436.6A priority Critical patent/CN111612881B/en
Publication of CN111612881A publication Critical patent/CN111612881A/en
Application granted granted Critical
Publication of CN111612881B publication Critical patent/CN111612881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides an image rendering method, an image rendering system and electronic equipment based on multithreading, which are used for rendering integrated circuit graphics with a plurality of layers.

Description

Multithreading-based image rendering method and system and electronic equipment
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of integrated circuit image processing, and in particular, to an image rendering method, system and electronic device based on multithreading.
[ background of the invention ]
In modern society, a method of converting three-dimensional data into a two-dimensional image visible on a screen by using an image rendering technology is widely used in various electronic devices.
Image rendering is to obtain a two-dimensional display having a three-dimensional scene by converting the obtained three-dimensional coordinate data of an object into two-dimensional coordinate data and displaying the two-dimensional coordinate data based on display coordinates.
The integrated circuit image is generally formed by laminating a plurality of layers, each layer completes a specific function, and the rendering of the integrated circuit image comprises the rendering of graphics in a plurality of layers.
[ summary of the invention ]
In order to solve the problem of low rendering efficiency in the existing image rendering method, the invention provides an image rendering method based on multithreading.
In order to solve the technical problems, the invention provides a technical scheme as follows: a multithreading-based image rendering method for rendering an image to be rendered in a display area, the image to be rendered being integrated circuit graphics having a plurality of layers, comprising the steps of: step S1: moving the display area to an area to be rendered, wherein the area to be rendered comprises an image to be rendered and a mark of the image to be rendered, and the image to be rendered corresponds to a part of data sets in a known data set; step S2: dividing an image to be rendered in a display area into a plurality of sub-areas so as to divide the image to be rendered into a plurality of sub-images; step S3: correspondingly allocating a first thread to each sub-area, and allocating a second thread matched with each layer in the corresponding sub-image to each first thread; step S4: each second thread utilizes the marks of the images to be rendered to match with corresponding rendering graphs with the same marks in a partial data set, all rendering graphs in the sub-images are rendered, and rendering graphs of the sub-images are obtained; and step S5: and rendering the rendering graphs of all the sub-images in parallel by the first threads, and displaying rendering results on corresponding positions of the rendering areas based on the rendering graphs.
Preferably, the partial data set is a tree data structure including a root node and a plurality of leaf nodes corresponding to the root node based on indexes, and the partial data set includes all rendering graphs required for rendering the image to be rendered; the step S4 specifically includes the following steps: step S41: the second thread matches the marks of the image to be rendered with rendering graphs with the same marks in the root node in part of the data set to obtain the rendering graphs of the root node; step S42: the method comprises the steps that the corresponding leaf nodes are entered from the root nodes based on the indexes of the root nodes, the marks of images to be rendered are used for being matched with rendering graphs with the same marks in the corresponding leaf nodes, and the rendering graphs in the leaf nodes are obtained; step S43: and continuing to enter the corresponding next-level leaf node from the leaf node based on the new index for matching to obtain the rendering graph in the next-level leaf node until all the leaf nodes corresponding to the index are matched to obtain a plurality of rendering graphs in the multi-level leaf node.
Preferably, in step S4, a plurality of second threads are rendered in parallel, and rendering results of all layers within the sub-image are obtained.
Preferably, the step S5 specifically includes the following steps: step S51: rendering all rendering graphs of a plurality of sub-images by a plurality of first threads in parallel to obtain a rendering graph with local coordinates of the image to be rendered; step S52: and converting the local coordinates of the rendering graph into display coordinates so as to display the final rendering graph in the rendering area.
Preferably, a plurality of said sub-regions are equal area sub-regions.
Preferably, before the step S1, the method further comprises the step S0: and cutting the area outside the image to be rendered in the display area to cut off all data beyond the range of the image to be rendered.
The present invention also provides an image rendering system based on multithreading, which includes: the area selection unit is used for moving the display area to an area to be rendered, the area to be rendered comprises an image to be rendered and a mark of the image to be rendered, and the image to be rendered corresponds to a part of data sets in a known data set; the area dividing unit is used for dividing the image to be rendered in the display area into a plurality of sub-areas so as to divide the image to be rendered into a plurality of sub-images; the thread distribution unit is used for correspondingly distributing a first thread to each sub-area, and each first thread is distributed with a second thread matched with each layer in the corresponding sub-image; the graph rendering unit is used for matching the corresponding rendering graphs with the same marks in a partial data set by using the marks of the images to be rendered in each second thread, rendering all the rendering graphs in the sub-images and obtaining the rendering graphs of the sub-images; and the imaging unit is used for rendering graphs of all the sub-images in parallel through a plurality of first threads, and displaying rendering results on corresponding positions of the rendering areas based on the rendering graphs.
Preferably, the method further comprises the following steps: and the cutting unit is used for cutting the rendering area outside the range of the required rendering graph so as to cut all the data beyond the range of the required rendering graph.
Preferably, the graphics rendering unit further comprises: the first node matching unit is used for matching the marks of the image to be rendered and rendering graphs with the same marks in the root nodes in partial data sets by the second thread to obtain the rendering graphs of the root nodes; the second node matching unit is used for entering the corresponding leaf node from the root node based on the index of the root node, and matching the mark of the image to be rendered with the rendering graph with the same mark in the corresponding leaf node to obtain the rendering graph in the leaf node; and the matching cut-off unit is used for continuously entering the corresponding next-level leaf node from the leaf node based on the new index to perform matching so as to obtain the rendering graph in the next-level leaf node until all the leaf nodes corresponding to the index are matched, and obtaining a plurality of rendering graphs in the multi-level leaf node.
The invention also provides an electronic device, comprising a memory and a processor, characterized in that: the memory having stored therein a computer program arranged when executed to perform the multithreading-based image rendering method of any one of the above; the processor is arranged to perform the multithreading-based image rendering method of any one of the above by the computer program.
Compared with the prior art, the image rendering method based on multiple threads provided by the invention has the following advantages:
by dividing a to-be-rendered image into a plurality of sub-images, allocating a first thread to each sub-image, and allocating a corresponding number of second threads for the layer number of each sub-image, multi-thread rendering is realized for each image and the graphics of a plurality of layers in each image, rendering efficiency is improved, and rendering time is reduced.
Before the image to be rendered is divided, the area outside the image to be rendered in the display area is cut to cut all data beyond the range of the image to be rendered, so that the calculation amount of rendering is reduced, and the rendering efficiency is improved.
The plurality of sub-regions divided by the display region are sub-regions with equal areas, so that the calculated amount of each first thread is more balanced during rendering, and the utilization rate of the threads is improved.
By utilizing the tree-shaped data structure of the known data set and traversing the tree-shaped data structure of the known data set according to the mark of the image to be rendered, all rendered images of the image to be rendered are obtained, and the rendering efficiency and the rendering accuracy of image rendering are improved.
And converting the local coordinates of the rendering graph into display coordinates to display the final rendering graph in the rendering area, so that after the rendering graph is rendered, the rendering graph is displayed at the correct position of the display area through the converted display coordinates.
[ description of the drawings ]
FIG. 1a is a flowchart illustrating an overall multi-thread based image rendering method according to a first embodiment of the present invention;
FIG. 1b is a schematic structural diagram of a tree data structure of a known data set in an image rendering method based on multiple threads according to a first embodiment of the present invention;
FIG. 2 is a diagram illustrating an implementation procedure of step S2 of a multithreading-based image rendering method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating details of step S4 of a multithreading-based image rendering method according to a first embodiment of the present invention;
FIG. 4 is a flowchart illustrating details of step S5 of a multithreading-based image rendering method according to a first embodiment of the present invention;
FIG. 5 is a block diagram of a multithreading-based image rendering system according to a second embodiment of the present invention;
FIG. 6 is a block diagram of a graphics rendering unit in a multithreading-based image rendering system according to a second embodiment of the present invention;
fig. 7 is a block diagram of an electronic device according to a third embodiment of the invention.
Description of reference numerals:
1. a region selection unit; 2. a region dividing unit; 3. a thread allocation unit; 4. a graphics rendering unit; 5. an imaging unit; 6. a cutting unit;
10. a memory; 20. a processor;
41. a first node matching unit; 42. a second node matching unit; 43. a matching cut-off unit;
100. a display area; 200. a sub-region; 300. a root node; 400. A leaf node; 500. and (4) indexing.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to FIG. 1a, a multithreading-based image rendering method for rendering an integrated circuit graphic having a plurality of layers is provided according to a first embodiment of the present invention. It will be appreciated that in integrated circuit patterns, it is common to have a stack of layers of circuits, each circuit consisting of a different pattern.
The multithreading-based image rendering method is used for rendering an image to be rendered in a display area, wherein the image to be rendered is an integrated circuit graph with a plurality of layers, and specifically comprises the following steps:
step S1: moving the display area to an area to be rendered, wherein the area to be rendered comprises an image to be rendered and a mark of the image to be rendered, and the image to be rendered corresponds to a part of data sets in a known data set;
it is to be understood that the known dataset includes a plurality of geometric shapes of the whole integrated circuit graph and marks corresponding to the geometric shapes, the known dataset is a tree-shaped data structure including a root node and a plurality of leaf nodes corresponding to the root node based on indexes, the root node and the leaf nodes include the geometric shapes, and any one of the root node and the leaf nodes includes a plurality of geometric shapes, and since the image to be rendered in the whole area to be rendered is a partial image of the whole integrated circuit graph, only a part of the dataset corresponding to the image to be rendered in the known dataset needs to be rendered. As shown in fig. 1b, the root node 300 and the leaf node 400 shown in fig. 1b are taken as an example, only a 3-layer tree structure is taken as an example in fig. 1b, and in other embodiments, the tree data structure may be multi-layer. This example is intended to be illustrative of the present invention and is not intended to be limiting. One root node 300 is connected to a plurality of (or one) leaf nodes 400 through the root node's index 500, and the plurality of leaf nodes 400 continue through the new index 500 to the next level leaf node 400, thereby forming a data set having a 3-level tree data structure.
It is understood that the partial data set is a partial tree data structure in a tree data structure of a known data set, and the partial data set contains all rendering graphics in the image to be rendered.
It is to be understood that the tag of the image to be rendered is a tag of all rendering graphics within the image to be rendered, which is present in each of the root node and leaf nodes of the known data set and the partial data set. The mark of the image to be rendered is unique information different from other images, and can be a serial number or a code with any programming rule. And the rendering graphs corresponding to the marks of the image to be rendered in each root node and leaf node are different.
With continued reference to fig. 1a, a multithreading-based image rendering method further includes:
step S2: dividing a display area into a plurality of sub-areas so as to divide an image to be rendered into a plurality of sub-images;
in some other embodiments, the display area may also be a combination of multiple equal-area sub-areas.
It should be understood that, for convenience of description, the display area is divided into 3 × 3 sub-areas as an example, but the division is only an example of the present invention and is not a limitation of the present invention.
Step S3: correspondingly allocating a first thread to each sub-area, and allocating a second thread matched with each layer in the corresponding sub-image to each first thread;
for example, a 3 × 3 sub-region is allocated 9 first threads, each of which corresponds to one of the sub-regions. In each sub-region, the first thread allocates a corresponding number of second threads according to the number of layers included in the sub-image corresponding to the sub-region, for example, if 9 layers of graphics are included in the sub-image corresponding to one sub-region, 9 second threads are allocated, and each second thread is matched with each layer.
Step S4: each second thread utilizes the marks of the images to be rendered to match with corresponding rendering graphs with the same marks in a partial data set, all rendering graphs in the sub-images are rendered, and rendering graphs of the sub-images are obtained;
it can be understood that, matching the corresponding rendering graphs with the same mark in the partial data set by using the mark of the image to be rendered is performed one by one in a plurality of root nodes and leaf nodes on the tree-shaped data structure of the partial data set, and each node (root node or leaf node) contains a plurality of different rendering graphs with the same mark, the second thread uses the mark of the image to be rendered to correspondingly obtain a plurality of rendering graphs with the same mark after matching in each node (root node or leaf node), and when traversing the tree-shaped data structure of the entire partial data set, all the rendering graphs in the sub-image corresponding to each second thread are obtained.
Step S5: and rendering the rendering graphs of all the sub-images in parallel by the first threads, and displaying rendering results on corresponding positions of the rendering areas based on the rendering graphs.
In some other embodiments, before step S1, the method further includes:
step S0: and cutting the area outside the image to be rendered in the display area to cut off all data beyond the range of the image to be rendered.
It can be understood that before the image to be rendered is rendered, the image to be rendered needs to be subjected to visibility judgment, that is, the image to be rendered is not completely composed of the image to be rendered, within an allowable error range, the image to be rendered further includes a background feature irrelevant to the image to be rendered, and the irrelevant background feature is cut, so that the amount of calculation for rendering is reduced, and the rendering efficiency is improved.
Referring to fig. 2, step S2: the image to be rendered in the display area is divided into a plurality of sub-areas so as to divide the image to be rendered into a plurality of sub-images. For example, as shown in fig. 2, the display area 100 is divided into 9 sub-areas 200 of a 3 × 3 standard, and when the image to be rendered is displayed on the display area 100, the image is divided and displayed in the plurality of sub-areas 200 according to the 3 × 3 standard.
It can be understood that the image to be rendered is divided into a plurality of sub-areas so as to divide the image to be rendered into a plurality of sub-images, so that the plurality of sub-images can be rendered in parallel through multiple threads in the subsequent steps, and the rendering efficiency is improved.
Referring to fig. 3, step S4: and each second thread utilizes the mark of the image to be rendered to match the corresponding rendering graph with the same mark in the partial data set, renders all the rendering graphs in the sub-image and obtains the rendering graph of the sub-image. Step S4 specifically includes steps S41 to S43, and it is understood that steps S41 to S43 are only one embodiment of this example, and the embodiment is not limited to steps S41 to S43, as shown in fig. 3, the flow of steps is as follows:
step S41: the second thread matches the marks of the image to be rendered with rendering graphs with the same marks in the root node in part of the data set to obtain the rendering graphs of the root node;
step S42: the method comprises the steps that the corresponding leaf nodes are entered from the root nodes based on the indexes of the root nodes, the marks of images to be rendered are used for being matched with rendering graphs with the same marks in the corresponding leaf nodes, and the rendering graphs in the leaf nodes are obtained;
step S43: continuously entering the corresponding next-level leaf node from the leaf node based on the new index for matching to obtain a rendering graph in the next-level leaf node; a plurality of rendered graphics within the multi-level leaf nodes are obtained until all leaf nodes corresponding to the index match.
It is understood that the obtained rendering graph is a graph formed by rendering the vertex coordinates of the graph and connecting the vertex coordinates according to the connection relationship of the rendering graph during the rendering process.
Referring to fig. 4, step S5: and rendering the rendering graphs of all the sub-images in parallel by the first threads, and displaying rendering results on corresponding positions of the rendering areas based on the rendering graphs. Step S5 specifically includes steps S51 to S52, and it is understood that steps S51 to S52 are only one embodiment of this example, and the embodiment is not limited to steps S51 to S52, as shown in fig. 4, the flow of steps is as follows:
step S51: rendering all rendering graphs of a plurality of sub-images by a plurality of first threads in parallel to obtain a rendering graph with local coordinates of the image to be rendered;
step S52: and converting the local coordinates of the rendering graph into display coordinates so as to display the final rendering graph in the rendering area.
It can be understood that, in image rendering, all the graphics in the rendering map of the image to be rendered obtained contain conversion of multiple coordinate systems in the rendering process, and the purpose is to convert three-dimensional image data into two-dimensional data of graphics displayed on a two-dimensional screen.
Referring to fig. 5, a second embodiment of the invention provides an image rendering system based on multiple threads. The multithreading-based image rendering system includes: a region selection unit 1, a region division unit 2, a thread assignment unit 3, a graphics rendering unit 4, and an imaging unit 5.
The area selection unit 1 is used for moving the display area to an area to be rendered, wherein the area to be rendered comprises an image to be rendered and a mark of the image to be rendered, and the image to be rendered corresponds to a part of data sets in a known data set;
the area dividing unit 2 is used for dividing an image to be rendered in the display area into a plurality of sub-areas so as to divide the image to be rendered into a plurality of sub-images;
the thread distribution unit 3 correspondingly distributes a first thread to each sub-area, and each first thread is distributed with a second thread matched with each layer in the corresponding sub-image;
the graph rendering unit 4 is configured to match, in a partial data set, each second thread with a corresponding rendering graph having the same mark by using the mark of the image to be rendered, and render all rendering graphs in the sub-image to obtain a rendering graph of the sub-image; and
and the imaging unit 5 is used for rendering maps of all the sub-images in parallel through a plurality of first threads, and displaying rendering results on corresponding positions of the rendering areas based on the rendering maps.
Referring to fig. 6, the graphics rendering unit 4 further includes a first node matching unit 41, a second node matching unit 42, and a matching cutoff unit 43.
A first node matching unit 41, configured to match, by the second thread, a mark of an image to be rendered with a rendering graph having the same mark in a root node in a partial data set, so as to obtain a rendering graph of the root node;
a second node matching unit 42, configured to enter a corresponding leaf node from the root node based on an index of the root node, and match, by using a mark of an image to be rendered, a rendering graph with the same mark in the corresponding leaf node, to obtain a rendering graph in the leaf node;
and a matching cut-off unit 43, configured to continue to perform matching from the leaf node to the corresponding next-level leaf node based on the new index, to obtain rendering graphics in the next-level leaf node, until all leaf nodes corresponding to the indexes are matched, to obtain multiple rendering graphics in the multi-level leaf node.
Optionally, the multithread-based image rendering system further includes a cropping unit 6 configured to crop rendering areas outside the range of the desired rendering graphics to crop all data outside the range of the desired rendering graphics.
Referring to fig. 6, a third embodiment of the present invention provides an electronic device, which includes a memory 10 and a processor 20, wherein the memory 10 stores a computer program, and the computer program is configured to, when executed, perform the steps in any of the embodiments of the multithread-based image rendering method.
The processor 20 is arranged to perform the steps of any of the above embodiments of the multithreading-based image rendering method by the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of an operating machine network.
Specifically, the electronic device is an image rendering device applied to the field of image rendering, and is used for performing multi-thread rendering on an image so as to improve rendering efficiency.
Specifically, the electronic device can also be applied to the field of computer rendering of integrated circuit graphics, and is used for rendering photomask graphics data so as to improve the rendering efficiency of photomask graphics and reduce the rendering time.
Compared with the prior art, the image rendering method based on multiple threads provided by the invention has the following advantages:
by dividing a to-be-rendered image into a plurality of sub-images, allocating a first thread to each sub-image, and allocating a corresponding number of second threads for the layer number of each sub-image, multi-thread rendering is realized for each image and the graphics of a plurality of layers in each image, rendering efficiency is improved, and rendering time is reduced.
Before the image to be rendered is divided, the area outside the image to be rendered in the display area is cut to cut all data beyond the range of the image to be rendered, so that the calculation amount of rendering is reduced, and the rendering efficiency is improved.
The plurality of sub-regions divided by the display region are sub-regions with equal areas, so that the calculated amount of each first thread is more balanced during rendering, and the utilization rate of the threads is improved.
By utilizing the tree-shaped data structure of the known data set and traversing the tree-shaped data structure of the known data set according to the mark of the image to be rendered, all rendered images of the image to be rendered are obtained, and the rendering efficiency and the rendering accuracy of image rendering are improved.
And converting the local coordinates of the rendering graph into display coordinates to display the final rendering graph in the rendering area, so that after the rendering graph is rendered, the rendering graph is displayed at the correct position of the display area through the converted display coordinates.
Which when executed by a processor performs the above-described functions defined in the method of the present application. It should be noted that the computer memory described herein may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer memory may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
More specific examples of computer memory may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable signal medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a region dividing unit, a thread allocating unit, a graphics rendering unit, and an imaging unit. Where the names of these units do not in some cases constitute a limitation on the unit itself, for example, a graphics rendering unit may also be described as "acquiring a unit with graphics to be rendered based on graphics data".
As another aspect, the present application also provides a computer memory, which may be included in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer memory carries one or more programs that, when executed by the apparatus, cause the apparatus to: the method comprises the steps of dividing a to-be-rendered image into a plurality of sub-areas, allocating a first thread to each sub-area, and allocating a corresponding number of second threads for the layer number of each sub-area, so that multi-thread rendering is realized on graphics of each area and a plurality of layers in each area.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent alterations and improvements made within the spirit of the present invention should be included in the scope of the present invention.

Claims (10)

1. An image rendering method based on multithreading, which is used for rendering an image to be rendered in a display area, wherein the image to be rendered is an integrated circuit graph with a plurality of layers, and is characterized by comprising the following steps:
step S1: moving the display area to an area to be rendered, wherein the area to be rendered comprises an image to be rendered and a mark of the image to be rendered, and the image to be rendered corresponds to a part of data sets in a known data set;
step S2: dividing an image to be rendered in a display area into a plurality of sub-areas so as to divide the image to be rendered into a plurality of sub-images;
step S3: correspondingly allocating a first thread to each sub-area, and allocating a second thread matched with each layer in the corresponding sub-image to each first thread;
step S4: each second thread utilizes the marks of the images to be rendered to match with corresponding rendering graphs with the same marks in a partial data set, all rendering graphs in the sub-images are rendered, and rendering graphs of the sub-images are obtained; and
step S5: and rendering the rendering graphs of all the sub-images in parallel by the first threads, and displaying rendering results on corresponding positions of the rendering areas based on the rendering graphs.
2. A multithread-based image rendering method as recited in claim 1, wherein: the partial data set is a tree-shaped data structure comprising a root node and a plurality of leaf nodes corresponding to the root node based on indexes, and all rendering graphs required for rendering the image to be rendered are contained in the partial data set;
the step S4 specifically includes the following steps:
step S41: the second thread matches the marks of the image to be rendered with rendering graphs with the same marks in the root node in part of the data set to obtain the rendering graphs of the root node;
step S42: the method comprises the steps that the corresponding leaf nodes are entered from the root nodes based on the indexes of the root nodes, the marks of images to be rendered are used for being matched with rendering graphs with the same marks in the corresponding leaf nodes, and the rendering graphs in the leaf nodes are obtained;
step S43: and continuing to enter the corresponding next-level leaf node from the leaf node based on the new index for matching to obtain the rendering graph in the next-level leaf node until all the leaf nodes corresponding to the index are matched to obtain a plurality of rendering graphs in the multi-level leaf node.
3. A multithread-based image rendering method as recited in claim 2, wherein: in step S4, a plurality of second threads are rendered in parallel, and rendering results for all layers within the sub-image are obtained.
4. A multithread-based image rendering method as recited in claim 1, wherein: the step S5 specifically includes the following steps:
step S51: rendering all rendering graphs of a plurality of sub-images by a plurality of first threads in parallel to obtain a rendering graph with local coordinates of the image to be rendered;
step S52: and converting the local coordinates of the rendering graph into display coordinates so as to display the final rendering graph in the rendering area.
5. A multithread-based image rendering method as recited in claim 1, wherein: the plurality of sub-regions are equal-area sub-regions.
6. A multithread-based image rendering method as recited in claim 1, wherein: before step S1, the method further includes:
step S0: and cutting the area outside the image to be rendered in the display area to cut off all data beyond the range of the image to be rendered.
7. A multithreading-based image rendering system, comprising:
the area selection unit is used for moving the display area to an area to be rendered, the area to be rendered comprises an image to be rendered and a mark of the image to be rendered, and the image to be rendered corresponds to a part of data sets in a known data set;
the area dividing unit is used for dividing the image to be rendered in the display area into a plurality of sub-areas so as to divide the image to be rendered into a plurality of sub-images;
the thread distribution unit is used for correspondingly distributing a first thread to each sub-area, and each first thread is distributed with a second thread matched with each layer in the corresponding sub-image;
the graph rendering unit is used for matching the corresponding rendering graphs with the same marks in a partial data set by using the marks of the images to be rendered in each second thread, rendering all the rendering graphs in the sub-images and obtaining the rendering graphs of the sub-images; and
and the imaging unit is used for rendering maps of all the sub-images in parallel through a plurality of first threads, and displaying rendering results on corresponding positions of the rendering areas based on the rendering maps.
8. The multithreading-based image rendering system of claim 7, wherein: further comprising: and the cutting unit is used for cutting the rendering area outside the range of the required rendering graph so as to cut all the data beyond the range of the required rendering graph.
9. The multithreading-based image rendering system of claim 7, wherein: the graphics-rendering unit further comprises:
the first node matching unit is used for matching the marks of the image to be rendered and rendering graphs with the same marks in the root nodes in partial data sets by the second thread to obtain the rendering graphs of the root nodes;
the second node matching unit is used for entering the corresponding leaf node from the root node based on the index of the root node, and matching the mark of the image to be rendered with the rendering graph with the same mark in the corresponding leaf node to obtain the rendering graph in the leaf node;
and the matching cut-off unit is used for continuously entering the corresponding next-level leaf node from the leaf node based on the new index to perform matching so as to obtain the rendering graph in the next-level leaf node until all the leaf nodes corresponding to the index are matched, and obtaining a plurality of rendering graphs in the multi-level leaf node.
10. An electronic device comprising a memory and a processor, characterized in that: a computer program stored in the memory, the computer program being arranged when executed to perform the multithreading-based image rendering method of any one of claims 1 to 6;
the processor is arranged to execute the multithreading-based image rendering method of any one of claims 1 to 6 by the computer program.
CN201910136436.6A 2019-02-22 2019-02-22 Multithreading rendering method and system for multilayer integrated circuit graphics and electronic equipment Active CN111612881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910136436.6A CN111612881B (en) 2019-02-22 2019-02-22 Multithreading rendering method and system for multilayer integrated circuit graphics and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910136436.6A CN111612881B (en) 2019-02-22 2019-02-22 Multithreading rendering method and system for multilayer integrated circuit graphics and electronic equipment

Publications (2)

Publication Number Publication Date
CN111612881A true CN111612881A (en) 2020-09-01
CN111612881B CN111612881B (en) 2023-05-16

Family

ID=72201924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910136436.6A Active CN111612881B (en) 2019-02-22 2019-02-22 Multithreading rendering method and system for multilayer integrated circuit graphics and electronic equipment

Country Status (1)

Country Link
CN (1) CN111612881B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328194A (en) * 2020-09-18 2021-02-05 广州中望龙腾软件股份有限公司 Drawing parallel display method, intelligent terminal and storage device
CN113923519A (en) * 2021-11-11 2022-01-11 深圳万兴软件有限公司 Video rendering method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736947A (en) * 2011-05-06 2012-10-17 新奥特(北京)视频技术有限公司 Multithread realization method for rasterization stage in graphic rendering
US20160189417A1 (en) * 2014-12-24 2016-06-30 Canon Kabushiki Kaisha Method, apparatus and system for rendering an image
CN105979243A (en) * 2015-12-01 2016-09-28 乐视致新电子科技(天津)有限公司 Processing method and device for displaying stereo images
CN106340055A (en) * 2016-08-19 2017-01-18 江苏电力信息技术有限公司 Multithreading-based OpenGL quick drawing method
CN109242967A (en) * 2018-08-07 2019-01-18 云南电网有限责任公司曲靖供电局 A kind of dimensional topography rendering method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736947A (en) * 2011-05-06 2012-10-17 新奥特(北京)视频技术有限公司 Multithread realization method for rasterization stage in graphic rendering
US20160189417A1 (en) * 2014-12-24 2016-06-30 Canon Kabushiki Kaisha Method, apparatus and system for rendering an image
CN105979243A (en) * 2015-12-01 2016-09-28 乐视致新电子科技(天津)有限公司 Processing method and device for displaying stereo images
CN106340055A (en) * 2016-08-19 2017-01-18 江苏电力信息技术有限公司 Multithreading-based OpenGL quick drawing method
CN109242967A (en) * 2018-08-07 2019-01-18 云南电网有限责任公司曲靖供电局 A kind of dimensional topography rendering method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328194A (en) * 2020-09-18 2021-02-05 广州中望龙腾软件股份有限公司 Drawing parallel display method, intelligent terminal and storage device
CN113923519A (en) * 2021-11-11 2022-01-11 深圳万兴软件有限公司 Video rendering method and device, computer equipment and storage medium
CN113923519B (en) * 2021-11-11 2024-02-13 深圳万兴软件有限公司 Video rendering method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111612881B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
US20170069132A1 (en) Graphics Processing Method and System for Processing Sub-Primitives Using Sub-Primitive Indications in a Control Stream
EP2954468B1 (en) Providing indoor facility information on a digital map
EP3828720A2 (en) Method and apparatus for merging data of building blocks, device and storage medium
CN102818571B (en) Data hierarchy and organization method and device capable of fast displaying road conditions
CN109992640B (en) Method, device, equipment and storage medium for determining position grid
CN111695488A (en) Interest plane identification method, device, equipment and storage medium
CN111612881B (en) Multithreading rendering method and system for multilayer integrated circuit graphics and electronic equipment
CN110838178B (en) Road scene model determining method and device
CN111367649B (en) High-precision map data parallel processing method and device
CN108595613A (en) GIS local maps edit methods and device
CN112685616A (en) Precise power component management method based on space grid and building information model
CN103712628A (en) Navigation path drawing method and terminal
CN111159451A (en) Power line point cloud dynamic monomer method based on spatial database
KR101487454B1 (en) method for parallel processing of LOD image
CN107330975A (en) A kind of three-dimensional military marker mapping system
CN114329058B (en) Image file gathering method and device and electronic equipment
CN105512312A (en) Accelerating method for two-dimensional map library
CN116258756A (en) Self-supervision monocular depth estimation method and system
CN106780693B (en) Method and system for selecting object in three-dimensional scene through drawing mode
CN115830207A (en) Three-dimensional scene roaming method, device, equipment and medium
JPS6019826B2 (en) Image data encoding method
JP2015125482A (en) Icon display program and icon display device
CN111027791B (en) Monitoring resource management method and device
CN114138925A (en) Location point belonging area retrieval method, device, electronic equipment, medium and product
CN111369676B (en) Map image processing method and device and vehicle-mounted equipment

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