Nuclear power monitoring printing method, system and equipment based on virtual printer

By using virtual printer technology, dynamic information from the nuclear power plant monitoring interface is captured and processed in real time, generating diverse print file formats and performing encrypted storage and access management. This solves the problems of static printing, limited format, and security in nuclear power plant monitoring, and achieves efficient and secure data management.

CN121680756APending Publication Date: 2026-03-17CHINA NUCLEAR CONTROL SYST ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511643294.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing nuclear power plant monitoring printing methods suffer from problems such as static and formatted printing content, limited output, insufficient data security, and complex user operation, failing to meet the real-time, diverse, and safe requirements of nuclear power plants.

Method used

The method adopts a virtual printer-based approach, which combines real-time screenshotting and event-driven technology with a ring buffer architecture to capture dynamic changes in the nuclear power monitoring interface in real time. It generates diverse print file formats through multi-level processing, performs encrypted storage and access management, and supports multi-format output and fast retrieval.

Benefits of technology

It enables accurate recording and diversified output of dynamic information from the nuclear power plant monitoring interface, ensuring data security, simplifying user operations, improving the convenience and efficiency of data acquisition, and meeting the needs of safe operation and efficient management of nuclear power plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121680756A_ABST
    Figure CN121680756A_ABST
Patent Text Reader

Abstract

The invention discloses a nuclear power monitoring printing method, system and equipment based on a virtual printer, and relates to the technical field of data processing.The method comprises the steps that dynamic change information in a nuclear power monitoring interface is captured in real time based on the real-time screen capture and event-driven technology, and multi-stage processing is conducted on the dynamic change information in combination with an annular buffer architecture, so that the dynamic change information is obtained; obtaining nuclear power monitoring display page information in a preset template format; calling nuclear power monitoring display page information to be printed, and performing static and dynamic file format generation and encryption processing; classifying and storing the target printing files according to a preset rule, and generating and storing index information; performing authority authentication on the access user and displaying the index information after the authority authentication is passed; and retrieving the corresponding target printing file according to the selection of the access user on the index information, and allowing the target printing file to be used after decryption. Dynamic information of the monitoring interface can be captured in real time, diversified output is supported, data safety is ensured, and operation is easy and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a nuclear power plant monitoring printing method, system and equipment based on a virtual printer. Background Technology

[0002] In the daily operation of nuclear power plants, the monitoring information generated by the distributed control system is crucial for maintaining the safe, stable, and efficient operation of the plant. The monitoring system acts as the nerve center of the power plant, constantly monitoring the dynamic information such as the operating status and parameter changes of numerous devices. This information is a key element in ensuring the reliable operation of the nuclear power plant and also serves as an important basis for fault diagnosis, maintenance decisions, and performance optimization. However, existing printing methods for processing nuclear power plant monitoring information have revealed several drawbacks, as shown in the following five points.

[0003] First, the problem of static printed content is prominent. Traditional printing methods can only capture a single moment of the monitoring interface, failing to continuously and completely record information that changes over time. For example, during the commissioning phase of nuclear power plant equipment, parameters on the monitoring interface change in real time. Traditional printing methods can only capture instantaneous values, unable to record the trend and process of parameter changes, which is extremely detrimental to subsequent data analysis and troubleshooting. When equipment malfunctions, the lack of complete dynamic information records makes it difficult for staff to accurately determine the cause and process of the anomaly. Current technology can only address this problem by periodically taking screenshots and printing all saved screenshots or historical logs. This method cannot accurately capture the required monitoring information, nor can it reflect the trend of information changes; furthermore, printing is time-consuming, and the printed content is redundant and repetitive, hindering data transmission, storage, and retrieval.

[0004] Second, the printed content suffers from severe formatting issues. The existing printing function can only handle document and image files. It cannot directly print other types of data from monitoring systems, such as real-time waveform data and dynamic charts of equipment operation. In some critical monitoring scenarios at nuclear power plants, this non-document and non-image data contains important information about equipment operation characteristics. The inability to print this data directly leads to incomplete information acquisition, affecting a comprehensive assessment of the equipment's operational status.

[0005] Third, the output format is limited. Current printing methods typically support only a few common formats, making it difficult to meet diverse user needs. Staff in different departments and positions have varying requirements for the output format of monitoring information due to differences in their work content and objectives. For example, engineering technicians may need to export monitoring data in CSV format for further data processing and modeling analysis; while managers prefer to obtain monitoring reports in PDF format for reporting and archiving. A single output format cannot meet these diverse needs, reducing work efficiency. If richer media formats are desired for monitoring and inspecting system information, existing methods require third-party tools to convert files, failing to meet the requirements of automation and real-time processing.

[0006] Fourth, data security is insufficient. Nuclear power plant monitoring information contains a large amount of sensitive data. Existing printing methods lack effective encryption measures during data storage and transmission, making them prone to leakage. Once this information falls into the wrong hands, it could seriously threaten the safe operation of the nuclear power plant, even causing safety accidents and incalculable losses. Existing paper printing methods can only serve as a supplement to the nuclear power monitoring system for information retrieval and review, and cannot be used as a means of monitoring and investigating key information such as platform operating status, alarm information, and data trends.

