A high-security graphic design system and method

By deploying the Vulkan interface and function library in the abstract graphics layer and the underlying library layer, the adaptability and security issues of the Vulkan graphics library interface in the existing technology are solved, and a graphics design system in high-security fields is realized, which is suitable for high-security applications in nuclear power and aviation.

CN119668610BActive Publication Date: 2025-09-23ZHEJIANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411840638.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-09-23
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The existing technology lacks a Vulkan graphics library interface that can meet the needs of security-level equipment, and foreign graphics configuration software only supports specific standards and hardware platforms and cannot adapt to multiple graphics standards and target platforms, resulting in limited development of domestic HMI graphics design tools in the high-security field.

Method used

A high-security graphics design system is provided. By deploying the Vulkan interface in the abstract graphics layer and the Vulkan function library in the underlying library layer, the security and compatibility of the graphics interface are achieved. The system includes initialization, data reception, drawing and submission modules, supports the Vulkan graphics standard and meets the security design standards.

Benefits of technology

The application of graphics software in high-security fields such as nuclear power and aviation has been realized. The graphics interface can adapt to the Vulkan standard, meet relevant safety design standards, and improve the security and applicability of graphics software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668610B_ABST
    Figure CN119668610B_ABST
Patent Text Reader

Abstract

The present invention provides a high-security graphics design system and method, relating to the technical field of nuclear power plant instrumentation and control systems. The graphics design system includes: a Vulkan function library, deployed in the underlying library layer, for storing drawing functions; and a Vulkan interface, deployed in the secure graphics programming interface of the abstract graphics layer. The Vulkan interface includes: an initialization module, for performing Vulkan drawing initialization; a data receiving module, for obtaining drawing data; a drawing module, for calling the drawing function of the corresponding drawing graphics format from the Vulkan function library based on the drawing data to perform drawing to obtain a drawing image; and a submission module, for sending the drawing image to the application layer for presentation according to the submission instruction at the end of drawing. The graphics design system and method provided by the present invention can adapt to the advanced graphics standard Vulkan, and the design method meets relevant security design standards and can be used in high-security fields such as nuclear power and aviation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of nuclear power plant instrumentation and control systems, and in particular to a high-safety graphic design system and method. Background Art

[0002] High-security software development tools are high-tech products that integrate computer, control, and network technologies. They feature robust configuration capabilities, ease of operation, and high reliability, making them suitable for engineering design applications in nuclear power plants and aviation applications. However, these tools require high technical expertise and stringent security requirements. Currently, there are no universal high-security HMI (Human Machine Interface) graphic design tools in China. The development of independent, domestically produced products is urgently needed to address the long-standing bottleneck in high-security software development tools in my country's nuclear power, aviation, and aerospace sectors.

[0003] Currently, HMI graphics design software for high-security applications in China is relatively scarce and lacks widespread adoption. While graphics configuration software for high-security applications is more mature abroad, it only targets specific graphics standards and specific hardware target platforms. Especially with the trend toward localization of hardware platforms in China, developing a graphics interface that can adapt to multiple graphics standards and target platforms has become a critical issue for high-security graphics configuration software. Currently, the primary display software development tool for aviation safety-critical applications is SCADE Display from AnSys, a US company. However, this software only supports OpenGL, OpenGL SC 1.0 and 2.0 (for high-security applications), and OpenGL ES 1.1 and 2.0 (for embedded systems), and lacks support for the popular Vulkan graphics standard. Furthermore, while many graphics library interfaces exist on the market, most are designed for gaming and other non-safety-grade devices. There are no Vulkan graphics library interfaces suitable for safety-grade devices. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a high-security graphics design system and method for solving the problem that there is no Vulkan graphics library interface that can meet the needs of security-level devices in the prior art, and the graphics interface that meets the needs of security-level devices does not support Vulkan.

[0005] To achieve the above-mentioned and other related purposes, the present invention provides a high-security graphics design system, comprising: a Vulkan function library, deployed in the underlying library layer, for storing drawing functions; and a Vulkan interface, deployed in the secure graphics programming interface of the abstract graphics layer, the Vulkan interface comprising: an initialization module, for performing Vulkan drawing initialization; a data receiving module, for obtaining drawing data; a drawing module, for calling the drawing function of the corresponding drawing graphics format from the Vulkan function library according to the drawing data to perform drawing to obtain a drawing image; and a submission module, for sending the drawing image to the application layer for presenting the image according to the submission instruction at the end of drawing.

