A real-time dynamic monitoring and interactive system for power automation terminal equipment

By leveraging the AMP architecture with its multi-core heterogeneous processing capabilities and efficient inter-core communication technology, the problem of real-time monitoring and remote updating of power automation terminal equipment has been solved. This enables real-time status display and efficient graphical interaction of the equipment, thereby enhancing its intelligent management and emergency response capabilities.

CN121727231BActive Publication Date: 2026-07-17ZHUHAI FEISEN POWER TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI FEISEN POWER TECH CO LTD
Filing Date
2026-02-12
Publication Date
2026-07-17

Smart Images

  • Figure CN121727231B_ABST
    Figure CN121727231B_ABST
Patent Text Reader

Abstract

This invention provides a real-time dynamic monitoring and interaction system for power automation terminal equipment, including a main control module, a real-time data display module, a graphics display module, a log recording module, a voice broadcast module, and a remote update module. The main control module adopts an AMP architecture with multi-core heterogeneous processing capabilities. The graphics display module is compatible with both the Android graphics system and the QT framework, achieving unified scheduling of the dual-system graphics interfaces through a hardware abstraction layer. Specifically, in the Linux system environment, a local QT interface is built based on the QT framework, and hardware acceleration is used to render the data processed by the main control module in real time as dynamic waveforms, status tables, and parameter setting interfaces. The Linux system uploads the processed data to the Android graphics system for secondary rendering. This invention can realize real-time status monitoring, data display, fault diagnosis, remote application and system updates, and efficient graphical interaction for power automation terminal equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power automation technology, specifically to a real-time dynamic monitoring and interaction system for power automation terminal equipment. Utilizing advanced hardware architecture and software technology, it realizes functions such as real-time status display, fault diagnosis, remote updates, and efficient graphical interaction for power automation terminal equipment. It is applicable to power supply systems such as large-scale power grid security and defense systems and intelligent dispatching systems. Background Technology

[0002] In the existing power automation terminal system equipment monitoring and setup, it is common to connect external computer equipment through network port or serial port, and use distribution automation terminal maintenance tool software to realize parameter configuration, status detection, testing and debugging, and data analysis.

[0003] However, this approach has many limitations. With the adoption of multi-core CPUs in power automation terminals and the continuous expansion of their functions, it has become possible to achieve parameter setting and data analysis using the CPU's own system functions.

[0004] Meanwhile, the development of graphical display interfaces has enabled products to have real-time monitoring and display capabilities, facilitating on-site personnel to observe and analyze the equipment. However, when upgrading the equipment application or the entire system software, it is still necessary to send personnel to the site to upgrade via computer connection to the equipment network, which consumes a lot of manpower and resources.

[0005] Therefore, developing a power automation terminal equipment system that can achieve real-time monitoring, dynamic data interaction, and remote updates is of great practical significance. Summary of the Invention

[0006] To address the various problems existing in current technologies, this invention provides a real-time dynamic monitoring and interactive system for power automation terminal equipment. The system aims to achieve real-time status monitoring, data display, fault diagnosis, remote application and system updates, and efficient graphical interaction for power automation terminal equipment. Through innovative hardware architecture and software design, this system fully utilizes CPU resources and combines multiple operating systems and graphics display technologies to provide an efficient, convenient, and intelligent solution for the field of power automation.

[0007] The present invention achieves the above objectives through the following technical solutions:

[0008] A real-time dynamic monitoring and interaction system for power automation terminal equipment, characterized in that it includes:

[0009] Main control module: It adopts the AMP architecture with multi-core heterogeneous processing capability. The AMP architecture includes a first CPU core unit running on Linux system and a second CPU core unit running on RTOS system. The first CPU core unit and the second CPU core unit achieve efficient inter-core communication through the rpmsg communication protocol.

[0010] Real-time data display module: Integrated into the main control module or connected to an external display device via a high-definition interface, used to display monitoring data of power automation equipment in real time;

[0011] The graphics display module is compatible with both the Android graphics system and the QT framework. It achieves unified scheduling of the dual-system graphics interfaces through a hardware abstraction layer. In the Linux system environment, a local graphics QT interface is built based on the QT framework. Through hardware acceleration, the data processed by the main control module is drawn in real time as dynamic waveforms, status tables, and parameter setting interfaces, and directly output to the local display screen. The Linux system uploads the processed data to the Android graphics system for secondary rendering.

[0012] Log recording module: Integrates Android or HarmonyOS system logging functions to record the running logs of the main control module and all related tasks;

[0013] Voice broadcast module: Connects a microphone and speaker via an I2S voice interface to record and play voice messages; or integrates voice playback software to convert text information into voice for broadcast.

[0014] According to the present invention, a real-time dynamic monitoring and interaction system for power automation terminal equipment is provided. The AMP architecture uses the RK3568 chip. A low-latency inter-core communication channel is constructed based on the Mailbox hardware module of the RK3568 chip and a shared memory pool, wherein:

[0015] The Mailbox module is used to transmit control commands;

[0016] The shared memory pool is divided into a ring buffer structure to store the original AD values ​​and the converted voltage / current data;

[0017] By employing the rpmsg virtual bus protocol, lightweight driver layers are deployed on both the RTOS and Linux sides to achieve the following:

[0018] Dynamic endpoint registration: RTOS-side and Linux-side applications create / destroy rpmsg communication endpoints to support multi-task parallel data transmission;

[0019] Packet verification mechanism: Embed a CRC check field in the header of each rpmsg packet.

[0020] According to the present invention, a real-time dynamic monitoring and interaction system for power automation terminal equipment is provided. When performing efficient inter-core communication, the second CPU core unit continuously acquires the original analog signal of the power equipment through the hardware ADC module at a preset sampling rate and converts it into a digital quantity, namely the AD value.

[0021] Perform preprocessing operations on the collected AD values:

[0022] Digital filtering: A moving average filtering algorithm is used to eliminate high-frequency noise;

[0023] Calibration compensation: The AD value is linearly corrected according to the pre-calibrated gain / offset coefficients to eliminate hardware errors;

[0024] The preprocessed AD values ​​are encapsulated into rpmsg data packets of fixed length. The packet header includes at least: timestamp: recording the absolute time of data acquisition; channel identifier: distinguishing multiple ADC acquisition channels; data length: indicating the number of valid AD values ​​in the current packet.

[0025] In this process, the RTOS side sends a data ready interrupt to the Linux side through the Mailbox module, and the Linux side responds to the interrupt and reads the rpmsg data packet from the shared memory pool.

[0026] The Linux side assigns the highest real-time priority to the rpmsg interrupt service routine; when the remaining space in the shared memory pool is lower than the threshold, the RTOS side suspends data transmission and triggers a flow control interrupt; if the Linux side does not respond to the interrupt within the timeout period, the RTOS side automatically retransmits the three most recent data packets and alarms through the voice broadcast module.

[0027] According to the real-time dynamic monitoring and interaction system for power automation terminal equipment provided by the present invention, the Linux side application receives interrupt notifications through the rpmsg driver layer, reads the rpmsg data packets sent by the RTOS side from the circular buffer of the shared memory pool, and performs the following conversion on the AD value of the rpmsg data packets:

[0028] According to the formula Calculate the actual voltage value, where, The reference voltage for the ADC is n, the number of bits in the ADC is K, the gain coefficient is B, and the offset coefficient is B. The RMS algorithm is used to calculate the effective values ​​of voltage and current for AC signals, and real-time waveform display and over-limit alarm are supported.

[0029] The calculated voltage / current values ​​are processed as follows:

[0030] Real-time data is written to the shared memory area for use by the QT graphics display module;

[0031] Data is periodically appended to the SQLite database, supporting historical data queries and fault rollback;

[0032] Data is sent to the Android graphics system via the IPC mechanism to enhance graphics rendering or cloud platform synchronization.

[0033] According to the real-time dynamic monitoring and interaction system for power automation terminal equipment provided by the present invention, the graphics display module adopts the following optimization strategies in both the QT framework and the Android graphics system, taking into account the high-frequency sampling characteristics of power data:

[0034] Data block transmission: Based on the time-series characteristics of power data, continuous sampling data is divided into independent data blocks according to time windows; during cross-system data transmission, a unified storage area is allocated to the data blocks through a shared memory pool; at the same time, zero-copy technology is used to achieve efficient data transmission through direct memory access.

[0035] Asynchronous rendering scheduling: In the QT graphics display environment, a data calculation thread and a graphics rendering thread are created. The data calculation thread is used to read data blocks from shared memory and perform preprocessing and calculation operations. The graphics rendering thread is used to draw the calculation results as dynamic graphical interface elements. In the Android graphics system, the SurfaceFlinger compositor is used to asynchronously process the generation and submission of graphics frames. The SurfaceFlinger compositor is used to asynchronously process the generation and submission of graphics frames, synthesize and optimize the generated graphics frame data, and then output the final graphics display to the screen.

[0036] Anti-aliasing and dynamic scaling: During the graphics rendering process, a bilinear interpolation anti-aliasing algorithm is used to smooth the waveform to address the edge jaggedness problem, and users can perform real-time scaling operations on the waveform. During scaling, the graphics display module dynamically adjusts the display details of the waveform according to the scaling ratio. At the same time, in combination with the needs of power grid fault recording analysis, scaling waveform data annotation and analysis functions are provided.

[0037] According to the present invention, a real-time dynamic monitoring and interactive system for power automation terminal equipment adopts an intelligent collaborative display mechanism in its graphics display module to achieve collaboration and complementarity between the QT interface and Android display content, including the following steps:

[0038] In the system configuration interface, when the user selects the local QT display only mode, the graphics display module will only transmit data to the QT interface for display, stopping the data upload process to the Android graphics system. If the user selects the synchronous upload to Android remote monitoring mode, the system will start the data upload mechanism, sending the processed data to both the QT interface and the Android graphics system simultaneously, achieving synchronous monitoring between local and remote systems. Specifically, the graphics display module monitors the running status of the Android graphics system in real time; and obtains the graphics rendering load information of the Android graphics system through the system's underlying interface to determine whether to start the enhanced graphics rendering task.

[0039] When the Android graphics system detects that it has started an enhanced graphics rendering task, the system automatically triggers a dynamic hardware resource allocation mechanism; according to preset priority rules, the refresh rate or resolution of the QT interface is appropriately reduced to free up some hardware resources; when the enhanced graphics rendering task of the Android graphics system ends, the system automatically restores the normal refresh rate and resolution settings of the QT interface.

[0040] A real-time dynamic monitoring and interaction system for power automation terminal equipment provided by the present invention further includes:

[0041] The remote update module supports FTP protocol and other network transmission protocols, and automatically negotiates protocols and configures parameters when establishing a connection with the remote update server.

[0042] During the network connection establishment process, two-way authentication is performed on the remote update server and the power automation terminal equipment; for system upgrade scenarios, the remote update module has the function of creating differential packages, which extracts the modified data by comparing the differences between the old and new versions of system files, and packages them into differential packages according to the differential algorithm;

[0043] After the terminal device receives the differential packet, the remote update module first verifies the validity of the differential packet; after the verification is successful, according to the restore instruction in the differential packet, the differential data is merged and updated with the original system files on the device, and only the modified parts are replaced or supplemented.

[0044] The remote update module periodically or according to user instructions sends query requests to the remote update server to obtain the latest version information of the application; at the same time, it detects and compares the version of the locally installed application to determine whether there is an updatable version.

[0045] According to the present invention, a real-time dynamic monitoring and interaction system for power automation terminal equipment is provided. In Android graphical system programming, an XML layout file is used to define the user interface layout requirements of the application. String resources are stored in the strings.xml file under the res / values ​​directory; color resources are defined in the colors.xml file under the res / values ​​directory; and size resources are stored in the dimens.xml file under the res / values ​​directory. Among them, the AndroidManifest.xml XML configuration file serves as the entry point for the Android application. In the file, the components included in the application and the required key information are explicitly declared.

[0046] In Java code, various resources defined in XML files are dynamically loaded and called through the resource access interface provided by the Android graphics system. This includes at least getting string resources defined in strings.xml through the getString() method, color resources defined in colors.xml through the getColor() method, and size resources defined in dimensions.xml through the getDimension() method.

[0047] In the XML layout file, ConstraintLayout is used instead of multi-level nested linear layouts to improve interface rendering efficiency; at the same time, by setting the visibility attributes and layout parameters of view components, the interface can be dynamically adjusted and optimized for display.

[0048] According to the present invention, a real-time dynamic monitoring and interaction system for power automation terminal equipment is provided. The RK3568 chip has an I2S voice interface for connection and interaction with the power management chip. The power management chip has built-in audio processing function. It can connect an external microphone through the provided MIC1_INP and MIC1_INN interfaces for on-site voice recording; and connect an external speaker through the SPKP_OUT and SPKN_OUT interfaces to realize the voice playback function.

[0049] In the Android operating system environment, an integrated software voice playback module is used. The background system sends the text information that needs to be notified to the power terminal equipment. After receiving the text information, the software system on the power terminal equipment calls the voice playback module to convert the text into a voice signal and drives the external speaker to play the voice through the RK809 power management chip.

[0050] To address the notification needs of multiple power station terminal nodes in the power industry, when there is an important notification or alarm, the backend system will send the notification text to multiple power station terminal nodes via UDP protocol; after receiving the text information, each terminal node will automatically convert the text to speech and play it, realizing the function of simultaneously sending voice notifications to multiple stations.

[0051] According to the present invention, a real-time dynamic monitoring and interaction system for power automation terminal equipment is provided. An interface abstraction module is set in the hardware abstraction layer to analyze the graphical interface characteristics of Android graphics system and QT framework, and extract the common functions and differences between the two. For common functions, a unified abstract interface standard is defined, including at least a graphics drawing interface and a display control interface. For differences, an adaptation layer or conditional compilation method is used to ensure that the abstract interface can be compatible with two different graphics systems.

[0052] A hardware interaction module is constructed to communicate directly with the underlying graphics display hardware. The hardware interaction module converts the operation instructions of the abstract interface into control signals that the hardware can recognize. At the same time, the hardware interaction module monitors the hardware status information in real time and feeds this information back to the interface abstract module, providing hardware-level data support for the graphics scheduling of the upper-layer system.

[0053] A scheduling strategy management module is set up in the hardware abstraction layer to formulate a graphical interface scheduling strategy based on the system's running status and user needs. This includes prioritizing the scheduling of the QT framework for basic graphical interface display during the initial system startup phase, and allocating graphical resources according to the application type and priority during the Android application running phase, and dynamically switching the scheduling of the Android graphics system and the QT framework graphical interface.

[0054] Design a task queue management module to uniformly manage and queue graphics tasks from the Android graphics system and QT framework, as well as to distribute and synchronize tasks;

[0055] The hardware abstraction layer interacts with the Android graphics system and QT framework through a predefined unified interface. The upper-layer system only needs to call the unified abstraction interface standard to complete graphics-related operations. When the upper-layer system initiates a graphics operation request, the hardware abstraction layer converts the request into corresponding hardware control instructions according to the graphics interface scheduling strategy and task queue status, and sends them to the hardware interaction module for processing.

[0056] Therefore, compared with the prior art, the real-time dynamic monitoring and interaction system for power automation terminal equipment proposed in this invention has the following specific advantages:

[0057] 1. The system of this invention has a real-time online display function, which can accurately and timely reflect the real-time working status of power automation equipment. Through an intuitive interface, staff can obtain various key parameters of the equipment at any time, such as remote signaling input status, remote control output status, and real-time values ​​of telemetry voltage or current, enabling staff to grasp the dynamic operation of the equipment in a timely manner, promptly identify potential problems, and avoid the expansion of equipment failures or production interruptions due to information lag.

[0058] 2. This invention uses tables and graphs to present complex equipment operating data in an intuitive way. For example, the voltage or current waveforms collected during waveform recording can be clearly displayed on the screen, allowing staff to quickly determine whether the equipment is operating normally without complex data analysis. This intuitive display method greatly improves the efficiency of staff in observing and analyzing equipment status, especially for non-technical personnel, making it easier to understand and grasp the equipment's operating conditions.