[0007] Fifth, the user operation is complex and inefficient, failing to meet the rapid response requirements of nuclear power plants. Traditional printing processes typically require users to perform a series of cumbersome operations, such as manually configuring printer parameters (e.g., number of copies, print quality, color mode), carefully selecting the area to be printed, and repeatedly confirming print settings. In emergency situations at nuclear power plants, such as sudden equipment failures requiring rapid acquisition of relevant monitoring information for analysis, the complex operating procedures can easily lead to delays in information acquisition, or even operational errors that prevent timely and accurate printing, thus delaying the optimal time for fault handling and posing risks to the safe and stable operation of the power plant. Summary of the Invention

[0008] The purpose of this application is to provide a nuclear power plant monitoring printing method, system, and device based on a virtual printer, which can capture dynamic information from the monitoring interface in real time, support diverse outputs, ensure data security, and is easy to operate.

[0009] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a nuclear power plant monitoring printing method based on a virtual printer, including: Based on real-time screenshot and event-driven technology, dynamic change information in the nuclear power monitoring interface is captured in real time. Combined with a ring buffer architecture, the dynamic change information is processed in multiple levels to obtain nuclear power monitoring display page information in a preset template format, and then stored in a preset database. Based on the collected requirements, the nuclear power monitoring display page information to be printed is retrieved from the preset database, and static and dynamic file formats are generated and encrypted to obtain the target print file; The target print files are classified and stored according to preset rules, and index information is generated and stored at the same time. Access is authenticated for users, and the index information is displayed after successful authentication. Based on the user's selection of index information, the corresponding target print file is retrieved and allowed to be used after decryption.

[0010] Secondly, this paper provides a nuclear power plant monitoring printing system based on a virtual printer, including: The virtual printer module is used to capture dynamic changes in the nuclear power monitoring interface in real time based on real-time screenshot and event-driven technology, and to process the dynamic changes in the interface in multiple levels using a ring buffer architecture to obtain nuclear power monitoring display page information in a preset template format, and then store it in a preset database. The data processing module is used to retrieve the nuclear power monitoring display page information to be printed from the preset database according to the collected requirements, and perform static and dynamic file format generation and encryption processing to obtain the target print file; The storage and retrieval module is used to classify and store the target print files according to preset rules, and at the same time generate and store index information. The access control module is used to authenticate accessing users and display the index information after successful authentication; based on the accessing user's selection of the index information, it retrieves the corresponding target print file and allows its use after decryption.

[0011] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a nuclear power plant monitoring printing method based on a virtual printer.

[0012] According to the specific embodiments provided in this application, the following technical effects are disclosed: Based on real-time screenshot and event-driven technology, this application captures dynamic changes in the nuclear power plant monitoring interface in real time, achieving accurate recording of dynamic changes in the interface. It can capture screen changes with low latency and high frame rate, and completely record dynamic information such as user operations, solving the problem of static content in traditional printing. This application stores nuclear power plant monitoring display page information in a preset template format to a preset database, allowing users to obtain monitoring images at any historical moment or time period, greatly expanding the value of data usage and providing more comprehensive historical data for the operation and management of nuclear power plants. This application generates static and dynamic file formats and performs encryption processing through preset template format processing, meeting the diverse needs for data recording in different scenarios. Furthermore, through format conversion, it effectively reduces file size and improves data transmission efficiency while ensuring data quality, enabling staff to obtain the required data more quickly. Encryption processing ensures data security and privacy. This application facilitates quick file location and management through categorized storage and index generation, improving the convenience of data acquisition. Finally, strict access control through authentication increases the reliability of user authentication and prevents unauthorized devices from accessing the system. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This is a flowchart illustrating a nuclear power plant monitoring printing method based on a virtual printer, according to one embodiment of this application.

[0015] Figure 2 This is a schematic diagram of data processing in a buffer according to one embodiment of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] This application utilizes virtual printing technology to assist in the operation of nuclear power plant monitoring systems, meeting the growing demands for safe operation and efficient management of nuclear power plants.

[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] In one exemplary embodiment, such as Figure 1 As shown, a nuclear power plant monitoring printing method based on a virtual printer is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, it includes the following steps 101 to 105.

[0020] Step 101: Based on real-time screenshot and event-driven technology, capture dynamic change information in the nuclear power monitoring interface in real time, and combine with a ring buffer architecture to perform multi-level processing on the dynamic change information to obtain nuclear power monitoring display page information in a preset template format, and then store it in a preset database.

[0021] To address the issue of static printed content, a real-time screenshot technology and event-driven mechanism based on the operating system's underlying APIs are employed. The real-time screenshot and event-driven technology are implemented using low-level APIs such as Linux's Xlib, leveraging system-level interfaces to achieve lightweight screenshots and real-time message responses. Based on this, step 101 includes the following steps: (11) Based on the Xlib core library, the XFixes interface is used to extend the capture of changing area data in the nuclear power plant monitoring interface. In a practical application, the processing flow is as follows: 1) Initialize FFmpeg, allocate memory for the encoder context, and open the corresponding encoder.