[0006] In one embodiment of the present invention, the Vulkan interface is obtained by programming with C language code.

[0007] In one embodiment of the present invention, the secure graphics programming interface of the abstract graphics layer further includes an OpenGL interface.

[0008] In one embodiment of the present invention, the rendering module is further configured to reclaim memory space by creating a vertex buffer and updating a vertex data update mechanism of the vertex buffer.

[0009] In one embodiment of the present invention, the initialization module is further configured to initialize component resources in a resource initialization file required for Vulkan drawing through an initialization function.

[0010] In one embodiment of the present invention, the initialization module includes: a main application code, which is responsible for initializing the Vulkan instance, device, and window system; a Vulkan instance creation module, which is used to create a Vulkan instance, manage the application and Vulkan Global state between APIs; logical device creation module, used to create logical devices and manage the resources and status of physical devices; swap chain creation module, used to create swap chains and manage image buffers in the window system to achieve double buffering or multi-buffering; rendering channel creation module, used to create rendering channels and define a series of operations and attachment points in the rendering process; frame buffer creation module, used to create frame buffers and store rendering results, each frame buffer corresponds to an image in the swap chain; graphics pipeline creation module, used to create graphics pipelines and define rendering attributes, where rendering attributes include vertex shaders, fragment shaders, vertex inputs, and rasterization; command pool creation module, used to create command pools and manage the allocation and recycling of command buffers; command buffer allocation module, used to allocate command buffers and record rendering commands; synchronization object creation module, used to create synchronization objects to synchronize the execution and submission of commands, where synchronization objects include semaphores and fences; rendering result submission module, used to submit rendering results to the swap chain for display on the screen; main loop, used to handle events, submit commands, and wait for synchronization objects; window system library, used to create and manage windows.

[0011] In one embodiment of the present invention, the initialization module also includes: a multi-thread processing module for multi-thread initialization and command recording; a multi-frame parallel processing module for multi-frame parallel processing of command buffers and synchronization objects; a multi-queue submission module for multi-queue submission of commands, wherein the commands include graphics commands, calculation commands and transmission commands.

[0012] In one embodiment of the present invention, the submission module is further configured to receive a submission instruction when drawing is finished, send the drawn image to the application layer through the swap chain to present the image and update the frame rate, and clear the memory space by using the first function.

[0013] To achieve the above-mentioned purpose and other related purposes, the present invention also provides a high-security graphics design method, comprising the following steps: storing drawing functions through a Vulkan function library deployed in the underlying library layer; executing the following steps through a Vulkan interface in a secure graphics programming interface deployed in the abstract graphics layer: executing Vulkan drawing initialization through an initialization module; obtaining drawing data through a data receiving module; calling a drawing function in a corresponding drawing graphics format from the Vulkan function library according to the drawing data through a drawing module to perform drawing to obtain a drawing image; and sending the drawing image to the application layer to present the image according to a submission instruction at the end of drawing through a submission module.

[0014] In one embodiment of the present invention, performing Vulkan graphics initialization through an initialization module includes: initializing component resources in a resource initialization file required for Vulkan graphics through an initialization function.

[0015] As described above, a high-security graphics design system and method of the present invention has the following beneficial effects: by deploying the Vulkan interface in the secure graphics programming interface of the abstract graphics layer and deploying the Vulkan function library in the underlying library layer, the graphics interface of the graphics software can be made to meet relevant safety design standards such as security, IEC and DO-C standards, and realize applications in high-security fields such as nuclear power and aviation, and also enable the graphics interface to adapt to the Vulkan graphics standard. When drawing an image, by splitting the Vulkan drawing architecture into three parts: the drawing start draw_init, the drawing function, and the drawing end draw_end, the image is drawn in the secure general graphics programming interface, and the corresponding drawing function can be called according to the drawing data to perform drawing, so as to adapt to the input and output mechanism of the secure general graphics programming interface in the high-security display software development tool. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Shown is a structural block diagram of a high-security graphic design system provided by an embodiment of the present invention.