[0059] 3. During equipment development and initial debugging, the system can display the status information of each port of the equipment in real time. Staff can compare the actual status with preset parameters to quickly identify hardware and software errors. For example, by checking the status of remote signaling inputs and remote control outputs, it is possible to promptly determine whether signal transmission is normal; analyzing telemetry voltage or current values ​​can check the accuracy of data acquisition. This efficient troubleshooting method greatly shortens the equipment debugging cycle and improves development efficiency.

[0060] 4. During the trial and formal operation phases of the equipment, the system can monitor the equipment's operating status in real time and record detailed log information. When a fault occurs, staff can quickly locate the time, location, and cause of the fault by reviewing the log files. For example, the Android system's logging function provides text records of all CPU tasks, essentially adding an event tracker to the system. Staff can use the error information in the logs to conduct targeted troubleshooting and repairs, reducing equipment downtime and ensuring production continuity.

[0061] 5. The system of this invention adopts a graphical user interface, which partially replaces the work of traditional maintenance software tools. Operators do not need to master complex software operation commands; they can complete tasks such as parameter setting, status monitoring, and testing and debugging of equipment through simple mouse clicks and menu selections. This reduces the technical skill requirements for operators, decreases training costs and time, and improves work efficiency.

[0062] 6. The system has the capability for remote application and system online updates, upgrading the system and applications by creating differential packages. When equipment needs to be upgraded, there is no need to send personnel to the site for operation; simply place the upgrade file on the server, and the equipment will automatically download and complete the update via the network, greatly saving manpower and material costs, reducing equipment downtime caused by on-site upgrades, and improving equipment maintainability and availability.

[0063] 7. With the continuous enhancement of CPU capabilities and the improvement of NPU computing power, the system can incorporate AI big data models to enhance its real-time processing and analysis functions. AI big data models can perform in-depth analysis and mining of equipment operating data, discovering potential operating patterns and problem trends. For example, by analyzing historical data, potential equipment failures can be predicted, allowing for preventative measures to be taken in advance, thus avoiding equipment failures and improving system reliability and stability. This provides strong support for the intelligent management of power automation equipment.

[0064] 8. By continuously collecting and analyzing equipment operation data, the system of this invention can continuously optimize its algorithms and models. For example, it can adjust the parameters of the AI ​​big data model based on actual operating conditions to improve the accuracy of fault prediction; and optimize the graphics display algorithm to improve display effects and response speed. This continuous optimization mechanism enables the system to adapt to different working environments and equipment requirements, continuously improving system performance and user experience.

[0065] 9. The system of this invention has a voice broadcast function, which can quickly send notifications or emergency events to the site via the network and promptly notify relevant personnel through the on-site voice playback function. For example, in the event of emergencies such as natural disasters or equipment failures, staff can send voice notifications through the system to quickly convey emergency handling instructions, improve emergency response speed, avoid problems caused by poor communication or untimely information transmission, and enhance communication capabilities with the site.

[0066] 10. The voice broadcast function, combined with real-time monitoring and fault diagnosis capabilities, enables staff to quickly check equipment operating status, locate fault points, and take appropriate measures after receiving emergency notifications. For example, in the event of equipment failure, staff can understand the fault situation through voice notifications, view real-time system data and log information, quickly determine the cause of the fault, and perform repairs, improving the efficiency of emergency response and reducing accident losses.

[0067] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0068] Figure 1This is a schematic diagram of an embodiment of a real-time dynamic monitoring and interaction system for power automation terminal equipment according to the present invention.

[0069] Figure 2 This is a schematic diagram illustrating the application principle of the RK3568 chip in an embodiment of a real-time dynamic monitoring and interaction system for a power automation terminal device according to the present invention.

[0070] Figure 3 This is a flowchart illustrating the transmission process of remote signaling input, remote control output parameters, or AD data in a real-time dynamic monitoring and interaction system embodiment of a power automation terminal device according to the present invention.

[0071] Figure 4 This is a flowchart illustrating the optimization strategy for power data in the QT framework and Android path of the graphics display module in an embodiment of the real-time dynamic monitoring and interaction system of a power automation terminal device according to the present invention.

[0072] Figure 5 This is a flowchart illustrating how the graphical display module employs an intelligent collaborative display mechanism to achieve collaboration and complementarity between the QT interface and Android display content in an embodiment of a real-time dynamic monitoring and interactive system for a power automation terminal device according to the present invention.

[0073] Figure 6 This is a circuit diagram of the built-in audio processing function of the RK809 power management chip in an embodiment of a real-time dynamic monitoring and interactive system for a power automation terminal device according to the present invention. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0075] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0076] See Figures 1 to 6 This embodiment provides a real-time dynamic monitoring and interaction system for power automation terminal equipment, including:

[0077] Main control module: It adopts the AMP architecture with multi-core heterogeneous processing capability. The AMP architecture includes a first CPU core unit running on Linux system and a second CPU core unit running on RTOS system. The first CPU core unit and the second CPU core unit achieve efficient inter-core communication through the rpmsg communication protocol.

[0078] Real-time display module: Integrated into the main control module or connected to an external display device via a high-definition interface, used to display the monitoring data of power automation equipment in real time. The monitoring data includes at least the remote signaling input status, remote control output status, real-time values ​​and calculation coefficients of telemetry voltage or current, waveform recording, setting parameters, motherboard and CPU temperature, and network port and serial port data logs.

[0079] The graphics display module is compatible with both the Android graphics system and the QT framework. It achieves unified scheduling of the dual-system graphics interfaces through the Hardware Abstraction Layer (HAL). In the Linux system environment, a local graphical interface is built based on the QT framework. Hardware acceleration is used to render the data processed by the main control module in real time as dynamic waveforms, status tables, and parameter setting interfaces, which are then directly output to the local display screen. On the Linux side, the processed data is uploaded to the Android graphics system via inter-process communication (IPC). The Android graphics system calls the OpenGL ES graphics library for secondary rendering to achieve high-precision waveform display, historical data playback, multi-device data synchronization, and interactive operation interfaces.

[0080] Log recording module: Integrates Android or HarmonyOS system log functions to record the operation logs of the main control module and all related tasks, facilitating post-failure analysis of the cause of failure;

[0081] Voice broadcast module: Connects a microphone and speaker via an I2S voice interface to record and play voice messages; or integrates voice playback software to convert text information into voice for broadcast.

[0082] In this embodiment, the AMP architecture uses the RK3568 chip. A low-latency inter-core communication channel is constructed between the Mailbox hardware module based on the RK3568 chip and the shared memory pool, wherein:

[0083] The Mailbox module is used to transmit control commands, such as data ready notifications and interrupt triggers;

[0084] The shared memory pool is divided into a circular buffer structure to store the original AD values ​​and the converted voltage / current data, avoiding the performance overhead caused by frequent memory allocation;

[0085] By employing the rpmsg virtual bus protocol, lightweight driver layers are deployed on both the RTOS and Linux sides to achieve the following:

[0086] Dynamic endpoint registration: RTOS and Linux side applications can create / destroy rpmsg communication endpoints on demand, supporting multi-task parallel data transmission;

[0087] Packet verification mechanism: A CRC check field is embedded in the header of each rpmsg packet to ensure the integrity of data transmission.

[0088] When performing efficient inter-core communication, the second CPU core unit (RTOS) continuously acquires the original analog signals of the power equipment through the hardware ADC module at a preset sampling rate (such as 10kHz) and converts them into digital quantities, i.e., AD values.

[0089] Perform preprocessing operations on the collected AD values:

[0090] Digital filtering: A moving average filtering algorithm is used to eliminate high-frequency noise;

[0091] Calibration compensation: The AD value is linearly corrected according to the pre-calibrated gain / offset coefficients to eliminate hardware errors.

[0092] The preprocessed AD values ​​are encapsulated into rpmsg data packets of a fixed length (e.g., 512 bytes / packet). The packet header includes:

[0093] Timestamp: Records the absolute time of data acquisition; Channel identifier: Distinguishes between multiple ADC acquisition channels, such as three-phase voltages Ua, Ub, and Uc; Data length: Indicates the number of valid AD values ​​in the current packet.