[0022] 2) In a Linux system environment, open the x11grab device of FFmpeg, use the XFixesGetCursorImage interface to capture the cursor position, use the XGetImage interface to capture the window content, and use the XDamage interface to extend the monitoring of regional changes in the nuclear power monitoring interface to capture the data of the changing area; this process only captures the changing area instead of the whole screen, reducing invalid data transmission.

[0023] Specifically, the cursor position is first obtained using the `XFixesGetCursorImage` interface. Then, the `XDamageCreate` interface is called to register the area of ​​the screen to be captured. Next, the event loop waits for and processes events from the display server. When an event is received, the changing rectangular area is obtained, and the content of this area is captured using the `XGetImage` interface. This allows only the changing content within the relevant area of ​​the screen to be captured, rather than the entire screen. In most cases, the content on the screen remains constant; repeatedly capturing this information only increases system resource consumption and affects the efficiency of processing real-time data.

[0024] During the above processing, the XFixes interface can be used to monitor changes in the window area, capturing and transmitting only the changed parts, rather than the entire screen or window. This achieves incremental screenshotting of monitoring information, thereby significantly reducing network bandwidth usage and CPU and GPU resource consumption.

[0025] 3) Fill the changed area data into a preset data structure, and then encode it through an encoder to obtain a video stream data packet.

[0026] 4) Verify the video stream data packet, and write the video stream data packet to the output file after successful verification.

[0027] (12) Utilize XShm extensions and map shared memory regions through shmat to serve as buffers. By leveraging the shared memory features of XShm and mapping memory regions through shmat, zero-copy swapping is achieved, avoiding memcpy operations, resulting in a latency as low as 50 milliseconds and a high frame rate of 30 frames per second. This enables precise and rapid capture of every dynamic change on the monitoring interface.

[0028] (13) An asynchronous event-driven model is used to respond to changes in real time, and the captured data of the changed area is passed to the buffer. Since the Xlib core library is blocking, it supports single-threaded calls. In multi-threaded applications, this may cause the main thread to be blocked, resulting in screen or operation lag and affecting the real-time response. To avoid this situation, an asynchronous event handling mechanism is introduced to avoid blocking waits and monitor the event queue in real time through a non-blocking polling method.

[0029] This application uses an asynchronous event-driven model, registering events such as KeyPressMask and ButtonPressMask based on the XSelectInput interface of the Xlib core library, and using XNextEvent non-blocking polling to achieve real-time event response.

[0030] Specifically, XSelectInput sets the types of events to be listened to (such as key presses, mouse clicks, etc.) to ensure that only these events are sent to the application; XNextEvent continuously checks for new events in a loop and processes them if found. Combined with time.sleep(), it avoids CPU overload; and it performs corresponding operations based on the event type (such as KeyPress, ButtonPress), such as recording key presses or responding to mouse clicks.

[0031] In a practical application, after the event queue is initialized, in each loop iteration, a non-blocking method is used to check the event queue by calling specific system or library functions. For example, the XPending(display) function checks if there are any pending events in the event queue; the XNextEvent(display, &event) function can be used to retrieve the next event in the queue. If there is an event in the queue, this function will return immediately and populate the event information. These functions are non-blocking, preventing the program from stalling and waiting, but returning immediately, allowing the main program to continue executing other tasks or wait briefly to avoid consuming excessive CPU resources.

[0032] If no new events are detected or there are no tasks requiring immediate processing, the program can perform other background calculations, such as parsing, formatting, and saving captured screen information. Simultaneously, necessary polling termination conditions should be set: when the program encounters abnormal situations, such as system resource exhaustion or a user-initiated exit, polling should cease, all memory occupied by the program should be cleared, and monitoring and polling of the event queue should end. This approach improves response speed and user experience, allows for simultaneous processing of multiple events, and effectively increases system throughput.

[0033] Using the above methods, dynamic information monitored on the screen can be captured in a timely and lightweight manner without consuming excessive system resources, and then passed to the background process for further processing.

[0034] (14) In the buffer, based on the ring buffer pool architecture, the data in the variable area is processed by hierarchical generation of effective template information based on image processing algorithm, generation of streaming media information based on media processing algorithm and encryption processing, and then stored in the preset database.

[0035] The ring buffer pool architecture is a hierarchical data processing architecture based on multiple ring buffers for efficient management of data streams and task queues. Through a multi-level buffer design, it achieves hierarchical processing, temporary storage, and consumption of data, improving system throughput and response speed. This application combines a double-buffering mechanism with a ring buffer pool architecture, designing a three-level ring buffer, such as... Figure 2 As shown.

[0036] The primary circular buffer is used for: receiving and storing the changed area data; calling an image processing algorithm to read valid information from the changed area data; retrieving a print template from the preset database and writing the valid information into the print template to obtain valid template information; caching the valid template information to the secondary circular buffer, and deleting the valid template information after caching is complete to clear space for subsequent screenshot content. The print template retrieved from the preset database is saved in JSON format, allowing users to define the information to be printed, such as alarm logs, fault diagnoses, and historical trends.