[0017] Figure 2 Shown is a hierarchical structure diagram of a graphics software product provided by an embodiment of the present invention.

[0018] Figure 3 Shown is a schematic diagram of the process of Vulkan interface data processing according to an embodiment of the present invention.

[0019] Figure 4 Shown is an architectural diagram of a Vulkan interface program provided by an embodiment of the present invention.

[0020] Figure 5 Shown is a schematic diagram of the Vulkan interface drawing effect provided by an embodiment of the present invention.

[0021] Component number description

[0022] Bottom-layer graphics library layer 10; abstract graphics layer 20; application layer 30; Vulkan function library 1; secure graphics programming interface 2; Vulkan interface 21; OpenGL interface 22; initialization module 211; data receiving module 212; drawing module 213; submission module 214. DETAILED DESCRIPTION

[0023] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0024] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.

[0025] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.

[0026] Computer graphics is an ever-expanding discipline that uses mathematical algorithms to transform two-dimensional or three-dimensional graphics into a raster representation for a computer display. Simply put, computer graphics focuses on the principles and algorithms for representing graphics in computers, as well as how computers are used to calculate, process, and display them.

[0027] A graphics library is a program library used to render computer graphics on a display. It typically provides a set of optimized functions to perform common rendering tasks. These tasks can often be performed entirely in software, using the CPU (as is common in embedded systems) or hardware-accelerated by a GPU (as is common in home computers). Using these functions, a program can assemble an image for display output. This relieves programmers of the burden of creating and optimizing these functions, allowing them to focus on constructing graphics programs.

[0028] A graphics engine is a simple, easy-to-use, and feature-rich graphics development environment that encapsulates hardware operations and graphics algorithms. Because graphics involve numerous algorithms and specialized knowledge, rapidly developing graphics applications can be challenging. Currently, graphics applications on microcomputers typically use OpenGL or DirectX, despite their excellent performance in graphics production.

[0029] However, there are still some shortcomings in directly using computer graphics, graphics libraries and graphics engines in system development: they are all non-object-oriented, making it difficult to design scenes and operate objects in scenes; they require the use of basic graphics elements, making it relatively difficult to write programs when displaying more complex scenes; they are not well integrated with modeling tools; and there is a lack of support for some very important key technologies such as LOD (Level of Detail) and dynamic clipping.

[0030] Based on the above situation, application developers urgently need a graphics development environment that encapsulates hardware operations and graphics algorithms, is simple to use, and has rich functions. This environment can be called a graphics engine.

[0031] Vulkan is a high-performance, cross-platform graphics and compute API (Application Programming Interface) developed and maintained by the Khronos Group. It aims to provide low-level access to modern graphics processing units, giving developers more granular control over hardware resources for higher performance and efficiency. Vulkan's design was inspired by AMD's Mantle API, but it has wider platform support and is suitable for multiple operating systems such as Windows, Linux, macOS, and Android.

[0032] See also Figure 1 The present invention provides a high-security graphics design system. By deploying the Vulkan interface in the secure graphics programming interface of the abstract graphics layer and the Vulkan function library in the underlying library layer, the graphics software's graphics interface can meet relevant safety design standards such as security, IEC, and DO-C standards, enabling applications in high-security fields such as nuclear power and aviation. Furthermore, the graphics interface can be adapted to the Vulkan graphics standard. When drawing an image, the Vulkan drawing architecture is split into three parts: draw_init, a drawing function, and draw_end. This allows the image to be drawn in the secure general graphics programming interface by calling the corresponding drawing function based on the drawing data, thereby adapting to the input and output mechanism of the secure general graphics programming interface in the high-security display software development tool.