[0094] The RTOS side sends a data ready interrupt to the Linux side via the Mailbox module. After responding to the interrupt, the Linux side reads the rpmsg data packet from the shared memory pool.

[0095] Linux-side applications receive interrupt notifications through the rpmsg driver layer, read rpmsg data packets sent by the RTOS from the circular buffer of the shared memory pool, and perform the following transformations on the AD values:

[0096] According to the formula Calculate the actual voltage value, where, Where is the ADC reference voltage, n is the number of bits in the ADC, K is the gain coefficient, and B is the offset coefficient;

[0097] The RMS algorithm is used to calculate the effective values ​​of voltage / current for AC signals, and real-time waveform display and over-limit alarm are supported.

[0098] The calculated voltage / current values ​​are processed as follows:

[0099] Local storage: Real-time data area written to shared memory for use by the QT graphics display module;

[0100] Historical archiving: Appends data to the SQLite database periodically (e.g., every 1 second), supporting historical data querying and fault rollback;

[0101] Upload from upper-layer system: Data is sent to the Android graphics system via the IPC mechanism to enhance graphics rendering or for synchronization with the cloud platform.

[0102] On the Linux side, the rpmsg interrupt service routine (ISR) is assigned the highest real-time priority, such as RT priority 99, to ensure data reception latency ≤100μs. When the remaining space in the shared memory pool falls below a threshold (e.g., 20%), the RTOS side suspends data transmission and triggers a flow control interrupt to prevent data overwriting and loss. If the Linux side does not respond to the interrupt within the timeout period (e.g., 5ms), the RTOS side automatically retransmits the three most recent data packets and issues an alarm via the voice broadcast module.

[0103] Specifically, the RK3568 chip provided in this embodiment supports an AMP hybrid architecture design combining Linux (Kernel-4.19.232), Baremetal (HAL), and RTOS (RT-Thread), enabling the CPU Cortex-A55 core to run different systems and meet the needs of applications such as the power Internet of Things, power grid relay protection, power system security control, and industrial automation. The RK3568 has four CPU cores: CPU0, CPU1, CPU2, and CPU3. The RTOS can be arranged to run on CPU3 to perform signal processing with high real-time requirements, such as telemetry (ADC data acquisition), remote signaling (switching input signals), and remote control (controlling signals such as relays and switches).

[0104] In this embodiment, CPU0, CPU1, and CPU2 cores run on a Linux system, while CPU3 core (running the RT-Thread (RTOS) program) sends AD data to the Linux application via rpmsg. The Linux application receives the AD data sent by RT-Thread (RTOS) via rpmsg, converts the data into voltage values, and then displays the waveform on the screen through the QT framework, or uploads the data to the Android system, which is a higher layer of Linux, to display the ADC sine wave waveform through Android's more powerful graphics display function.

[0105] This embodiment combines an AMP hybrid architecture design, fully utilizing the CPU system's resources and integrating RT-Thread, Linux, and Android software architectures to realize the remote control functions (remote monitoring, remote telemetry, and remote operation) of power system substation terminal control equipment. It also incorporates QT functionality under Linux or an Android system to achieve multi-channel real-time ADC waveform display, realizing an innovative application of real-time monitoring, waveform display, and data presentation completed by a single CPU system. Therefore, this invention, through hardware-accelerated communication, lightweight protocol design, and end-to-end real-time assurance, achieves efficient and reliable data interaction between the RTOS and Linux systems in power automation equipment, meeting the stringent requirements for data throughput, transmission latency, and system stability in scenarios such as power grid relay protection and the power Internet of Things.

[0106] In this embodiment, the remote control output can be implemented using CPU3 (RT_thread) or CPU0~CPU2 (linux), depending on the real-time requirements, and can be flexibly configured.

[0107] like Figure 3 As shown, when the system starts, it first initializes and configures the rpmsg endpoint to establish a communication protocol between the RTOS system and the Linux system, ensuring the stability and efficiency of subsequent data transmission. After initialization, the rpmsg endpoint is opened to prepare for data transmission and reception.

[0108] When it is necessary to transmit remote signaling input, remote control output parameters or AD data, a parameter data packet is constructed on the RTOS side. This data packet is designed according to the specific data type and transmission requirements, including necessary data identifiers, timestamps and other information to ensure the accuracy and identifiability of the data.

[0109] The constructed data packet is sent to CPU core 3 via rpmsg, and then further processing is performed according to the data type and target:

[0110] For remote control output data, it is sent to the CPU port corresponding to the remote control to achieve precise control of external devices; the remote control output operation is based on a preset instruction set and logic rules to ensure accurate control of power automation terminal equipment.

[0111] If the system is waiting to receive AD data acquired by the SPI interface, it will remain in a waiting state after sending the data packet until the SPI interface completes the AD data acquisition. The AD data acquisition process follows strict time sequence and accuracy requirements to ensure that the acquired data can accurately reflect the real-time status of the power system.

[0112] If it is necessary to wait for the remote signaling data to be collected by the IIC interface remote signaling chip, then wait for the IIC interface to complete the data acquisition after sending the data packet; the remote signaling chip collects remote signaling information according to the sampling frequency and logic rules to provide the system with status signals of power equipment.

[0113] The system continuously monitors whether it receives rpmsg data. If it does not receive it, it remains in a waiting state. Once rpmsg data is received, it is processed accordingly based on the data type.

[0114] The acquired AD data is saved to a preset buffer buf and immediately converted into the corresponding voltage value. The conversion process is based on precise calibration parameters and mathematical models to ensure that the converted voltage value is accurate and reliable. At the same time, the remote signaling data is also saved to the corresponding buffer buf.

[0115] The above data transmission and processing flow forms a closed-loop system, continuously performing data acquisition, transmission, reception, and processing operations. At the same time, the system is equipped with a real-time monitoring mechanism to monitor the status and provide early warnings of faults at each stage of the process. Once an abnormality is detected, such as data transmission interruption or data error, the corresponding alarm mechanism is immediately triggered, and a prompt is given through the voice broadcast module so that maintenance personnel can take timely measures to handle the situation.

[0116] In this embodiment, as Figure 4 As shown, considering the high-frequency sampling characteristics of power data, the graphics display module adopts the following optimization strategies in both the QT framework and the Android path:

[0117] Data block transmission: Based on the time-series characteristics of power data, continuous sampling data is divided into independent data blocks according to time windows; during cross-system (QT and Linux, Android and Linux, etc.) data transmission, a unified storage area is allocated to the data blocks through a shared memory pool to avoid multiple copies of data between different systems; at the same time, zero-copy technology is adopted to achieve efficient data transmission through direct memory access (DMA) and other methods, significantly reducing cross-system transmission latency and ensuring data real-time performance;

[0118] Asynchronous rendering scheduling: In the QT graphics display environment, independent data calculation threads and graphics rendering threads are created. The data calculation thread is used to read data blocks from shared memory and perform necessary preprocessing and calculation operations. The graphics rendering thread is used to draw the calculation results into graphical interface elements such as dynamic waveforms. Data synchronization and interaction are achieved through inter-thread communication mechanisms (such as the signal slot mechanism) to ensure that the waveform update frequency is not less than 50Hz, meeting the needs of real-time monitoring of power data. In the Android graphics system, the SurfaceFlinger compositor is used to asynchronously process the generation and submission of graphics frames. The application is used to generate graphics frame data. The SurfaceFlinger compositor performs synthesis and optimization processing on the generated graphics frame data in the background, and then outputs the final graphics display to the screen. Through this asynchronous submission mechanism, the main thread is effectively blocked, improving the smoothness and response speed of graphics display.

[0119] Anti-aliasing and dynamic scaling: During the graphics rendering process, a bilinear interpolation anti-aliasing algorithm is used to smooth the waveform to address the edge jaggedness issue. This algorithm calculates the color values ​​of the waveform edge pixels by interpolation, making the waveform edge transition more natural and significantly improving the visual quality of the waveform. Users can perform real-time scaling operations on the waveform, with a scaling range from 10% to 200%. During scaling, the graphics display module dynamically adjusts the display details of the waveform according to the scaling ratio, ensuring that the waveform remains clear and distinguishable at different scaling levels. At the same time, in combination with the needs of power grid fault recording analysis, scaling waveform data annotation and analysis functions are provided to help users accurately identify fault characteristics and key information.