[0037] The above processing, utilizing image processing algorithms and OCR technology, enables a "what you see is what you print" function. It not only recognizes the currently displayed content and converts it into a saveable format, but also supports multiple print template output formats such as JPEG, PNG, PDF, and CSV, solving the problems of formatted print content and limited output formats. Furthermore, it provides timed printing and continuous printing functions, allowing users to record monitoring information according to specific needs.

[0038] The secondary circular buffer is used for: temporarily storing the valid template information after filtering or formatting; calling the media processing algorithm to read the valid template information and calling the nuclear power monitoring display page information from the preset database to generate predefined streaming media information; caching the predefined streaming media information to the tertiary circular buffer, and deleting the predefined streaming media information after caching is completed.

[0039] In the above processing, by calling the database interface to access the preset database, users can perform precise time-based queries, retrieve and reconstruct monitoring images at any historical moment or time period, and meet the printing requirements of historical data. In addition, the streaming media information generation based on media processing algorithms includes: obtaining nuclear power plant monitoring display page information within a preset time period from the preset database; reconstructing the layout and style of the nuclear power plant monitoring display page information and the effective template information based on predefined monitoring video templates, and saving the reconstructed data as static image files; combining multiple static image files arranged in chronological order into a video stream to obtain predefined streaming media information.

[0040] The three-level circular buffer is used to: call the encryption processing algorithm to encrypt the predefined streaming media information; store the encrypted streaming media information in a preset database and create an index and preview thumbnail; delete the encrypted streaming media information after storage is completed for subsequent storage operations.

[0041] In practical applications, the sizes of the three buffers can be set based on calculation and test results, while continuously monitoring the fill level of each buffer. The processing speed can be adjusted as needed to prevent buffer overflow or starvation and optimize system performance. Through the above three-level caching mechanism, this application can make fuller use of system resources, improve the efficiency of front-end interface capture and back-end data processing, and ensure the real-time performance and stability of the monitoring and printing system.

[0042] In the above processing, this application combines a double buffering mechanism with shared memory. The double buffering technology temporarily stores the captured content in the background buffer to avoid screen flickering and tearing. At the same time, it utilizes shared memory (such as the XShm extension) to achieve efficient data transfer, reduce copying overhead, improve rendering efficiency, reduce CPU usage, reduce system resource consumption, and improve overall performance.

[0043] In addition, to quantify the performance improvement brought about by the above optimizations, the following calculation model can be used: .

[0044] Among them, D full : Data size of a full-screen screenshot (in bytes); D delta The amount of data extracted from the changing region is usually much smaller than D. full ;T event_old : Average response time of event handling before improvement (in milliseconds); T event_new : Average response time for improved event handling; PI Improved performance 。

[0045] Step 102: Based on the collected requirements, retrieve the nuclear power monitoring display page information to be printed from the preset database, and perform static and dynamic file format generation and encryption processing to obtain the target print file; Specifically, the collected requirements include static file requirements and video file requirements. When the collected requirements are static file requirements, an image compression algorithm (such as JPEG 2000 or WebP and other advanced image compression algorithms) is called to compress the nuclear power monitoring display page information to be printed retrieved from the preset database to obtain compressed image data, thereby maintaining high image quality while significantly reducing file size (such as reducing the file size by an average of 50%-70%).

[0046] When the collected requirement is a video file requirement, the H.265 / HEVC video encoding standard is used to encode the nuclear power monitoring display page information to be printed retrieved from the preset database, and the encoded video data is obtained, thereby reducing the file size by an average of 40%-60% while ensuring video quality.

[0047] Combining a layered encryption strategy and the AES-256 encryption algorithm, the compressed image data or the encoded video data is encrypted to obtain the target print file. Specifically, in terms of encryption, the AES-256 encryption algorithm is used to fully encrypt the data, and a layered encryption strategy is adopted according to the importance of the data and access permissions. For example, stronger encryption strength is used for core monitoring data such as flowcharts, alarms, and fault diagnoses, with increased encryption rounds and complex key derivation functions; standard AES-256 encryption is used for ordinary information such as operation logs. Simultaneously, a secure channel is established between the data processing module and external systems via the SSL / TLS protocol to prevent data interception or tampering, ensuring data security during storage and transmission.

[0048] Step 103: The target print files are categorized and stored according to preset rules, and index information is generated and stored simultaneously to achieve efficient file management. In practical applications, this step includes the following processing flow: (1) Based on the attributes of the target print file (such as content, timestamp, device number and other metadata), automatically store it in the corresponding category directory in the file system.

[0049] (2) A hash algorithm is used to generate a unique identifier for the target print file, and the identifier is used as an index for the target print file and stored in a preset database for easy file management and retrieval.

[0050] (3) Import the target print file and its corresponding index into the Elasticsearch full-text search engine to achieve efficient indexing. When using the Elasticsearch full-text search engine to efficiently index files, optimization measures such as setting the number of index shards, the number of replicas, and caching common query conditions can be used to support fast retrieval based on various query conditions such as keywords, time range, and device type.