[0033] See also Figure 1 In one embodiment of the present invention, the present invention provides a high-security graphics design system, including: a Vulkan function library 1, deployed in the underlying library layer 10, for storing drawing functions; and a Vulkan interface 21, deployed in the secure graphics programming interface 2 of the abstract graphics layer 20, the Vulkan interface 21 including: an initialization module 211, for performing Vulkan drawing initialization; a data receiving module 212, for obtaining drawing data; a drawing module 213, for calling the drawing function of the corresponding drawing graphics format from the Vulkan function library 1 according to the drawing data to perform drawing to obtain a drawing image; and a submission module 214, for sending the drawing image to the application layer 30 for presenting the image according to the submission instruction at the end of drawing.

[0034] In this embodiment, the Vulkan library 1 is deployed in the underlying graphics library layer 10, and the Vulkan interface 21 is deployed in the secure graphics programming interface 2 of the abstract graphics layer 20. The Vulkan library 1 stores the drawing functions required for drawing graphics. Different drawing functions can be used to draw different graphics, such as triangles, circles, rectangles, and line segments. During the drawing process, initialization module 211 performs initialization operations to prepare the resources required for Vulkan drawing. When drawing begins, tools such as drawing signals and instructions are prepared to direct the drawing. The data receiving module 212 of the Vulkan interface 21 receives the drawing data and inputs it into the drawing module 213. After receiving the drawing data, the drawing module 213 searches the Vulkan library 1 for the drawing function corresponding to the graphics format of each drawing data, and completes the drawing of the graphics according to the corresponding drawing function. After all the drawing data is processed, a drawn image is obtained. At the end of the drawing process, the submission module 214 sends the drawn image to the application layer 30 for presentation according to the corresponding submission instructions. Through the above-mentioned graphics design system, graphics software products can be adapted to the advanced graphics standard Vulkan, and the design system can also meet relevant safety design standards and can be applied in high-security fields such as nuclear power and aviation.

[0035] In one embodiment of the present invention, the Vulkan interface 21 is obtained by programming in C language code. In this embodiment, by using C language code, compared with C++, it has simplicity and predictability, without complex object-oriented features, making the code easier to understand and review. Fine-grained control of memory management, direct operation of pointers. The standard is clear, which helps to ensure code consistency and verifiability, and makes it easier to meet the certification standards for safety-critical areas. The static type system helps to capture type errors at compile time and reduce runtime errors. At the same time, the present invention also implements development based only on the Vulkan graphics core API, without using any third-party libraries (such as glm, glfw and other third-party libraries currently used in market practice).

[0036] In one embodiment of the present invention, the secure graphics programming interface 2 of the abstract graphics layer 20 also includes an OpenGL interface 22. In this embodiment, the secure graphics programming interface 2 (SGPI) in the abstract graphics layer 20 includes an SGPI-Vulkan interface 21. Similarly, an SGPI-OpenGL interface 22 can also be used to ensure that both the Vulkan interface 21 and the OpenGL interface 22 can be used simultaneously in portable graphics applications on a microcomputer.

[0037] In one embodiment of the present invention, the drawing module 213 is further configured to reclaim memory space through a vertex data update mechanism that creates and updates vertex buffers. In this embodiment, when drawing graphics using a drawing function corresponding to the drawing data, memory space can also be reclaimed through the designed vertex data update mechanisms of creating and updating vertex buffers.

[0038] In one embodiment of the present invention, the initialization module 211 is further configured to initialize the component resources in the resource initialization file required for Vulkan drawing through an initialization function. In this embodiment, the initialization module 211 encapsulates the component resources in the resource initialization file init.h required for Vulkan drawing. For example, the initialization function initVulkan can be used to initialize the component resources in the resource initialization file required for Vulkan drawing, thereby preparing the component resources in the resource initialization file init.h required for Vulkan drawing. Specifically, the component resources in the resource initialization file init.h required for Vulkan drawing that are prepared may include creating instances, setting debug components, creating surfaces, selecting physical devices, creating logical devices, creating swap chains, creating views, creating rendering channels, creating pipelines, creating frame buffers, creating command pools, creating vertex buffers, creating instruction buffers, and creating synchronization object modules.