[0120] Furthermore, the graphics display module is equipped with a performance monitoring mechanism to monitor key performance indicators such as data transmission latency, graphics rendering frame rate, and anti-aliasing effect in real time. Based on the monitoring results, the system automatically adjusts the parameter settings of optimization strategies such as time window size, thread scheduling strategy, and anti-aliasing algorithm parameters to adapt to the high-frequency sampling characteristics of power data under different operating conditions, ensuring that the graphics display performance is always kept at its best.

[0121] In this embodiment, as Figure 5 As shown, the graphics display module adopts an intelligent collaborative display mechanism to achieve collaboration and complementarity between the QT interface and the Android display content, including the following steps:

[0122] The system settings configuration interface allows users to intuitively and conveniently select the graphical display mode. The configuration interface provides clear options, including local QT display mode only and synchronous upload to Android remote monitoring mode, allowing users to choose according to their actual needs.

[0123] When the user selects the local QT display only mode, the graphics display module will only transmit data to the QT interface for display and stop the data upload process to the Android graphics system; if the user selects the synchronous upload to Android remote monitoring mode, the system will start the data upload mechanism and send the processed data to both the QT interface and the Android graphics system at the same time to achieve synchronous monitoring of local and remote systems.

[0124] The QT interface is used for real-time data presentation, displaying the current operating status information of power equipment in a concise and intuitive way, including but not limited to real-time waveform graphs, switch status indicators, and real-time measurement values. Through an efficient rendering mechanism, it ensures rapid updates and display of real-time data, meeting users' monitoring needs for the real-time operation of equipment. The Android interface fully leverages its powerful graphics processing and interactive capabilities, providing advanced functions such as historical data querying, multi-parameter comparison analysis, and data report generation. Users can easily view power data over a period of time on the Android interface, perform correlation analysis between multiple parameters, and generate detailed data reports, providing strong support for power system operation analysis and decision-making.

[0125] In this embodiment, the graphics display module monitors the running status of the Android graphics system in real time, especially accurately detecting the start-up status of enhanced graphics rendering tasks; it obtains the graphics rendering load information of the Android graphics system through the system's underlying interface to determine whether enhanced graphics rendering tasks such as complex 3D graphics display and high-resolution video playback have been started.

[0126] When the Android graphics system detects that it has started an enhanced graphics rendering task, the system automatically triggers a dynamic hardware resource allocation mechanism. According to the preset priority rules, the refresh rate or resolution of the QT interface is appropriately reduced to release some hardware resources, such as GPU computing power and memory bandwidth, to prioritize the real-time performance and smoothness of the enhanced graphics rendering task of the Android graphics system. When the enhanced graphics rendering task of the Android graphics system ends, the system automatically restores the normal refresh rate and resolution settings of the QT interface.

[0127] When an anomaly is detected in the Android graphics system (such as a system crash, unresponsive application, etc.) or a network interruption (such as a network link failure, server unreachable, etc.), the process of switching the local QT interface to standalone running mode is immediately triggered:

[0128] After switching to independent operation mode, the QT interface is no longer dependent on the Android graphics system. Relying on its integrated data processing and display functions, it continues to provide users with basic waveform display services, including real-time waveform drawing and updating. At the same time, it retains the necessary control function interfaces, enabling users to perform basic operation and control on power automation terminal equipment, ensuring that the normal operation and monitoring of the equipment are not affected.

[0129] Upon detecting an Android graphics system anomaly or network interruption, the graphics display module simultaneously activates a data caching mechanism, automatically allocating a dedicated cache area in local storage devices (such as solid-state drives, flash memory, etc.) to store subsequently generated power data.

[0130] According to preset rules, power-related data within the last 10 minutes, including but not limited to real-time waveform data, equipment status information, and measurement values, are cached and stored in a specific data format (such as binary, JSON, etc.). During the caching process, the data is encrypted and verified to ensure data security and integrity.

[0131] Once the Android graphics system returns to normal or the network connection is re-established, the graphics display module automatically detects the restoration of the system status and immediately initiates the data replenishment process. The locally cached data is uploaded to the Android graphics system accurately and without error, according to time sequence and data type, for subsequent analysis and processing, ensuring the continuity and integrity of the data.

[0132] During the execution of the degradation strategy, the graphics display module promptly sends instructions to the voice broadcast module, clearly prompting the user that the current display mode has been switched to the local QT independent running mode through voice broadcast. The voice prompts are clear and easy to understand, containing key information such as the reason for the switch, enabling the user to quickly understand the changes in system status.

[0133] In addition to voice announcements, corresponding prompts are displayed synchronously on the local QT interface, informing users of the current system's operating mode and status in the form of text or icons; the prompts continue to be displayed until the system returns to normal operating mode, ensuring that users can accurately grasp the system's working status at any time.

[0134] During local data caching, redundant storage technology is used to store cached data in multiple different storage locations simultaneously to prevent data loss due to the failure of a single storage device. During data replenishment, the uploaded data is verified and confirmed multiple times to ensure that the data is accurately transmitted to the Android graphics system.

[0135] Once the Android graphics system returns to normal and the network connection is stable, the graphics display module automatically executes a reverse switching process, switching the display mode from the local QT independent running mode back to the normal collaborative display mode. During the switching process, seamless data connection and smooth interface transition are ensured, without affecting normal user operation and monitoring.

[0136] As can be seen, the above-mentioned anomaly degradation handling strategy effectively addresses unexpected situations such as Android graphics system anomalies or network interruptions through a series of technical measures, including switching to independent operation mode of the local QT interface, local data caching, user prompts, and stability assurance. This ensures uninterrupted operation of the real-time monitoring function of power automation terminal equipment, guaranteeing data integrity and system reliability. Through layered architecture and cross-system collaborative design, high real-time performance, high accuracy, and high reliability of power automation equipment graphics display are achieved, while also meeting the needs of local monitoring and remote analysis. Compared to traditional single-system display solutions, this embodiment significantly improves graphics rendering efficiency, data throughput, and system fault tolerance, making it particularly suitable for scenarios with stringent requirements for display performance and stability, such as power grid relay protection and the power Internet of Things.

[0137] Specifically, the graphics display module can use the QT Graphical Designer: The QT Graphical Designer is a design tool with a visual user interface. QT applications can be written entirely from source code, or the QT Graphical Designer can be used to accelerate development. The method to launch the QT Graphical Designer is:

[0138] In Linux command mode, type the following command (assuming QT X11 is installed under / usr / local):

[0139] cd QT-2.3.2 / bin;

[0140] . / designer;

[0141] This will launch an interface similar to Delphi under Windows.

[0142] When a developer clicks the button on the toolbar representing a sub-form / component with different functions and then places it on a form, a sub-form / component is placed on the form. Developers can use the properties dialog box to set the properties of the sub-form. Precisely setting the position and size of the sub-form is unnecessary. Developers can select a group of forms and then arrange them. For example, selecting some button forms and then using the "lay out horizontally" option to arrange them horizontally one after another makes the design process faster, and the completed forms will fill the available window size range according to the property settings. Using the Qt Graphical Designer for graphical user interface design can eliminate application compilation, linking, and runtime time, while making it easier to modify the graphical user interface design. The Qt Graphical Designer's preview function allows developers to see various styles of graphical user interfaces during the development phase, including client-style user interfaces. Through the powerful database classes integrated with Qt, the Qt Graphical Designer also provides vivid database data browsing and editing operations.

[0143] For displaying content in Android, since there is a lot of code involved, it is generally possible to achieve the desired result by making some modifications to the controls in Android itself. This is because Android uses Java as its programming language, and with the help of XML descriptions, complex graphics display programming can be completed.

[0144] In Android graphics system programming, XML layout files are used to define the user interface layout requirements of an application. These layout files are uniformly stored in the res / layout directory. Through carefully designed tags and attributes, such as layout containers like LinearLayout and RelativeLayout, as well as view components like TextView and ImageView, precise positioning and layout arrangement of interface elements are achieved. Different interface layouts correspond to different XML files, which facilitates modular design and maintenance by developers.