[0051] This application also enables preview functionality by generating thumbnails or keyframes for video files: First, the video file is opened using a video processing library to obtain its basic information, such as total duration and frame rate. Based on preview requirements, the key time points to be captured are calculated (e.g., for a 30-second video, one frame can be captured every 5 seconds); the video stream is decoded to the specified time point, and the image data at that moment is captured; the captured frames are scaled and adjusted to the size required for preview (e.g., 200). The image is compressed (150 pixels) while maintaining sufficient visual quality; all generated thumbnails are sorted chronologically and saved as a list. This list can then be used as a preview of the video file and saved along with the video file to the database for easy browsing. Furthermore, this application supports version control, using Git to record file modification history; and can periodically archive older files according to set policies, deleting data exceeding the retention period to free up storage space.

[0052] Step 104: Perform permission authentication on the accessing user and display the index information after successful authentication; wherein, the permission authentication on the accessing user includes: software-level permission verification and hardware-level permission verification.

[0053] Software-level permission verification includes: ensuring that only authorized users have access rights through multi-factor authentication and role-based access control; the multi-factor authentication includes password, fingerprint recognition or one-time verification code; the role-based access control refers to the role permissions of the accessing user, and assigns corresponding permission levels according to the responsibilities of different users. For example, administrators have the highest permissions and can perform system settings and data management; ordinary users are limited to viewing data within a specific scope.

[0054] Hardware-level access control includes: using a hardware dongle to authorize and verify user terminal devices, ensuring that only authorized devices can access encrypted data; and employing strict lifecycle management for encryption keys, using a hardware security module to generate, store, and manage encryption keys, and periodically rotating the encryption keys to verify user terminal devices, thereby reducing data security risks caused by key leakage.

[0055] Step 105: Based on the user's selection of index information, retrieve the corresponding target print file and allow its use after decryption.

[0056] This application, through the coordinated work of the above-mentioned multiple steps, comprehensively solves the problems existing in the nuclear power monitoring printing method in terms of printing content, output format, data security, and user operation, and realizes efficient, secure, and flexible printing and management of nuclear power monitoring information, meeting the diverse needs of safe operation and efficient management of nuclear power plants.

[0057] In one exemplary embodiment, this application includes the following data processing flow: (i) Processing of changing area data in nuclear power monitoring interface captured in step 101: The screen content is captured by FFmpeg and encoded into a video file. The specific steps include initializing the FFmpeg environment, capturing the screen content using the x11grab device, encoding the captured image into a video stream, and finally writing the encoded video into a file.

[0058] (1) Initialize the FFmpeg environment: When the program starts, it initializes the core components of FFmpeg, including allocating memory space for the encoder context so that it can hold the parameters and status information required for subsequent encoding operations. After the encoder context is allocated, the corresponding encoder is found and opened according to the required encoding format (such as H.264) to prepare for subsequent video encoding.

[0059] (2) Capturing Screen Content: In a Linux system environment, screen content is captured using the FFmpeg x11grab device. Before capturing, all devices must be registered to ensure that the system can recognize and use the x11grab device. After completing device registration, specify the relevant parameters of the X11 display server, such as ":0.0", to open the x11grab device. After successfully opening the device, apply the encoder context parameters to the stream encoder parameters of the format context and write them to the file header, laying the foundation for subsequent screen content capture and encoding.

[0060] (3) Encoding and writing to the video stream: A dedicated data structure (similar to the function of AVFrame) is allocated to the captured screen image to store information such as the width, height, and pixel format of the image, for example, the common YUV420P format. During the capture process, the captured screen content is continuously filled into the above data structure. Then the data structure is sent to the encoder for encoding, and the encoder will convert it into encoded data packets.

[0061] (4) After receiving the encoded data packet, if it is verified to be correct, write it to the output file. After writing, clean up the resources occupied by the data packet in a timely manner so that the next encoding and writing operation can be performed.

[0062] (5) Clean up resources: When the program finishes execution, all resources allocated during the process should be released, including encoder context, format context and data structures allocated for capturing screens, to prevent memory leaks and other problems.

[0063] (ii) The combined use of asynchronous event-driven model and buffer in step 101: Read monitoring data for a specific time period from the real-time historical database, call the preset template to reconstruct the historical monitoring screen group, and finally generate dynamic video files from these screen groups and save them to obtain streaming media information.

[0064] (1) Database historical data reading interface: A connection is established with a preset database using a dedicated database interface. During the connection process, the corresponding connection parameters need to be set according to the type of database (such as relational database, time series database, etc.). After the connection is established, the monitoring data within a specific time period is queried through database query statements (such as SQL queries) based on the timestamp specified by the user.

[0065] (2) Predefined surveillance video templates: These are used to define the layout and style of the video feed, supporting various element types such as text, numbers, and graphics. For example, a simple template specifies the width and height of the video feed, and details the type, position, font, color, and other attributes of each element. For instance, a text element can be defined, positioned in the upper left corner of the screen, with an Arial font size of 12 and a black color; a numerical element can be defined, positioned at a specific location on the screen, with an Arial font size of 14 and a red color.