[0039] In one embodiment of the present invention, the initialization module 211 includes: a main application code, which is responsible for initializing the Vulkan instance, device, and window system; a Vulkan instance creation module, which is used to create a Vulkan instance, manage the application and Vulkan Global state between APIs; logical device creation module, used to create logical devices and manage the resources and status of physical devices; swap chain creation module, used to create swap chains and manage image buffers in the window system to achieve double buffering or multi-buffering; rendering channel creation module, used to create rendering channels and define a series of operations and attachment points in the rendering process; frame buffer creation module, used to create frame buffers and store rendering results, each frame buffer corresponds to an image in the swap chain; graphics pipeline creation module, used to create graphics pipelines and define rendering attributes, where rendering attributes include vertex shaders, fragment shaders, vertex inputs, and rasterization; command pool creation module, used to create command pools and manage the allocation and recycling of command buffers; command buffer allocation module, used to allocate command buffers and record rendering commands; synchronization object creation module, used to create synchronization objects to synchronize the execution and submission of commands, where synchronization objects include semaphores and fences; rendering result submission module, used to submit rendering results to the swap chain for display on the screen; main loop, used to handle events, submit commands, and wait for synchronization objects; window system library, used to create and manage windows. In the process of initializing the component resources in the resource initialization file init.h required for Vulkan drawing, the specific initialization process can be composed of the main application code, Vulkan instance creation module, logical device creation module, swap chain creation module, rendering channel creation module, frame buffer creation module, graphics pipeline creation module, command pool creation module, command buffer allocation, synchronization object creation module, rendering result submission module, main loop and window system library.

[0040] Furthermore, initialization module 211 also includes a multi-thread processing module for multi-thread initialization and command recording; a multi-frame parallel processing module for multi-frame parallel processing of command buffers and synchronization objects; and a multi-queue submission module 214 for submitting commands to multiple queues, including graphics commands, computation commands, and transmission commands. In this embodiment, multi-threading, multi-frame concurrency, and multiple queues are used to achieve parallel processing and improve performance.

[0041] See also Figure 2 The graphics software product mainly includes a hardware layer, a low-level graphics library layer 10 (a function library that implements specific graphics standards), an abstract graphics layer 20, and an application layer 30 (a UI window system / modeler). The hardware layer includes a CPU and a GPU, using the CPU for calculations and the GPU for hardware acceleration. The low-level graphics library layer 10 includes the Metal function library, the OpenGL function library, the Vulkan function library, and the DirectX (DirectDraw / Direct3D) function library. The abstract graphics layer 20 includes the GDI / GDI+ interface (GDI is the graphics device interface, and GDI+ is an upgraded version of GDI), NanoVG (a lightweight vector graphics rendering library), Cairo (a free function library for providing vector graphics drawing), and the Safety Graphics Programming Interface (SGPI-Safety Graphics Programming Interface), which includes the OpenGL interface and the Vulkan interface. The application layer 30 includes 3d Max (3D Studio Max, a PC-based 3D modeling, rendering and production software), Maya (a 3D animation software), 3Delight (a high-performance renderer), Lightscape (lighting rendering software), VRay (a high-quality rendering software), SCADE display (a multi-functional graphic design and development environment specifically for the development of embedded human-machine interfaces (HMIs)), and VAPS XT (a professional HMI (human-machine interface) development tool).

[0042] See also Figure 3When processing drawing data through the Vulkan interface, component resources are first initialized through window initialization and resource initialization (init.h) to prepare the component resources required for Vulkan drawing. After initialization is completed, the Vulkan drawing program is entered. Specifically, the drawing start draw_init is used to prepare instructions such as fences and signals. After the preparation is completed, the acquired drawing data is input into the Vulkan function library 1 to call the corresponding drawing function sgpi_xx for graphics drawing. After the drawing is completed, it is determined whether there is other drawing data. If so, the drawing data is further input into the Vulkan function library 1 to call the corresponding drawing function sgpi_xx for graphics drawing. After all drawing work is completed, the drawing end instruction draw_end is submitted, and the drawn image is sent to the application layer 30 through the swap chain for image presentation, the frame rate is updated, and finally, the memory space is cleaned up through, for example, the cleanup function. In this embodiment, the drawing function includes a series of functions in the design and encapsulation format of sgpi_xx (xx can be replaced with the corresponding drawing graphics, such as sgpi_triangle is a triangle drawing function).