[0145] Basic resources such as strings, colors, and sizes are defined and managed using different XML files. String resources are stored in the strings.xml file under the res / values ​​directory for easy unified management and multi-language adaptation. Color resources are defined in the colors.xml file under the res / values ​​directory to ensure consistency in color usage across the application. Size resources are stored in the dimens.xml file under the res / values ​​directory for easy adaptation and adjustment based on different screen resolutions.

[0146] As a special XML configuration file, AndroidManifest.xml serves as the entry point for Android applications and bears the important responsibility of declaring the basic attributes of the application. This file explicitly declares the components included in the application, such as activities, services, broadcast receivers, content providers, as well as key information such as required permissions and adapted API levels, providing basic configuration for the installation, operation, and system interaction of the application.

[0147] By leveraging the powerful logic processing capabilities of the Java programming language and the intuitive descriptive features of XML layout files, the separation of interface rendering and interaction logic is achieved. Java code is responsible for handling user input events, business logic calculations, and interactions with backend data, while XML layout files focus on defining the appearance and structure of the user interface. The two are associated through identifiers (such as the id attribute of view components). Java code can retrieve the corresponding view components by looking up these identifiers and then manipulate and control them to achieve complex user interface interaction effects.

[0148] In Java code, various resources defined in XML files are dynamically loaded and called through the resource access interfaces provided by the Android graphics system. For example, the getString() method can be used to retrieve string resources defined in strings.xml, the getColor() method can be used to retrieve color resources defined in colors.xml, and the getDimension() method can be used to retrieve dimension resources defined in dimensions.xml. This dynamic loading mechanism allows the application to flexibly adapt to different resource configurations and user needs, improving code reusability and maintainability.

[0149] In XML layout files, adopt reasonable layout structures and attribute settings to reduce view nesting and avoid over-drawing; for example, use ConstraintLayout instead of multi-level nested linear layouts to improve interface rendering efficiency; at the same time, by setting the visibility attribute and layout parameters (layout_width, layout_height, etc.) of view components, the interface can be dynamically adjusted and optimized for display.

[0150] By leveraging the performance analysis tools provided by the Android graphics system, the performance of graphics display based on XML and Java is monitored in real time. Based on the monitoring results, such as frame rate and memory usage, targeted optimizations are made to the XML layout file and Java code. For example, the graphics drawing instructions in the XML are optimized to reduce unnecessary graphics drawing operations. In the Java code, graphics resources are managed reasonably, and unused memory is released in a timely manner to ensure the smoothness and stability of graphics display.

[0151] In the process of using XML files for resource management and Java code for functionality, system security is fully considered; sensitive information in XML files is encrypted to prevent data leakage; user input is strictly validated and filtered in Java code to avoid malicious code injection and security vulnerabilities; at the same time, the security specifications of the Android graphics system are followed, and permissions are requested and used reasonably to ensure that the application runs in a secure environment.

[0152] For Android devices of different versions and resolutions, the application achieves broad compatibility through flexible configuration of XML files and adaptation of Java code. In the XML layout file, relative layout and size adaptation strategies are used to ensure that the interface can be displayed correctly on different screen sizes. In the Java code, the function implementation is dynamically adjusted according to the device's API level and characteristics to ensure that the application provides a consistent user experience on various devices.

[0153] As can be seen, this embodiment, through an efficient organization and calling mechanism based on XML file resources and combined with the Java programming language, achieves efficient, flexible, and secure complex graphics display and system function configuration under the Android graphics system, effectively improving the graphics display performance and user experience of power automation terminal equipment on the Android platform.

[0154] In this embodiment, the Android logging system provides the function of recording and viewing system debugging information. This is a unique feature of Android, which is very suitable for analyzing various problems that occur during system operation. Especially during the system debugging phase, it can accurately eliminate the problem and record the running process of various apps in the log file for easy analysis afterward.

[0155] Specifically, the Android logging system comprises four core components:

[0156] Log buffers: Located in the / dev / log / directory, they are divided into four buffers: main (main log), events (events log), radio (wireless communication log), and system (system log).

[0157] Logcat is a tool used to view real-time logs. It supports executing commands via adb shell or viewing directly in Android Studio.

[0158] Log API: Developers use Log classes (such as Log.d(), Log.e()) to record application logs, which are stored according to priority (verbose, debug, info, warn, error).

[0159] Log permissions:

[0160] Configure permissions in `:ml-search-more[AndroidManifest.xml]{text="AndroidManifest.xml"}` to control the scope of log output.

[0161] In this embodiment, a remote update module is also included. This module fully supports the FTP protocol and other common network transmission protocols (such as HTTP, HTTPS, etc.). It can flexibly select the appropriate protocol for communication according to the network environment and server configuration. When establishing a connection with the remote update server, it automatically performs protocol negotiation and parameter configuration to ensure the stability and reliability of the connection.

[0162] During the network connection establishment process, security authentication measures are implemented, using methods such as username-password authentication and digital certificate authentication to perform two-way authentication between the remote update server and the power automation terminal equipment, preventing unauthorized device access and malicious file transfer, and ensuring the security of the remote update process.

[0163] For system upgrade scenarios, the remote update module has the function of creating differential packages; by comparing the differences between the old and new versions of system files, it accurately extracts the modified data and packages it into differential packages according to a specific differential algorithm; the differential packages contain necessary metadata, such as version information, difference descriptions, and restore instructions, so as to perform accurate update operations on terminal devices.

[0164] After the terminal device receives the differential packet, the remote update module first verifies the validity of the differential packet, including checking the integrity and accuracy of the metadata. After the verification is successful, according to the restore instructions in the differential packet, the differential data is merged and updated with the original system files on the device, and only the modified parts are replaced or supplemented, thereby realizing the system upgrade. This method greatly reduces the amount of data that needs to be transmitted, saving upgrade time and network bandwidth.

[0165] The remote update module periodically or according to user instructions sends query requests to the remote update server to obtain the latest version information of the application; at the same time, it detects and compares the version of the locally installed application to determine whether there is an updatable version.

[0166] When a new version of the application is detected, the remote update module downloads the application installation package from the remote update server according to preset strategies (such as prioritizing stable versions and automatically adjusting download speed based on network conditions). After the download is complete, the installation operation is performed automatically, and the installation progress and status are displayed in real time during the installation process. After the installation is completed, the application is functionally verified to ensure that the updated application can run normally.

[0167] Throughout the remote update process, the remote update module monitors the download and update progress in real time and provides users with update status information, such as the percentage of downloads and estimated remaining time, through a graphical interface or by calling the voice broadcast module.

[0168] If any abnormal situation occurs during the update process, such as network interruption, file corruption, or installation failure, the remote update module will immediately stop the update operation and record the abnormal information. Depending on the type and severity of the abnormality, it will automatically attempt to download or resume the update. If the problem cannot be resolved automatically, a manual rollback function will be provided to restore the system or application to its state before the update, ensuring that the normal operation of the power automation terminal equipment is not affected.

[0169] In this embodiment, as Figure 6 As shown, the RK3568 chip has an I2S voice interface, which connects and interacts with the RK809 power management chip. The RK809 power management chip has built-in audio processing functions. It can connect an external microphone through its MIC1_INP and MIC1_INN interfaces for on-site voice recording; and connect an external speaker through its SPKP_OUT and SPKN_OUT interfaces to realize the voice playback function.

[0170] In the Android operating system environment, an integrated software voice playback module is used. The background system sends the text information that needs to be notified to the power terminal equipment. After receiving the text information, the software system on the power terminal equipment calls the voice playback module to convert the text into a voice signal and drives the external speaker to play the voice through the RK809 power management chip.