[0066] (3) Screen Reconstruction: Select a suitable graphics library (such as Qt, SFML, etc.) and draw the screen according to the template definition. Taking Qt as an example, first create a blank image according to the width and height set by the template; use the drawing tools provided by the graphics library to draw background, text, numerical values, and other elements on the image according to the element definitions in the template. For example, draw text with timestamps at the corresponding positions of the text elements defined in the template; similarly, draw relevant numerical information according to the definition of numerical elements. After drawing, save the image as a static image file for later use in generating video streams.

[0067] (4) Video Stream Generation: This involves combining multiple static images arranged in chronological order into a video stream. Specifically, the video encoding parameters, such as resolution, frame rate, and bitrate, must be determined first. These parameters need to be set appropriately based on actual needs and application scenarios. Then, a professional video encoding library (such as FFmpeg or other similar libraries) is used to encode the static images frame by frame into a video file according to the set encoding parameters. Common output formats include MP4. During the encoding process, it is crucial to ensure the correct order of the images to accurately reflect the time sequence of the monitoring data.

[0068] (iii) Perform static and dynamic file format generation and encryption processing corresponding to step 102.

[0069] (iv) File storage and fast retrieval in accordance with step 103: The generated files are automatically named, then classified and stored in the database according to certain rules. Then, a full-text index is built to achieve fast retrieval, and thumbnails are generated for the files to facilitate user preview.

[0070] (1) Categorized storage and automatic naming: A hierarchical directory structure is built on the server side for categorized storage of files.

[0071] Specifically, the system categorizes information based on the content displayed on the nuclear power plant monitoring page, such as equipment operation monitoring, system status monitoring, and fault alarm records. Secondary categorization is then based on timestamps, for example, creating subdirectories by year and month. Further granular tertiary categorization is possible based on equipment number, monitoring area, and other information. During automatic naming, a unique and meaningful filename is generated by combining the file's creation time, monitoring content, and equipment-related information. For example, a filename could be "Equipment A_20240101_Temperature Monitoring Data," a naming method that facilitates intuitive understanding of the file content and aids in subsequent management and retrieval.

[0072] (2) Full-text search and preview: Use full-text search engines such as Elasticsearch to create indexes for stored files.

[0073] During index building, file metadata (such as filename, file type, timestamp, device ID, etc.) and file content are extracted (text files are extracted directly, and image files are extracted using OCR technology). This information is then segmented and stored in the Elasticsearch index. Index parameters are configured appropriately, such as setting suitable shard and replica counts, to optimize retrieval performance. Furthermore, a caching mechanism is implemented to cache frequently used query results, further improving retrieval efficiency.

[0074] For document files, appropriate conversion methods are used to generate preview content based on the file type. For example, for PDF files, the first few pages can be converted into image format; for video files, keyframes are extracted using video processing tools to generate thumbnails. This preview content is associated with the file's index information, allowing users to quickly preview the file's general content on the results page when performing a search.

[0075] Finally, corresponding to step 105, system access permissions were strictly limited through multi-factor authentication and role-based access control.

[0076] Based on the same inventive concept, this application also provides a system for implementing the methods described above. The solution provided by this system is similar to the solution described in the methods above; therefore, specific limitations in one or more system embodiments provided below can be found in the limitations of the methods described above, and will not be repeated here.

[0077] In one exemplary embodiment, this application provides a nuclear power plant monitoring printing system based on a virtual printer, comprising: The virtual printer module is used to capture dynamic changes in the nuclear power plant monitoring interface in real time based on real-time screenshot and event-driven technology. Combined with a ring-shaped buffer architecture, it performs multi-level processing on the dynamic changes to obtain nuclear power plant monitoring display page information in a preset template format, which is then stored in a preset database. This module can capture dynamic changes in the nuclear power plant monitoring interface in real time, supporting a "what you see is what you print" function; it can also access a real-time historical database, supporting the printing of monitoring images at any historical moment, or printing continuous monitoring images over a period of time.

[0078] The data processing module retrieves the nuclear power plant monitoring display page information to be printed from the preset database based on the collected requirements, and performs static and dynamic file format generation and encryption processing to obtain the target print file. This module can generate static files or video files in specified formats; and through multi-level encryption processing, it ensures data security and privacy.

[0079] The storage and retrieval module is used to classify and store the target print files according to preset rules, and simultaneously generate and store index information. Through this module, static or video files generated by the data processing module can be classified and stored according to preset rules, and fast retrieval and file preview functions are supported.

[0080] The access control module is used to authenticate accessing users and display the index information after successful authentication; based on the accessing user's selection of the index information, it retrieves the corresponding target print file and allows its use after decryption.

[0081] Compared with the prior art, this application has the following advantages: At the data acquisition and recording level, by registering various events such as mouse movements, clicks, and keyboard inputs on the monitoring interface, and utilizing the operating system's event queue, user operations are responded to and captured in real time, ensuring that all dynamic information related to user interaction is completely recorded. Simultaneously, it can capture screen changes with low latency and high frame rate, and completely record dynamic information such as user operations, solving the problem of static content in traditional printing. This allows nuclear power plant staff to obtain continuous and complete information when reviewing equipment operation, helping to more accurately analyze equipment status and determine the cause of malfunctions.