[0043] See also Figure 4In the SGPI-Vulkan program architecture of the present invention, the yellow box on the left, the green box on the right, and the blue box separately list and describe parallel modules. In the yellow box on the left, Multi-Threaded Initialization and Command Recording can be implemented. For example, Thread 1: creates resources (such as pipelines and buffers) and records commands; Thread 2: creates resources and records commands; ...: other threads can perform similar tasks in parallel. In the green box on the right, Multi-Frame In-Flight can be implemented. For example, Frame 1: command buffers and synchronization objects; Frame 2: command buffers and synchronization objects; ...: multiple frames are processed in parallel. In the blue box on the right, Multiple Queues can be implemented. For example, Graphics Queue: submits graphics commands; Compute Queue: submits compute commands; Transfer Queue: submits transfer commands. The purple box in the middle represents the overall data flow of the program. The arrows indicate the data flow and control flow. Each component depends on the output of the previous component, forming an orderly process. Parallel processing is achieved through multi-threading, multi-frame concurrency, and multiple queues to improve performance.Specifically, the component resources include Application (C / C++ Code) (main application code), which is responsible for initializing Vulkan instances, devices, window systems, etc.; creating Vulkan Instances (Vulkan instances) to manage the global state between the application and the Vulkan API; creating Physical Devices (physical devices) to enumerate available physical devices (such as GPUs) and select a suitable physical device; creating Logical Devices (logical devices) to manage the resources and state of physical devices; creating Swap Chains (swap chains) to manage image buffers in the window system and implement double buffering or multi-buffering; creating Render Passes (rendering channels) to define a series of operations and attachment points in the rendering process; creating Framebuffers (frame buffers) to store rendering results, each frame buffer corresponds to an image in the swap chain; creating Graphics Pipelines (graphics pipelines) to define rendering attributes such as vertex shaders, fragment shaders, vertex inputs, and rasterization; creating Command Pools (command pools) to manage the allocation and recycling of command buffers; allocating Command Buffers (command buffers) are used to record rendering commands; create Synchronization (synchronization objects (semaphores and fences)) to synchronize the execution and submission of commands; submit the Present Queue (current queue: rendering results) to the swap chain and display them on the screen; Main Loop is responsible for processing events, submitting commands, waiting for synchronization objects, etc.; Window System (window system library) is used to create and manage windows.

[0044] In one embodiment of the present invention, the submit module 214 is further configured to receive a submit instruction when drawing is finished, send the drawn image to the application layer 30 via the swap chain to render the image, update the frame rate, and clean up memory space using a first function. In this embodiment, after receiving a submit instruction when borrowing drawing, the image is rendered via the swap chain, the frame rate is updated, and the memory space is cleaned up using a first function, such as a cleanup function.

[0045] See also Figure 5When using SGPI-Vulkan to draw an image, input drawing data to draw a circle. The drawing data includes: center coordinates (0.5f, 0.0f), radius R is 0.4f, fill color is orange, and outline color is green. Input drawing data to draw a triangle. The drawing data includes: vertex coordinates {0.2f, 0.5f), (0.5f, 0.0f), (0.8f, 0.5f)}, fill color is blue, and outline color is magenta. Input drawing data to draw a rectangle. The drawing data includes: vertex coordinates {(0.2f, -0.8f), (0.8f, -0.8f), (0.8f, -0.2f), (0.2f, -0.2f)}, fill color is red, and outline color is yellow. Input drawing data to draw a line segment. The drawing data includes: vertex coordinates {(-0.5f, 0.0f), (0.0f, 0.5f)}, color is cyan). Input drawing data to draw a point. The drawing data includes: vertex coordinates (-0.5f, 0.5f) and color white.

[0046] In one embodiment of the present invention, the present invention further provides a high-security graphic design method, comprising the following steps:

[0047] Step S10: Storing drawing functions via the Vulkan function library 1 deployed in the underlying library layer 10;

[0048] Step S20: Execute the following steps via the Vulkan interface 21 deployed in the secure graphics programming interface 2 of the abstract graphics layer 20:

[0049] Step S201: Initializing Vulkan graphics through the initialization module 211;

[0050] Step S202: obtaining drawing data through the data receiving module 212;