[0171] To address the notification needs of multiple substation terminal nodes in the power industry, when there are important notifications or alarms (such as natural disaster warnings), the backend system sends the notification text to multiple power substation terminal nodes via UDP protocol. Upon receiving the text message, each terminal node automatically converts the text to speech and plays it, enabling simultaneous voice notification to multiple sites. This significantly improves notification efficiency and allows for interaction with the site without relying on telephones or other communication tools, facilitating emergency broadcasts and command issuance. For example, for important notifications or alarms related to natural disasters like typhoons, if there are 100 main substation terminal nodes, communication via telephone would require 100 phone calls. However, the voice broadcast function only requires sending a single text message via UDP to all 100 substation nodes, achieving voice notification while saving time and effort.

[0172] In addition to voice notification, the system also supports on-site voice interaction. Through an external microphone, on-site personnel can input voice signals, which are then transmitted to the backend system for processing and analysis. This enables voice communication and interaction between the on-site and backend systems, facilitating the issuance of commands and feedback of on-site conditions in emergency situations.

[0173] Compared to traditional methods of notification via telephone and other communication tools, this system saves significant manpower and time costs and improves notification efficiency by combining mass text messaging with voice conversion and playback. Furthermore, the software-based text-to-speech conversion eliminates the need for hardware text-to-speech conversion equipment.

[0174] An interface abstraction module is set up in the hardware abstraction layer Baremetal (HAL). This module is used to analyze the graphics interface characteristics of the Android graphics system and the QT framework, and extract the common functions and differences between the two in graphics drawing, display control, resource management and other aspects.

[0175] For common functions, a unified abstract interface standard is defined. For example, the graphics drawing interface standardizes the parameter passing method and drawing process for drawing basic graphics (such as lines, rectangles, circles, etc.), and the display control interface standardizes the calling method for operations such as setting display resolution and switching display modes.

[0176] For differences, adaptation layers or conditional compilation are used to handle them, ensuring that the abstract interface is compatible with two different graphics systems.

[0177] A hardware interaction module is constructed to communicate directly with the underlying graphics display hardware. This module converts the operation commands of the abstract interface into control signals that the hardware can recognize, enabling precise control of the graphics display hardware, such as memory access and display timing control. Simultaneously, the hardware interaction module monitors hardware status information in real time, such as the connection status of the display device and memory usage, and feeds this information back to the interface abstraction module, providing hardware-level data support for graphics scheduling in the upper-layer system.

[0178] A scheduling strategy management module is established in the hardware abstraction layer (Baremetal) to formulate graphical interface scheduling strategies based on system operating status and user needs. For example, during the initial system startup, the QT framework is prioritized for basic graphical interface display to ensure fast system startup and basic functional availability. During the Android application runtime phase, graphics resources are allocated rationally based on application type and priority, dynamically switching the scheduling between the Android graphics system and the QT framework graphical interface. The scheduling strategy management module also has adaptive adjustment capabilities, capable of optimizing the scheduling strategy in real time based on hardware resource usage (such as CPU and GPU utilization) and the complexity of graphics tasks, ensuring efficient and smooth graphics display.

[0179] A task queue management module was designed to uniformly manage and queue graphics tasks from the Android graphics system and the QT framework. Tasks are sorted based on factors such as urgency and priority, ensuring that high-priority graphics tasks are processed first. The task queue management module is also responsible for task distribution and synchronization, accurately returning the processed task results to the corresponding upper-layer systems to guarantee the synchronization and consistency of graphics display between the two systems.

[0180] The hardware abstraction layer Baremetal interacts with the Android graphics system and QT framework through a predefined unified interface. Upper-layer systems only need to call the unified abstract interface to complete graphics-related operations without having to worry about the differences in the underlying hardware and the specific implementation details.

[0181] When the upper-layer system initiates a graphics operation request, the hardware abstraction layer (Baremetal) converts the request into corresponding hardware control instructions based on the scheduling strategy and task queue status, and then sends them to the hardware interaction module for processing. After processing, the result is returned to the upper-layer system, enabling efficient communication and collaborative work between the two systems and the hardware abstraction layer.

[0182] During graphics display, the hardware interaction module monitors the hardware status in real time and adjusts graphics operation commands promptly based on hardware feedback to ensure the stability and reliability of the graphics display. Simultaneously, the hardware interaction module is also responsible for the rational allocation and management of hardware resources, avoiding resource conflicts and waste.

[0183] A compatibility testing and optimization module is integrated into the hardware abstraction layer, Baremetal, to regularly test the compatibility of the Android graphics system and the QT framework. By simulating different application scenarios and hardware environments, potential problems may arise in the unified scheduling process of the dual-system graphics interfaces. Based on the test results, the interface definitions and scheduling strategies of the hardware abstraction layer are optimized and adjusted to ensure that the system maintains good compatibility under various conditions and supports different versions of the Android system and the QT framework.

[0184] An exception handling and recovery module is configured to monitor and handle anomalies occurring during the operation of the hardware abstraction layer in real time. When an anomaly is detected, this module first records the anomaly information and then takes appropriate measures based on the anomaly type, such as restarting relevant modules or switching to a backup scheduling strategy. After the anomaly is handled, the system can automatically recover to normal operating status, ensuring the continuity and stability of the dual-system graphics display and minimizing the impact of anomalies on the user experience.

[0185] As can be seen, this embodiment achieves efficient unified scheduling of the Android graphics system and the QT framework dual-system graphics interface through the Baremetal hardware abstraction layer architecture, the unified scheduling mechanism of the dual-system graphics interface, and comprehensive collaborative work and protection measures, providing an innovative solution for the application of graphics display modules in multi-system environments.

[0186] In summary, the real-time dynamic monitoring and interactive system for power automation terminal equipment of the present invention provides an efficient, reliable, and intelligent solution for the field of power automation through its advantages in real-time status visualization, efficient fault diagnosis, convenient operation, intelligent processing and analysis, and enhanced on-site communication, and has significant economic and social benefits.

[0187] 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.

[0188] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.

Claims

1. A real-time dynamic monitoring and interaction system for power automation terminal equipment, characterized in that, include: Main control module: It adopts the AMP architecture with multi-core heterogeneous processing capabilities. The AMP architecture includes a first CPU core unit running on Linux and a second CPU core unit running on RTOS. Real-time data display module: Integrated into the main control module or connected to an external display device via a high-definition interface, used to display monitoring data of power automation equipment in real time; The graphics display module is compatible with both the Android graphics system and the QT framework. It achieves unified scheduling of the dual-system graphics interfaces through a hardware abstraction layer. In the Linux system environment, a local graphics QT interface is built based on the QT framework. Through hardware acceleration, the data processed by the main control module is drawn in real time as dynamic waveforms, status tables, and parameter setting interfaces, and directly output to the local display screen. The Linux system uploads the processed data to the Android graphics system for secondary rendering. Log recording module: Integrates Android or HarmonyOS system logging functions to record the running logs of the main control module and all related tasks; Voice broadcast module: Connects a microphone and speaker via an I2S voice interface to record and play voice messages; or integrates voice playback software to convert text information into voice for broadcast. To address the high-frequency sampling characteristics of power data, the graphics display module employs the following optimization strategies in both the QT framework and the Android graphics system: Data block transmission: Based on the time-series characteristics of power data, continuous sampling data is divided into independent data blocks according to time windows; during cross-system data transmission, a unified storage area is allocated to the data blocks through a shared memory pool; at the same time, zero-copy technology is used to achieve efficient data transmission through direct memory access. Asynchronous rendering scheduling: In the QT graphics display environment, a data calculation thread and a graphics rendering thread are created; the data calculation thread is used to read data blocks from shared memory and perform preprocessing and calculation operations; the graphics rendering thread is used to draw the calculation results as dynamic graphical interface elements; in the Android graphics system, the SurfaceFlinger compositor is used to asynchronously process the generation and submission of graphics frames, to synthesize and optimize the generated graphics frame data, and then to output the final graphics display to the screen; Anti-aliasing and dynamic scaling: During the graphics rendering process, a bilinear interpolation anti-aliasing algorithm is used to smooth the waveform to address the edge jaggedness problem, and users can perform real-time scaling operations on the waveform. During scaling, the graphics display module dynamically adjusts the display details of the waveform according to the scaling ratio. At the same time, in combination with the needs of power grid fault recording analysis, scaling waveform data annotation and analysis functions are provided.