[0082] This application, through its pre-set database storage function, allows users to access monitoring footage from any historical moment or time period, greatly expanding the value of the data. Whether conducting long-term equipment performance analysis or reviewing specific historical events, staff can easily obtain the necessary data, providing a more comprehensive historical data basis for the operation and management of nuclear power plants.

[0083] This application's "what you see is what you print" and multi-format output functions meet diverse data recording needs in different scenarios. It supports multiple output formats such as JPEG, PNG, PDF, and CSV, enabling data to be quickly shared and displayed as images, or archived in a standardized document format. The dynamic printing function's scheduled printing and continuous printing provide flexible methods for data recording. Scheduled printing automatically records monitoring footage at set intervals, suitable for periodically archiving equipment operating status; continuous printing generates monitoring video at intervals within a specific time period, completely recording the continuous changes of the equipment during that time, which is very useful for analyzing the dynamic operation of the equipment.

[0084] This application provides a format conversion function that effectively reduces file size while ensuring data quality. This reduces storage space usage and facilitates data transmission and storage. In the context of nuclear power plants generating large amounts of monitoring data, this helps optimize data management, reduce storage costs, and improve data transmission efficiency, enabling staff to access the required data more quickly.

[0085] This application ensures data security and privacy through multi-layered encryption. In particular, the AES-256 encryption algorithm, combined with a layered encryption strategy, performs differentiated encryption based on data importance and access permissions, greatly improving data confidentiality. Even if data is attacked maliciously during storage or transmission, core data can be effectively protected. The secure channel established by the SSL / TLS protocol further prevents data interception or tampering, ensuring the integrity and availability of data during network transmission, thus building a solid defense for nuclear power plant data security.

[0086] This application provides categorized storage and automatic naming rules, making file management more organized and efficient. Files are categorized and stored based on metadata such as monitoring screen content, timestamps, and device numbers, and unique identifiers containing key information are generated for quick file location and management. Quick search and file preview functions further enhance the ease of data retrieval, especially by utilizing a full-text search engine and optimized indexing, supporting various query conditions to quickly and accurately find the required files. Thumbnail or keyframe preview functions for video files allow users to quickly understand the file content without downloading the entire file. This is particularly helpful when processing large numbers of video files, allowing users to quickly filter out target files and improve work efficiency.

[0087] This application also provides strong support for long-term data preservation and traceability through version control functionality. Recording the history of each file modification or update allows for reverting to a specific version when needed, which is crucial for data auditing, fault analysis, and compliance checks. Automatic archiving and cleanup strategies ensure long-term data availability while rationally freeing up storage space and optimizing storage resource utilization.

[0088] This application enhances the reliability of user authentication through multi-factor authentication, preventing unauthorized users from cracking accounts using a single factor. Furthermore, security is further strengthened through device authorization and encryption key management. By recording and verifying terminal device information, only authorized devices are allowed to access encrypted data, preventing unauthorized access. The hardware authorization method, combined with a hardware security module, manages encryption keys throughout their entire lifecycle and rotates keys periodically, effectively reducing data security risks caused by key leaks and ensuring data security throughout its entire lifecycle.

[0089] In summary, this application, through collaborative innovation of various modules, comprehensively improves the efficiency, flexibility, and data security of nuclear power plant monitoring printing, providing strong data support and assurance for the safe and stable operation of nuclear power plants, and has significant economic and safety benefits.

[0090] In one exemplary embodiment, a computer device is also provided, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the above-described method embodiments.

[0091] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0092] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0093] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0094] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0095] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0096] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0097] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for printing a nuclear power plant monitoring based on a virtual printer, characterized in that, The method comprises: Based on real-time screenshot and event-driven technology, real-time capture of dynamic change information in the nuclear power monitoring interface, and combined with the ring buffer architecture, the dynamic change information is processed in multiple stages to obtain the nuclear power monitoring display page information in the preset template format, and then stored in the preset database; According to the collected requirements, the nuclear power monitoring display page information to be printed is retrieved from the preset database, and static and dynamic file format generation and encryption processing are performed to obtain the target printing file; According to the preset rule, the target printing file is classified and stored, and index information is generated and stored; For access users, permission authentication is performed, and the index information is displayed after the permission authentication is passed; According to the selection of the index information by the access user, the corresponding target printing file is retrieved, and after decryption, the use is allowed.

2. The virtual printer based nuclear power monitoring print method of claim 1, wherein, Based on real-time screenshot and event-driven technology, real-time capture of dynamic change information in the nuclear power monitoring interface, and combined with the ring buffer architecture, the dynamic change information is processed in multiple stages to obtain the nuclear power monitoring display page information in the preset template format, and then stored in the preset database, comprising: Based on Xlib core library, using XFixes interface extension to capture the dynamic area data in the nuclear power monitoring interface; Using XShm extension, mapping the shared memory area through shmat to serve as a buffer; Using an asynchronous event-driven model to respond to changes in real time, the captured dynamic area data is transmitted to the buffer; In the buffer, based on the ring buffer pool architecture, the dynamic area data is processed through hierarchical processing to generate effective template information based on image processing algorithms, generate stream media information based on media processing algorithms, and encryption processing, and then stored in the preset database.