[0051] Step S203: The drawing module 213 retrieves a drawing function of a corresponding drawing graphics format from the Vulkan function library 1 according to the drawing data to obtain a drawing image; and

[0052] Step S204: The rendering image is sent to the application layer 30 for rendering by the rendering module 214 according to the rendering instruction at the end of rendering.

[0053] In this embodiment, by deploying the Vulkan interface 21 within the secure graphics programming interface 2 of the abstract graphics layer 20, when drawing an image, the initialization module 211 first performs Vulkan drawing initialization to prepare the component resources required for Vulkan drawing. The data receiving module 212 then acquires the drawing data, and the drawing module 213 dispatches the drawing functions in the graphics format corresponding to the drawing data to perform image drawing, thereby obtaining a drawn image. After obtaining the drawn image, the submission module 214 sends the drawn image to the application layer 30 for presentation according to the submission instruction at the end of the drawing. The above-described graphics design method is adaptable to the advanced graphics standard Vulkan and meets relevant security design standards, enabling application in high-security fields such as nuclear power and aviation.

[0054] In one embodiment of the present invention, performing initialization of Vulkan drawing through an initialization module includes: initializing component resources in a resource initialization file required for Vulkan drawing through an initialization function.

[0055] In this embodiment, the initialization module 211 encapsulates the component resources in the resource initialization file init.h required for Vulkan drawing. For example, the initialization function initVulkan can be used to initialize the component resources in the resource initialization file init.h required for Vulkan drawing, thereby preparing the component resources in the resource initialization file init.h required for Vulkan drawing. Specifically, the component resources prepared in the resource initialization file init.h required for Vulkan drawing may include creating instances, setting debug components, creating surfaces, selecting physical devices, creating logical devices, creating swap chains, creating views, creating render passes, creating pipelines, creating frame buffers, creating command pools, creating vertex buffers, creating instruction buffers, and creating synchronization object modules.

[0056] In summary, the present invention discloses a high-security graphics design system and method. By deploying the Vulkan interface 21 in the secure graphics programming interface 2 of the abstract graphics layer 20 and the Vulkan function library 1 in the underlying library layer 10, the graphics interface of the graphics software can meet security, IEC60880 and DO-178C standards and other relevant safety design standards, and realize applications in high-security fields such as nuclear power and aviation. It also enables the graphics interface to adapt to the Vulkan graphics standard. When drawing an image, by splitting the Vulkan drawing architecture into three parts: drawing start draw_init, drawing function, and drawing end draw_end, the image is drawn in the secure general graphics programming interface 2, and the corresponding drawing function can be called according to the drawing data to adapt to the input and output mechanism of the secure general graphics programming interface 2 in the high-security display software development tool. Therefore, the present invention effectively overcomes the various shortcomings of the existing technology and has high industrial utilization value.

[0057] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.

Claims

1. A high-security graphic design system, characterized in that: include: The Vulkan function library is deployed in the underlying library layer and is used to store drawing functions; as well as The Vulkan interface is deployed in a secure graphics programming interface in the abstract graphics layer. The Vulkan interface includes: Initialization module, used to perform Vulkan drawing initialization; Data receiving module, used to obtain drawing data; a drawing module, configured to call a drawing function in a corresponding drawing graphics format from the Vulkan function library according to the drawing data to perform drawing, so as to obtain a drawing image; and a submitting module, configured to send the drawn image to the application layer for rendering the image according to a submit instruction at the end of drawing; Wherein, the initialization module includes: The main application code is responsible for initializing the Vulkan instance, devices, and window system; The Vulkan instance creation module is used to create Vulkan instances and manage the global state between the application and the Vulkan API; Logical device creation module, used to create logical devices and manage the resources and status of physical devices; The swap chain creation module is used to create a swap chain and manage the image buffer in the window system to achieve double buffering or multi-buffering; The rendering pass creation module is used to create rendering passes and define a series of operations and attachment points in the rendering process; The frame buffer creation module is used to create a frame buffer to store rendering results. Each frame buffer corresponds to an image of the swap chain. A graphics pipeline creation module, configured to create a graphics pipeline and define rendering attributes, wherein the rendering attributes include vertex shader, fragment shader, vertex input, and rasterization; The command pool creation module is used to create a command pool and manage the allocation and recycling of command buffers; Command buffer allocation module, used to allocate command buffers and record rendering commands; A synchronization object creation module, used to create synchronization objects, execute and submit synchronization commands, wherein the synchronization objects include semaphores and fences; The rendering result submission module is used to submit the rendering results to the swap chain for display on the screen; The main loop is responsible for processing events, submitting commands, and waiting for synchronization objects; Window system library, used to create and manage windows; Multi-thread processing module, used for multi-thread initialization and command recording; Multi-frame parallel processing module, used for multi-frame parallel processing command buffer and synchronization objects; The multi-queue submission module is used for submitting commands in multiple queues, wherein the commands include graphics commands, calculation commands and transmission commands.