2. The system according to claim 1, characterized in that: The AMP architecture uses the RK3568 chip. The Mailbox hardware module based on the RK3568 chip and the shared memory pool construct a low-latency inter-core communication channel, wherein: The Mailbox module is used to transmit control commands; The shared memory pool is divided into a ring buffer structure to store the original AD values ​​and the converted voltage / current data; By employing the rpmsg virtual bus protocol, lightweight driver layers are deployed on both the RTOS and Linux sides to achieve the following: Dynamic endpoint registration: RTOS-side and Linux-side applications create / destroy rpmsg communication endpoints to support multi-task parallel data transmission; Packet verification mechanism: Embed a CRC check field in the header of each rpmsg packet.

3. The system according to claim 2, characterized in that: When performing efficient inter-core communication, the second CPU core unit continuously acquires the original analog signals of the power equipment through the hardware ADC module at a preset sampling rate and converts them into digital quantities, namely AD values. Perform preprocessing operations on the collected AD values; The preprocessed AD values ​​are encapsulated into rpmsg data packets of fixed length. The packet header includes at least: timestamp: recording the absolute time of data acquisition; channel identifier: distinguishing multiple ADC acquisition channels; data length: indicating the number of valid AD values ​​in the current packet. In this process, the RTOS side sends a data ready interrupt to the Linux side through the Mailbox module, and the Linux side responds to the interrupt and reads the rpmsg data packet from the shared memory pool. The Linux side assigns the highest real-time priority to the rpmsg interrupt service routine; when the remaining space in the shared memory pool is lower than the threshold, the RTOS side suspends data transmission and triggers a flow control interrupt; if the Linux side does not respond to the interrupt within the timeout period, the RTOS side automatically retransmits the three most recent data packets and alarms through the voice broadcast module.

4. The system according to claim 3, characterized in that: Linux-side applications receive interrupt notifications through the rpmsg driver layer, read rpmsg data packets sent by the RTOS side from the circular buffer of the shared memory pool, and perform the following transformations on the AD values ​​of the rpmsg data packets: According to the formula Calculate the actual voltage value, where, The reference voltage for the ADC is n, the number of bits in the ADC is K, the gain coefficient is B, and the offset coefficient is B. The RMS algorithm is used to calculate the effective values ​​of voltage and current for AC signals, and real-time waveform display and over-limit alarm are supported. The calculated voltage / current values ​​are processed as follows: Real-time data is written to the shared memory area for use by the QT graphics display module; Data is periodically appended to the SQLite database, supporting historical data queries and fault rollback; Data is sent to the Android graphics system via the IPC mechanism to enhance graphics rendering or cloud platform synchronization.

5. The system according to claim 1, characterized in that, The graphics display module adopts an intelligent collaborative display mechanism to achieve collaboration and complementarity between the QT interface and the Android display content, including the following steps: In the system configuration interface, when the user selects the local QT display only mode, the graphics display module will only transmit data to the QT interface for display, stopping the data upload process to the Android graphics system. If the user selects the synchronous upload to Android remote monitoring mode, the system will start the data upload mechanism, sending the processed data to both the QT interface and the Android graphics system simultaneously, achieving synchronous monitoring between local and remote systems. Specifically, the graphics display module monitors the running status of the Android graphics system in real time; and obtains the graphics rendering load information of the Android graphics system through the system's underlying interface to determine whether to start the enhanced graphics rendering task. When the Android graphics system detects that it has started an enhanced graphics rendering task, the system automatically triggers a dynamic hardware resource allocation mechanism; according to preset priority rules, the refresh rate or resolution of the QT interface is appropriately reduced to free up some hardware resources; when the enhanced graphics rendering task of the Android graphics system ends, the system automatically restores the normal refresh rate and resolution settings of the QT interface.

6. The system according to any one of claims 1 to 5, characterized in that, Also includes: The remote update module supports FTP protocol and other network transmission protocols, and automatically negotiates protocols and configures parameters when establishing a connection with the remote update server. During the network connection establishment process, two-way authentication is performed on the remote update server and the power automation terminal equipment; For system upgrade scenarios, the remote update module has the function of creating differential packages. By comparing the differences between the old and new versions of system files, it extracts the modified data and packages it into a differential package according to the differential algorithm. After the terminal device receives the differential packet, the remote update module first verifies the validity of the differential packet; After verification, according to the restore instructions in the differential package, the differential data is merged and updated with the original system files on the device, and only the modified parts are replaced or supplemented. The remote update module periodically or according to user instructions sends query requests to the remote update server to obtain the latest version information of the application; at the same time, it detects and compares the version of the locally installed application to determine whether there is an updatable version.

7. The system according to any one of claims 1 to 5, characterized in that: In Android graphics system programming, XML layout files are used to define the user interface layout requirements of the application. String resources are stored in the strings.xml file under the res / values ​​directory; color resources are defined in the colors.xml file under the res / values ​​directory; and size resources are stored in the dimens.xml file under the res / values ​​directory. Among them, the AndroidManifest.xml XML configuration file serves as the entry point for the Android application. In the file, the components included in the application and the required key information are explicitly declared. In Java code, various resources defined in XML files are dynamically loaded and called through the resource access interface provided by the Android graphics system. This includes at least getting string resources defined in strings.xml through the getString() method, color resources defined in colors.xml through the getColor() method, and size resources defined in dimensions.xml through the getDimension() method. In the XML layout file, ConstraintLayout is used instead of multi-level nested linear layouts to improve interface rendering efficiency; at the same time, by setting the visibility attributes and layout parameters of view components, the interface can be dynamically adjusted and optimized for display.

8. The system according to any one of claims 1 to 5, characterized in that: The RK3568 chip features an I2S voice interface for connection and interaction with the power management chip. The power management chip has built-in audio processing capabilities, allowing for the connection of an external microphone via the provided MIC1_INP and MIC1_INN interfaces for on-site voice recording; and the connection of an external speaker via the SPKP_OUT and SPKN_OUT interfaces for voice playback. In the Android operating system environment, an integrated software voice playback module is used. The background system sends the text information that needs to be notified to the power terminal equipment. After receiving the text information, the software system on the power terminal equipment calls the voice playback module to convert the text into a voice signal and drives the external speaker to play the voice through the RK809 power management chip. To address the notification needs of multiple power station terminal nodes in the power industry, when there is an important notification or alarm, the backend system will send the notification text to multiple power station terminal nodes via UDP protocol; after receiving the text information, each terminal node will automatically convert the text to speech and play it, realizing the function of simultaneously sending voice notifications to multiple stations.

9. The system according to any one of claims 1 to 5, characterized in that: An interface abstraction module is set up in the hardware abstraction layer to analyze the graphics interface characteristics of the Android graphics system and the QT framework, and to extract the common functions and differences between the two. For common functions, a unified abstract interface standard is defined, which includes at least a graphics drawing interface and a display control interface. For differences, an adaptation layer or conditional compilation is used to handle them to ensure that the abstract interface is compatible with the two different graphics systems. A hardware interaction module is constructed to communicate directly with the underlying graphics display hardware. The hardware interaction module converts the operation instructions of the abstract interface into control signals that the hardware can recognize. At the same time, the hardware interaction module monitors the hardware status information in real time and feeds this information back to the interface abstract module, providing hardware-level data support for the graphics scheduling of the upper-layer system. A scheduling strategy management module is set up in the hardware abstraction layer to formulate a graphical interface scheduling strategy based on the system's running status and user needs. This includes prioritizing the scheduling of the QT framework for basic graphical interface display during the initial system startup phase, and allocating graphical resources according to the application type and priority during the Android application running phase, and dynamically switching the scheduling of the Android graphics system and the QT framework graphical interface. Design a task queue management module to uniformly manage and queue graphics tasks from the Android graphics system and QT framework, as well as to distribute and synchronize tasks; The hardware abstraction layer interacts with the Android graphics system and QT framework through a predefined unified interface. The upper-layer system only needs to call the unified abstraction interface standard to complete graphics-related operations. When the upper-layer system initiates a graphics operation request, the hardware abstraction layer converts the request into corresponding hardware control instructions according to the graphics interface scheduling strategy and task queue status, and sends them to the hardware interaction module for processing.