3. The virtual printer based nuclear power monitoring print method of claim 2, wherein, In the buffer, based on the ring buffer pool architecture, three levels of ring buffers are set up; Among them, the first level of ring buffer is used to: receive and store the dynamic area data; call the image processing algorithm to read the effective information in the dynamic area data; call the printing template from the preset database, and write the effective information into the printing template to obtain the effective template information; cache the effective template information to the second level of ring buffer, and delete the effective template information after the caching is completed; The second level of ring buffer is used to: temporarily store after filtering or formatting processing of the effective template information; call the media processing algorithm to read the effective template information, call the nuclear power monitoring display page information from the preset database to generate predefined stream media information; cache the predefined stream media information to the third level of ring buffer, and delete the predefined stream media information after the caching is completed; The third level of ring buffer is used to: call the encryption processing algorithm to perform data encryption processing on the predefined stream media information; store the stream media information after data encryption to the preset database and establish index and preview thumbnail, and delete the stream media information after data encryption after the storage is completed.

4. The virtual printer based nuclear power monitoring print method of claim 1, wherein, The collected requirements include static file requirements and video file requirements; Retrieving the nuclear power monitoring display page information to be printed from the preset database, and performing static and dynamic file format generation and encryption processing to obtain a target print file, including: When the collected requirement is a static file requirement, an image compression algorithm is called to perform image compression processing on the nuclear power monitoring display page information to be printed retrieved from the preset database to obtain compressed image data; When the collected requirement is a video file requirement, an H.265 / HEVC video encoding standard is used to perform encoding processing on the nuclear power monitoring display page information to be printed retrieved from the preset database to obtain encoded video data; In combination with a layered encryption strategy and an AES-256 encryption algorithm, the compressed image data or the encoded video data is encrypted to obtain the target print file.

5. The virtual printer based nuclear power monitoring print method of claim 1, wherein, The target print file is stored according to a preset rule, and index information is generated and stored, including: According to the attributes of the target print file, the target print file is automatically stored in a corresponding classified directory in a file system; A hash algorithm is used to generate a unique identifier for the target print file, and the identifier is used as the index of the target print file and stored in a preset database; The target print file and the corresponding index are imported into an Elasticsearch full-text retrieval engine to achieve efficient indexing.

6. The virtual printer based nuclear power monitoring print method of claim 1, wherein, The permission authentication for an access user includes software layer permission verification and hardware layer permission verification; The software layer permission verification includes ensuring that only authorized users have access rights through multi-factor authentication and role-based access control; the multi-factor authentication includes a password, fingerprint recognition, or a one-time password; and the role-based access control refers to the role permissions of the access user; The hardware layer permission verification includes using a hardware dongle to authorize and verify the user terminal device; a hardware security module is used to generate, store, and manage encryption keys, and the encryption keys are periodically rotated to verify the user terminal device through the encryption keys.

7. The virtual printer based nuclear power monitoring print method of claim 2, wherein, Based on the Xlib core library, the XFixes interface extension is used to capture the changed area data in the nuclear power monitoring interface, including: FFmpeg is initialized, memory is allocated for the encoder context, and the corresponding encoder is opened; In a Linux system environment, the x11grab device of FFmpeg is opened, the XFixesGetCursorImage interface is used to capture the cursor position, the XGetImage interface is used to capture the window content, and the XDamage interface extension is used to monitor the area changes in the nuclear power monitoring interface to capture the changed area data; The changed area data is filled into a preset data structure, and then encoded by the encoder to obtain a video stream data packet; The video stream data packet is verified, and after verification, the video stream data packet is written into an output file.

8. The virtual printer based nuclear power monitoring print method of claim 2, wherein, Based on the media processing algorithm, the stream media information is generated, including: Nuclear power monitoring display page information in a preset time period is obtained from the preset database; Reconstruct the layout and style of the nuclear power monitoring display page information and the effective template information based on a predefined monitoring video template, and save the reconstructed data as a static picture file; Combine multiple static picture files arranged in time sequence into a video stream to obtain predefined streaming media information.

9. A virtual printer based nuclear power monitoring print system, characterized by, The system comprises: A virtual printer module configured to capture dynamic change information in a nuclear power monitoring interface in real time based on real-time screen capture and event-driven technology, and to obtain nuclear power monitoring display page information in a preset template format by performing multi-level processing on the dynamic change information in combination with a ring buffer architecture, and then store the information in a preset database; A data processing module configured to retrieve nuclear power monitoring display page information to be printed from the preset database according to collected requirements, and to generate and encrypt target print files in static and dynamic file formats; A storage and retrieval module configured to store the target print files according to a preset rule, and to generate and store index information; A permission management module configured to perform permission authentication on an access user, and to display the index information after the permission authentication is passed, to retrieve corresponding target print files according to a selection of the index information by the access user, and to allow use of the target print files after decryption.

10. A computer device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program to implement the nuclear power monitoring printing method based on a virtual printer according to any one of claims 1-8.