2. The high-security graphic design system according to claim 1, characterized in that: The Vulkan interface is obtained through C language code programming.

3. The high-security graphic design system according to claim 1, characterized in that: The secure graphics programming interface of the abstract graphics layer also includes an OpenGL interface.

4. The high-security graphic design system according to claim 1, characterized in that: The drawing module is further configured to reclaim memory space by creating a vertex buffer and updating a vertex data update mechanism of the vertex buffer.

5. The high-security graphic design system according to claim 1, characterized in that: The initialization module is further configured to initialize component resources in a resource initialization file required for Vulkan drawing through an initialization function.

6. The high-security graphic design system according to claim 1, characterized in that: The submit module is further configured to receive a submit instruction when drawing is finished, send the drawn image to the application layer through the exchange chain to present the image and update the frame number, and clean up the memory space by using the first function.

7. A high-security graphic design method, characterized in that: The steps include: The drawing functions are stored in the Vulkan library deployed in the underlying library layer. Through the Vulkan interface in the secure graphics programming interface deployed in the abstract graphics layer, the following steps are performed: Perform Vulkan drawing initialization through the initialization module; Obtain drawing data through the data receiving module; The drawing module calls a drawing function of a corresponding drawing graphics format from the Vulkan function library according to the drawing data to perform drawing, so as to obtain a drawing image; as well as Sending the drawn image to the application layer for rendering the image according to the submission instruction at the end of drawing by the submission module; Wherein, the initialization module includes: The main application code is responsible for initializing the Vulkan instance, devices, and window system; The Vulkan instance creation module is used to create Vulkan instances and manage the global state between the application and the Vulkan API; Logical device creation module, used to create logical devices and manage the resources and status of physical devices; The swap chain creation module is used to create a swap chain and manage the image buffer in the window system to achieve double buffering or multi-buffering; The rendering pass creation module is used to create rendering passes and define a series of operations and attachment points in the rendering process; The frame buffer creation module is used to create a frame buffer to store rendering results. Each frame buffer corresponds to an image of the swap chain. A graphics pipeline creation module, configured to create a graphics pipeline and define rendering attributes, wherein the rendering attributes include vertex shader, fragment shader, vertex input, and rasterization; The command pool creation module is used to create a command pool and manage the allocation and recycling of command buffers; Command buffer allocation module, used to allocate command buffers and record rendering commands; A synchronization object creation module, used to create synchronization objects, execute and submit synchronization commands, wherein the synchronization objects include semaphores and fences; The rendering result submission module is used to submit the rendering results to the swap chain for display on the screen; The main loop is responsible for processing events, submitting commands, and waiting for synchronization objects; Window system library, used to create and manage windows; Multi-thread processing module, used for multi-thread initialization and command recording; Multi-frame parallel processing module, used for multi-frame parallel processing command buffer and synchronization objects; The multi-queue submission module is used for submitting commands in multiple queues, wherein the commands include graphics commands, calculation commands and transmission commands.

8. The high-security graphic design method according to claim 7, characterized in that: Initialization of Vulkan drawing is performed through the initialization module, including: Use the initialization function to initialize the component resources in the resource initialization file required for Vulkan drawing.

Citation Information

Patent Citations

  • Multi-terminal integrated cloud streaming client implementation method

    CN116389801A

  • Multi-graphic queue rendering method and device and storage medium

    CN117649473A