Data analysis method and device based on CPU platform, equipment and medium

By identifying the CPU type and operating system type and calling the corresponding monitoring program and driver, the accuracy problem of cross-platform CPU data analysis is solved, achieving efficient data acquisition and real-time monitoring, and providing a unified data view.

CN121996499APending Publication Date: 2026-05-08SHENZHEN WEIBU INFORMATION
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN WEIBU INFORMATION
Filing Date
2025-12-11
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing CPU data analysis technologies suffer from low accuracy, failure to obtain valid data, or errors when used across platforms due to differences in CPU architecture and operating systems.

Method used

By identifying the CPU type and operating system type of the monitoring application software, the corresponding monitoring program is invoked, the hardware monitoring interface is activated, and the target monitoring driver is loaded to monitor CPU performance data in real time, and the data is analyzed and displayed with alarms.

Benefits of technology

It enables cross-platform adaptive monitoring, ensuring the accuracy and reliability of data collection, providing a unified and real-time data view, and improving the efficiency of monitoring data acquisition and the observability of system status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996499A_ABST
    Figure CN121996499A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data analysis, and discloses a data analysis method and device based on a CPU platform, equipment and a medium, and the method comprises the steps: identifying a CPU type and an operating system type of a running environment where monitoring application software is located; calling a monitoring program corresponding to the identified CPU type and the operating system type in a monitoring program unit; activating a hardware monitoring interface corresponding to the CPU type according to the monitoring program, and loading a target monitoring drive program corresponding to the hardware monitoring interface; monitoring the performance data of the CPU in real time through the target monitoring drive program, performing alarm analysis on the monitored performance data, and generating an alarm signal of the CPU platform; and transmitting the alarm signal and the performance data to the monitoring application software, and displaying the alarm signal and the performance data on a visual interface of the monitoring application software. According to the invention, the accuracy of CPU data analysis can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis technology, and in particular to a data analysis method, apparatus, device, and medium based on a CPU platform. Background Technology

[0002] With the deepening development of information technology application innovation, domestically produced CPU platforms and operating systems have become important cornerstones of critical information infrastructure. In the current context, real-time and accurate monitoring of the operational status of devices such as servers and workstations is a necessary technical means to ensure stable system operation, optimize performance, and diagnose faults.

[0003] Existing CPU data analysis techniques typically employ static adaptation methods tailored to specific CPU architectures and operating systems. In practical applications, the instruction sets and calling specifications for accessing underlying hardware monitoring registers or system interfaces differ significantly across CPU architectures. For example, a monitoring program designed for Zhaoxin cannot correctly parse Phytium's power adjustment interface, and vice versa. This results in the inability to obtain valid data or the generation of data errors when used across platforms, leading to lower accuracy in CPU data analysis. Summary of the Invention

[0004] This invention provides a data analysis method, apparatus, device, and medium based on a CPU platform to solve the technical problem of low accuracy in CPU data analysis.

[0005] Firstly, a data analysis method based on a CPU platform is provided, including: Identify the CPU type and operating system type of the environment in which the monitoring application software is running; The monitoring program corresponding to the identified CPU type and operating system type is called in the preset monitoring program unit; The monitoring program activates the hardware monitoring interface corresponding to the CPU type and loads the target monitoring driver corresponding to the hardware monitoring interface. The target monitoring driver monitors CPU performance data in real time, performs alarm analysis on the monitored performance data, and generates alarm signals for the CPU platform. The alarm signal and the performance data are transmitted to the monitoring application software, and the alarm signal and the performance data are displayed on the visual interface of the monitoring application software.

[0006] Secondly, a data analysis device based on a CPU platform is provided, comprising: The type identification module is used to identify the CPU type and operating system type of the operating environment in which the monitoring application software is running; The monitoring program identification module is used to call the monitoring program corresponding to the identified CPU type and operating system type in the preset monitoring program unit; The monitoring driver loading module is used to activate the hardware monitoring interface corresponding to the CPU type according to the monitoring program, and load the target monitoring driver corresponding to the hardware monitoring interface. The alarm signal generation module is used to monitor the CPU performance data in real time through the target monitoring driver, perform alarm analysis on the monitored performance data, and generate alarm signals for the CPU platform. The data display module is used to transmit the alarm signal and the performance data to the monitoring application software and display the alarm signal and the performance data on the visual interface of the monitoring application software.

[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described data analysis method based on a CPU platform.

[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the aforementioned CPU-based data analysis method.

[0009] In the aforementioned solution implemented by the data analysis method, apparatus, device, and medium based on the CPU platform, the CPU type and operating system type of the monitoring application software's operating environment can be identified through the client; the monitoring program corresponding to the identified CPU type and operating system type is called in the preset monitoring program unit; the hardware monitoring interface corresponding to the CPU type is activated according to the monitoring program, and the target monitoring driver corresponding to the hardware monitoring interface is loaded; the CPU performance data is monitored in real time through the target monitoring driver, alarm analysis is performed on the monitored performance data, and alarm signals of the CPU platform are generated; the alarm signals and performance data are transmitted to the monitoring application software, and the alarm signals and performance data are displayed on the visualization interface of the monitoring application software, and the displayed data is fed back to the client. In this invention, by identifying the CPU type and operating system type of the monitoring application software's operating environment, accurate decision-making basis is provided for realizing cross-platform adaptive monitoring; The monitoring program unit calls the monitoring program corresponding to the identified CPU type and operating system type, achieving precise matching of monitoring logic and on-demand loading of resources, avoiding the execution of redundant code. Based on the monitoring program, the hardware monitoring interface corresponding to the CPU type is activated, and the target monitoring driver corresponding to the hardware monitoring interface is loaded, ensuring the correctness of underlying hardware access instructions and system calls, thereby directly guaranteeing the accuracy and reliability of data collection from a technical perspective. The target monitoring driver monitors CPU performance data in real time, obtaining high-quality basic data. Alarm analysis is performed on the monitored performance data to generate operational alarm signals for the CPU platform, enabling intelligent judgment of system status. The operational alarm signals and performance data are transmitted to the monitoring application software and displayed on its visual interface, providing maintenance personnel with a unified, real-time, and accurate data view, greatly improving the efficiency of monitoring data acquisition and the observability of system status. Attached Figure Description

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

[0011] Figure 1 This is a schematic diagram of an application environment for a data analysis method based on a CPU platform according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a data analysis method based on a CPU platform according to an embodiment of the present invention; Figure 3 yes Figure 2 A flowchart illustrating a specific implementation of step S4; Figure 4 This is a schematic diagram of a data analysis device based on a CPU platform according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 6 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0012] The technical solutions of the embodiments of the present 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 the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] The data analysis method based on the CPU platform provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The server can identify the CPU type and operating system type of the monitoring application software's operating environment through the client; it calls the monitoring program corresponding to the identified CPU type and operating system type in a preset monitoring program unit; it activates the hardware monitoring interface corresponding to the CPU type according to the monitoring program and loads the target monitoring driver corresponding to the hardware monitoring interface; it monitors the CPU performance data in real time through the target monitoring driver, performs alarm analysis on the monitored performance data, and generates alarm signals for the CPU platform; it transmits the alarm signals and performance data to the monitoring application software, displays the alarm signals and performance data on the monitoring application software's visual interface, and feeds the displayed data back to the client. In this invention, by identifying the CPU type and operating system type of the monitoring application software's operating environment, accurate decision-making basis is provided for achieving cross-platform adaptive monitoring; by calling the identified CPU type and operating system type in the monitoring program unit... The monitoring program corresponding to the CPU type and operating system type achieves precise matching of monitoring logic and on-demand loading of resources, avoiding the execution of redundant code. It activates the hardware monitoring interface corresponding to the CPU type and loads the target monitoring driver corresponding to the hardware monitoring interface, ensuring the correctness of underlying hardware access instructions and system calls, thus directly guaranteeing the accuracy and reliability of data collection from a technical perspective. It monitors CPU performance data in real time through the target monitoring driver, obtaining high-quality basic data. It performs alarm analysis on the monitored performance data, generating operational alarm signals for the CPU platform, achieving intelligent judgment of system status. The operational alarm signals and performance data are transmitted to the monitoring application software and displayed on its visual interface, providing maintenance personnel with a unified, real-time, and accurate data view, greatly improving the efficiency of monitoring data acquisition and the observability of system status. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster composed of multiple servers. The invention will be described in detail below through specific embodiments.

[0014] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a CPU-based data analysis method provided in an embodiment of the present invention includes the following steps: S1. Identify the CPU type and operating system type of the environment in which the monitoring application software is running.

[0015] In this embodiment of the invention, the monitoring application software refers to a computer program used to collect, process, and display performance data of domestically produced CPUs. It can receive data transmitted from the hardware monitoring interface and generate a visual interface. CPU type refers to the architecture category of the CPU, including the x86 architecture of Zhaoxin and the ARM architecture of Phytium. Operating system type refers to the operating system on which the monitoring application software depends, including Kylin and UOS systems.

[0016] In this embodiment of the invention, identifying the CPU type and operating system type of the operating environment where the monitoring application software is running includes: The monitoring application software calls the system platform interface based on its operating environment, and extracts the machine architecture information and operating system name information of the operating environment through the system platform interface. The architecture type sequence in the machine architecture information is parsed, and the CPU type of the operating environment of the monitoring application software is determined based on the architecture type sequence. Extract the system identifier from the operating system name information, and match the predefined list of operating system types based on the system identifier; The operating system type of the monitoring application software's running environment is determined based on the matching results.

[0017] In detail, calling the system platform interface refers to the monitoring application software triggering the system platform interface function through the calling method allowed by the operating system. In practical application scenarios, after the monitoring application software starts, it automatically detects the current running environment and calls system platform interfaces such as Python's platform library or subprocess library. Parsing the architecture type sequence refers to identifying and judging the characteristic code sequence in the machine architecture information. In practical applications, the monitoring application software matches the extracted architecture type sequence. If the sequence is x86_64, i386, or i686, the CPU type is determined to be Zhaoxin (x86 architecture); if the sequence is aarch64 or armv7l, the CPU type is determined to be Phytium (ARM architecture). Through explicit architecture type sequence matching rules, automatic CPU type identification is achieved.

[0018] Specifically, system identifiers refer to key characters selected from operating system name information that identify the operating system type. For example, when the identifier Kylin is extracted from the operating system name information, it is matched against a predefined list of operating system types, where Kylin corresponds to the Kylin system; if the identifier UOS is extracted, it is matched against the corresponding UOS system in the list. When the system identifier Kylin successfully matches the list, the operating system type is determined to be the Kylin system; when UOS successfully matches, it is determined to be the UOS system. Based on the preceding identifier matching results, the operating system type is directly output to ensure the accuracy of the identification results.

[0019] Furthermore, different CPU types (Zhaoxin, Phytium) and operating system types (Kylin, UOS) correspond to different monitoring programs. Only by determining these two types of information can the appropriate monitoring program be accurately called in the preset monitoring program unit. If the identification results are missing, the monitoring program call will result in an adaptation error, and subsequent hardware monitoring interface activation and data collection will not be possible.

[0020] S2. Call the monitoring program corresponding to the identified CPU type and operating system type in the preset monitoring program unit.

[0021] In this embodiment of the invention, the monitoring program unit refers to a collection of monitoring programs pre-stored in the system, containing various combinations of CPU types and operating system types. A monitoring program is a program that monitors data for a given CPU type and operating system type.

[0022] In this embodiment of the invention, the step of calling the monitoring program corresponding to the identified CPU type and operating system type in the preset monitoring program unit includes: Access the preset monitoring program configuration library based on the identified CPU type and operating system type; Query the monitoring program path associated with the CPU type and operating system type in the monitoring program configuration library; In the preset monitoring program unit, the target location corresponding to the monitoring program is located according to the monitoring program path; The monitoring program corresponding to the CPU type and operating system type is invoked based on the target location.

[0023] In detail, accessing the monitoring program configuration library refers to the monitoring application software establishing a connection with the library and obtaining access permissions based on the identified CPU type and operating system type. For example, when the CPU type is identified as Zhaoxin and the operating system type as Kylin, the monitoring application software will authorize access to the monitoring program configuration library through the system kernel, ensuring that it can read the corresponding relationship data stored in the library. By accessing the configuration library in a targeted manner, irrelevant data retrieval is avoided, improving the efficiency of subsequent operations. Querying the monitoring program path refers to finding the corresponding monitoring program path in the monitoring program configuration library by using CPU type and operating system type as search criteria. For example, in the configuration library, the monitoring program path associated with the combination of Zhaoxin + Kylin system is " / usr / local / monitor / zy_kylin_monitor", and the path associated with the combination of Phytium + UOS system is " / usr / local / monitor / ft_uos_monitor". Through explicit combination retrieval, it is ensured that the obtained monitoring program path accurately corresponds to the current operating environment.

[0024] Specifically, locating the target location refers to the monitoring application software finding the specific storage address of the monitoring program within the storage area contained in the monitoring program unit based on the queried monitoring program path. For example, based on the path / usr / local / monitor / zy_kylin_monitor, the zy_kylin_monitor program file is found in the system's / usr / local / monitor directory, and its storage address is determined to be inode:12345. Calling the monitoring program refers to the monitoring application software starting the corresponding monitoring program through a system call instruction based on the target location. For example, for the Zhaoxin and Kylin system monitoring program at the target location inode:12345, the instruction exec / usr / local / monitor / zy_kylin_monitor is executed to start the program. This achieves automatic calling of the monitoring program without manual intervention, solving the cumbersome problem of manually starting different monitoring programs, while ensuring that the called program is compatible with the current CPU and operating system, guaranteeing the normal operation of subsequent monitoring processes.

[0025] Furthermore, the monitoring program invoked is only a software-level executable program. It is necessary to activate the corresponding hardware monitoring interface and load the driver in order to establish a data transmission channel between the monitoring program and the CPU hardware.

[0026] S3. Activate the hardware monitoring interface corresponding to the CPU type according to the monitoring program, and load the target monitoring driver corresponding to the hardware monitoring interface.

[0027] In this embodiment of the invention, the hardware monitoring interface refers to the hardware interface on the CPU or motherboard used to output CPU performance data (power consumption, frequency, fan speed). The hardware monitoring interface corresponding to Zhaoxin CPU includes an interface similar to Intel RAPL and a power consumption data interface provided by BIOS. The hardware monitoring interface corresponding to Phytium CPU includes an intelligent power consumption adjustment technology interface and a hardware interface corresponding to Linux system files.

[0028] In this embodiment of the invention, activating the hardware monitoring interface corresponding to the CPU type according to the monitoring program includes: The hardware monitoring interface address corresponding to the CPU type is determined based on the monitoring program. Construct the hardware access instruction corresponding to the CPU type based on the hardware monitoring interface address; Send the hardware access command to the hardware monitoring interface corresponding to the CPU type; Receive response data from the hardware monitoring interface, and determine the activation status of the hardware monitoring interface based on the response data.

[0029] In detail, the hardware monitoring interface address refers to the address that the monitoring program obtains by calling the built-in address mapping table based on the CPU type it is adapted to. For example, for the monitoring program of Zhaoxin CPU, the address of the Intel RAPL interface is 0x12340000, and the address of the BIOS power data interface is 0x12341000 in its built-in address mapping table; for the monitoring program of Phytium CPU, the address of the intelligent power adjustment technology interface is 0x56780000. Based on the hardware monitoring interface address, instructions that can be recognized by the interface are generated according to the interface communication protocol. For the 0x12340000 interface of Zhaoxin CPU, a hardware access instruction 0x01 12340000 containing address information and opcode (activation instruction code 0x01) is constructed according to the RAPL protocol; for the 0x56780000 interface of Phytium CPU, an instruction 0x02 56780000 is constructed according to its dedicated protocol, ensuring that the hardware monitoring interface can correctly recognize the instructions.

[0030] Specifically, the monitoring program transmits the constructed hardware access command to the hardware monitoring interface via the system bus. The monitoring program sends the 0x0112340000 command to the Zhaoxin CPU's 0x12340000 interface via the PCIe bus. After transmission to the hardware monitoring interface, the monitoring program parses the received response data to determine whether the hardware monitoring interface is active. If the hardware monitoring interface returns a response of 0x00, it indicates that the interface is not active, and the monitoring program needs to resend the access command; if it returns 0x01, it indicates that the interface is active. This process of parsing the response data allows the monitoring program to determine the activation status and ensure that the hardware monitoring interface is in a working state.

[0031] In this embodiment of the invention, the target monitoring driver refers to a software program used to realize data interaction between the monitoring program and the hardware monitoring interface, and different hardware monitoring interfaces correspond to different target monitoring drivers.

[0032] In this embodiment of the invention, loading the target monitoring driver corresponding to the hardware monitoring interface includes: Identify the driver type corresponding to the hardware monitoring interface; Select the target monitoring driver corresponding to the driver type from the preset driver repository; Initialize the target monitoring driver and establish a connection between the initialized target monitoring driver and the hardware monitoring interface to obtain the connection status; The target monitoring driver is loaded into the preset system kernel according to the connection status.

[0033] In detail, the monitoring program determines the corresponding driver type based on the type of the hardware monitoring interface. For example, the Intel RAPL-like interface of the Zhaoxin CPU corresponds to the zy_rapl_driver type, and the BIOS power data interface corresponds to the zy_bios_driver type; the intelligent power adjustment technology interface of the Phytium CPU corresponds to the ft_power_driver type. By establishing the correspondence between interface type and driver type, the program clearly identifies the driver type to be loaded, avoiding incorrect driver selection. Based on the driver type, the monitoring program searches for and retrieves the corresponding driver from the driver repository. In the driver repository, the driver file corresponding to the zy_rapl_driver type is / lib / modules / zy_rapl.ko, and the file corresponding to the ft_power_driver type is / lib / modules / ft_power.ko. The monitoring program directly selects the corresponding file based on the type, ensuring that the retrieved driver is compatible with the hardware interface.

[0034] Specifically, the monitoring program configures the selected driver's parameters to enable it to communicate with the hardware monitoring interface; and connects the initialized driver to the hardware monitoring interface via a data link. For example, the zy_rapl.ko driver is initialized, configuring parameters such as communication baud rate and data bits, and then establishing a connection with the Zhaoxin CPU's RAPL interface via the system bus; if the connection is successful, the connection status is "connected"; if it fails, it is "disconnected," ensuring that the driver and hardware interface can communicate normally. When the connection status is "connected," the monitoring program loads the target monitoring driver into the operating system kernel using the insmod or modprobe instructions; if the connection status is "disconnected," the initialization and connection operations are re-executed until the connection is successful before loading. If the insmod / lib / modules / zy_rapl.ko instruction is executed to load the Zhaoxin RAPL interface driver into the Kylin system kernel, the driver is loaded into the kernel, enabling the driver to achieve data interaction at the system level, ensuring that CPU performance data can be obtained in real time.

[0035] Furthermore, by activating the hardware monitoring interface and loading the driver, a communication channel is established between the monitoring program and the CPU hardware. This channel can be used to collect performance data in real time and perform alarm analysis. If the CPU performance data is not monitored, the data output by the hardware interface cannot be processed, and abnormal CPU operation cannot be detected in time, thus failing to achieve the core purpose of monitoring.

[0036] S4. Monitor CPU performance data in real time through the target monitoring driver, perform alarm analysis on the monitored performance data, and generate alarm signals for the CPU platform.

[0037] In this embodiment of the invention, performance data refers to core parameters that reflect the CPU's operating status, including power consumption data, frequency data, and fan speed data.

[0038] In this embodiment of the invention, the step of monitoring CPU performance data in real time through the target monitoring driver includes: The target monitoring driver sends a data acquisition request to the hardware monitoring interface. Based on the data acquisition request, the raw performance data stream of the CPU is received from the hardware monitoring interface; The raw performance data stream is parsed to obtain CPU power consumption data, frequency data, and fan speed data; The power consumption data, frequency data, and fan speed data are standardized to generate CPU performance data in a unified format.

[0039] In detail, the target monitoring driver sends a data acquisition request command to the hardware monitoring interface at a preset period (e.g., 100 milliseconds). For example, the Zhaoxin CPU's RAPL interface driver sends a request command 0x03 12340000 to acquire power consumption data every 100 milliseconds. Real-time performance data acquisition can be achieved through periodic requests. The target monitoring driver receives the raw data returned by the hardware monitoring interface through the connection link. After receiving the acquisition request, the hardware monitoring interface returns a raw data stream 0xC8 0x5DC 0x7D0 containing power consumption, frequency, and fan speed information (corresponding to power consumption of 200W, frequency of 1500MHz, and fan speed of 2000 RPM, respectively).

[0040] Specifically, the target monitoring driver extracts and converts power consumption, frequency, and fan speed data from the raw data stream according to the hardware interface data format protocol. For the 0xC8 0x5DC 0x7D0 data stream, the protocol is parsed as follows: 0xC8 is converted to decimal 200, i.e., power consumption 200W; 0x5DC is converted to 1500, i.e., frequency 1500MHz; and 0x7D0 is converted to 2000, i.e., fan speed 2000 RPM. This protocol parsing ensures accurate acquisition of the CPU's core performance parameters by converting raw data into specific parameters. The parsed power consumption, frequency, and fan speed data are then converted into a unified string format: power consumption: 200W, frequency: 1500MHz, fan speed: 2000 RPM. This unified format avoids inconsistencies in output data formats across different CPU types, providing a consistent data foundation for subsequent alarm analysis and visualization.

[0041] For example, in the Zhaoxin CPU monitoring implementation, power consumption monitoring is achieved through an interface similar to Intel RAPL or a power data interface provided by the BIOS; real-time frequency is obtained through the BIOS interface or third-party tools such as AIDA64; and fan speed is obtained through the motherboard sensor interface or tools such as SpeedFan. In the Phytium CPU monitoring implementation, power consumption monitoring is achieved using the Phytium D3000's intelligent power adjustment technology interface; and power consumption is monitored through the Linux system file / sys / devices / system / cpu / cpu. Get frequency data using / cpufreq / cpuinfo_cur_freq; get fan speed via BIOS or SpeedFan interface.

[0042] Furthermore, such as Figure 3The diagram illustrates the data monitoring process. The monitoring application software, as the top-level application, utilizes the Kylin / UOS system interface to connect with system call interfaces, device management interfaces, and resource management interfaces. This allows it to perceive the operating system environment and access system resources, providing underlying support for operations such as identifying CPU type and operating system type. Simultaneously, it interacts with the hardware monitoring driver layer. The Zhaoxin monitoring driver and Phytium monitoring driver are adapted to the Zhaoxin and Phytium CPU architectures respectively, while the sensor driver connects to the motherboard sensors. Through the hardware monitoring layer, it interacts with the power consumption / frequency / fan monitoring circuits of the Zhaoxin and Phytium CPUs, as well as the motherboard sensors, to complete hardware data acquisition and command issuance. During data acquisition, raw data generated from the Zhaoxin / Phytium CPU monitoring circuits and motherboard sensors is transmitted to the corresponding driver modules via the hardware monitoring layer. Control commands originate from the monitoring application software, are forwarded through the Kylin / UOS system interface and related system interfaces, and then sent to the corresponding hardware for execution via the hardware monitoring driver layer and the hardware monitoring layer. In this way, through data and control flow, each layer achieves unified CPU and hardware status monitoring across CPU architectures and operating systems.

[0043] In this embodiment of the invention, the alarm signal refers to a signal generated based on an alarm event to alert the user of abnormal CPU operation, and includes information such as the type of abnormality and abnormal data.

[0044] In this embodiment of the invention, the step of performing alarm analysis on the monitored performance data to generate alarm signals for the CPU platform includes: The monitored performance data is compared with predefined alarm thresholds, including power consumption thresholds, frequency thresholds, and fan speed thresholds. When any monitored performance data exceeds the corresponding alarm threshold, an alarm event is generated on the CPU platform. An alarm signal for the CPU platform is generated based on the alarm event.

[0045] In detail, the standardized performance data is compared with corresponding preset thresholds. For example, the preset power consumption thresholds are 200W (upper limit), frequency thresholds are 1500MHz (lower limit) and 3000MHz (upper limit), and fan speed thresholds are 2000 RPM (lower limit). If the monitored power consumption data is 210W, exceeding the 200W threshold; the frequency data is 1400MHz, below the 1500MHz lower limit; and the fan speed data is 1800 RPM, below the 2000 RPM lower limit, then these data are determined to be outside the threshold range. When performance data exceeds the threshold, information such as abnormal parameters, abnormal values, and the time of occurrence is recorded to form an event log. For example, when the power consumption data is 210W, an alarm event is generated: Time: XX, Anomaly type: High power consumption, Anomaly value: 210W, Threshold: 200W; when the fan speed is 1800 RPM, an event is generated: Time: XX, Anomaly type: Low fan speed, Anomaly value: 1800 RPM, Threshold: 2000 RPM, thus recording detailed anomaly information and generating alarm events.

[0046] Specifically, key information (anomaly type, anomaly value) in alarm events is encapsulated into standardized signal formats. For example, excessive power consumption (210W) is encapsulated as alarm signal ALM-001: power consumption exceeds the threshold, currently 210W (threshold 200W). Insufficient fan speed (1800 RPM) is encapsulated as ALM-002: fan speed is below the threshold, currently 1800 RPM (threshold 2000 RPM). The generated alarm signals clearly indicate abnormal conditions, providing explicit information for subsequent transmission to monitoring application software and user notification.

[0047] Furthermore, alarm signals and standardized performance data are generated. This data needs to be transmitted to monitoring application software and displayed to users through a visual interface so that users can intuitively understand the CPU's operating status and handle abnormal situations in a timely manner. Therefore, it is necessary to visualize the performance data.

[0048] S5. Transmit the alarm signal and the performance data to the monitoring application software, and display the alarm signal and the performance data on the visual interface of the monitoring application software.

[0049] In this embodiment of the invention, data is transmitted to the monitoring application software and visualized, which can transform abstract data into intuitive charts, dashboards and alarm indicators. This solves the problems of unintuitive data display and users' inability to obtain monitoring results in a timely manner, allowing users to grasp the CPU status in real time and handle anomalies promptly.

[0050] In this embodiment of the invention, transmitting the alarm signal and the performance data to the monitoring application software includes: The alarm signals and performance data are encapsulated into data packets according to the data interface specifications of the monitoring application software. The data packet is sent to the monitoring application software through a preset network socket, and a reception confirmation signal is received from the monitoring application software. If the reception confirmation signal is not received, the data packet is transmitted according to the preset transmission period until the reception confirmation signal is received. When the reception confirmation signal is received, the transmission status of the data packet is determined to be successful.

[0051] In detail, the data interface specification refers to the predefined format standard used by monitoring application software to receive external data, including data encapsulation format, transmission protocol, etc. According to the data interface specification of the monitoring application software, alarm signals and performance data are organized into standard format data packets. These data packets include a data header, data body, checksum, etc. For example, the interface specification requires the data packet header to include the data type (ALM for alarm signals, DATA for performance data) and data length, the data body to contain specific alarm information and performance values, and the checksum to verify data integrity. ALM-001: Power consumption exceeds threshold, current 210W and power consumption: 210W, frequency: 1500MHz, fan speed: 1800 RPM are encapsulated into data packets according to this specification, ensuring that the monitoring application software can correctly parse the data and solving the parsing failure problem caused by inconsistent data transmission formats.

[0052] Specifically, a network socket refers to a pre-established interface used to enable network communication between a monitoring driver and monitoring application software. Inter-process communication (IPC) refers to communication methods used to enable data transmission between different processes (driver processes and application software processes) within the same system, such as pipes and message queues.

[0053] Choose either network sockets or inter-process communication (IPC) to transmit data packets based on the system environment. For example, on the same device, use message queues for IPC to send data packets; between different devices, use TCP network sockets to send data packets; after sending, wait for the monitoring application software to return a reception acknowledgment signal (such as ACK: DATA_RECEIVED), thereby ensuring stable transmission of data packets in different scenarios, and verifying the transmission result by receiving the acknowledgment signal to avoid data loss.

[0054] Furthermore, the acknowledgment signal refers to the signal returned by the monitoring application software to the driver after receiving a data packet, indicating that the data has been successfully received. If no acknowledgment signal is received within a preset time (e.g., 1 second), the driver retransmits the data packet according to a preset transmission period. The transmission period refers to the time interval between retransmissions when the data packet transmission fails, such as 500 milliseconds. If no acknowledgment signal is received within 1 second after the first data packet transmission, it is retransmitted after a 500-millisecond interval until an acknowledgment signal is received or the preset number of retransmissions (e.g., 5 times) is reached. When the driver receives the acknowledgment signal, it marks the data packet transmission status as successful and stops the retransmission operation. If no acknowledgment signal is received after the preset number of retransmissions, it is marked as a transmission failure and an error log is recorded. For example, after receiving the ACK: DATA_RECEIVED signal, the transmission is marked as successful. This explicit transmission status judgment ensures the traceability of data transmission results, while the retransmission mechanism ensures that the data packet can be successfully transmitted to the monitoring application software.

[0055] In this embodiment of the invention, displaying the alarm signal and the performance data on the visual interface of the monitoring application software includes: Extract visualization elements from the alarm signals and performance data; Real-time charts, dashboards, and alarm indicators are generated based on the visualization elements to display the alarm signals and performance data. The real-time charts, dashboards, and alarm indicators are dynamically updated and displayed on the visualization interface.

[0056] In detail, visualization elements refer to key information extracted from alarm signals and performance data for display, such as numerical values, anomaly indicators, and timestamps. For example, from the alarm signal ALM-001: Power consumption exceeds threshold, current 210W (threshold 200W), extract the anomaly type "excessive power consumption," the anomaly value "210W," the threshold "200W," and the timestamp "XX." From the performance data, extract the power consumption "210W," frequency "1500MHz," fan speed "1800 RPM," and the corresponding timestamps. Real-time charts, dashboards, and alarm indicator lights are generated according to preset interface design rules. A dashboard is a simulated instrument interface used to intuitively display current performance data values, such as a power consumption dashboard or a speed dashboard. Alarm indicator lights are light icons used to alert the user to alarm events; different anomaly types correspond to different colored indicator lights (e.g., red for critical alarms, yellow for general alarms). A line chart (X-axis for time, Y-axis for power consumption) is generated based on power consumption data at different time points; a dashboard is generated based on the current power consumption of 210W (the pointer points to the 210W position, and the part exceeding the 200W threshold is displayed in red); a red alarm indicator is generated based on the alarm signal of excessive power consumption, and abnormal information is marked next to the light, thus transforming abstract data into intuitive interface elements.

[0057] Specifically, the monitoring application software updates the content on the visualization interface according to a preset cycle (e.g., 1 second). For example, every second, it updates the trend of the line chart and the pointer position of the dashboard based on newly received performance data; if a new alarm signal is received, it updates the status of the alarm indicator light (e.g., adding a yellow indicator light to indicate that the frequency is too low); if the alarm event has been processed, the corresponding alarm indicator light is turned off. Through dynamic updates, it ensures that users can understand the latest operating status and abnormal conditions of the CPU in real time, and take timely countermeasures, thus achieving real-time and effective monitoring.

[0058] As can be seen, in the above solution, identifying the CPU type and operating system type of the operating environment of the monitoring application software provides an accurate decision-making basis for achieving cross-platform adaptive monitoring; by calling the monitoring program corresponding to the identified CPU type and operating system type in the monitoring program unit, precise matching of monitoring logic and on-demand loading of resources are achieved, avoiding the execution of redundant code; by activating the hardware monitoring interface corresponding to the CPU type according to the monitoring program and loading the target monitoring driver corresponding to the hardware monitoring interface, the correctness of the underlying hardware access instructions and system calls is ensured, thereby directly guaranteeing the accuracy and reliability of data collection from a technical perspective; by monitoring CPU performance data in real time through the target monitoring driver, high-quality basic data is obtained; and alarm analysis is performed on the monitored performance data to generate CPU platform operation alarm signals, realizing intelligent judgment of system status; the operation alarm signals and performance data are transmitted to the monitoring application software and displayed on its visualization interface, providing maintenance personnel with a unified, real-time and accurate data view, greatly improving the efficiency of monitoring data acquisition and the observability of system status.

[0059] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0060] In one embodiment, a CPU-based data analysis device 100 is provided, which corresponds one-to-one with the CPU-based data analysis method described in the above embodiments. For example... Figure 4 As shown, the CPU-based data analysis device 100 includes a type identification module 101, a monitoring program identification module 102, a monitoring driver loading module 103, an alarm signal generation module 104, and a data display module 105. Detailed descriptions of each functional module are as follows: The type identification module 101 is used to identify the CPU type and operating system type of the operating environment in which the monitoring application software is running; The monitoring program identification module 102 is used to call the monitoring program corresponding to the identified CPU type and operating system type in the preset monitoring program unit; The monitoring driver loading module 103 is used to activate the hardware monitoring interface corresponding to the CPU type according to the monitoring program, and load the target monitoring driver corresponding to the hardware monitoring interface. The alarm signal generation module 104 is used to monitor the CPU performance data in real time through the target monitoring driver, perform alarm analysis on the monitored performance data, and generate alarm signals for the CPU platform. The data display module 105 is used to transmit the alarm signal and the performance data to the monitoring application software and display the alarm signal and the performance data on the visual interface of the monitoring application software.

[0061] In one embodiment, the type identification module 101, when performing the task of identifying the CPU type and operating system type of the operating environment where the monitoring application software resides, is used to: The monitoring application software calls the system platform interface based on its operating environment, and extracts the machine architecture information and operating system name information of the operating environment through the system platform interface. The architecture type sequence in the machine architecture information is parsed, and the CPU type of the operating environment of the monitoring application software is determined based on the architecture type sequence. Extract the system identifier from the operating system name information, and match the predefined list of operating system types based on the system identifier; The operating system type of the monitoring application software's running environment is determined based on the matching results.

[0062] In one embodiment, the monitoring program identification module 102, when executing the monitoring program corresponding to the identified CPU type and operating system type in the preset monitoring program unit, is used to: Access the preset monitoring program configuration library based on the identified CPU type and operating system type; Query the monitoring program path associated with the CPU type and operating system type in the monitoring program configuration library; In the preset monitoring program unit, the target location corresponding to the monitoring program is located according to the monitoring program path; The monitoring program corresponding to the CPU type and operating system type is invoked based on the target location.

[0063] In one embodiment, the monitoring driver loading module 103, when executing the monitoring program to activate the hardware monitoring interface corresponding to the CPU type, is used to: The hardware monitoring interface address corresponding to the CPU type is determined based on the monitoring program. Construct the hardware access instruction corresponding to the CPU type based on the hardware monitoring interface address; Send the hardware access command to the hardware monitoring interface corresponding to the CPU type; Receive response data from the hardware monitoring interface, and determine the activation status of the hardware monitoring interface based on the response data.

[0064] In one embodiment, the monitoring driver loading module 103, when executing the loading of the target monitoring driver corresponding to the hardware monitoring interface, is further configured to: Identify the driver type corresponding to the hardware monitoring interface; Select the target monitoring driver corresponding to the driver type from the preset driver repository; Initialize the target monitoring driver and establish a connection between the initialized target monitoring driver and the hardware monitoring interface to obtain the connection status; The target monitoring driver is loaded into the preset system kernel according to the connection status.

[0065] In one embodiment, the alarm signal generation module 104, when executing the real-time monitoring of CPU performance data through the target monitoring driver, is used to: The target monitoring driver sends a data acquisition request to the hardware monitoring interface. Based on the data acquisition request, the raw performance data stream of the CPU is received from the hardware monitoring interface; The raw performance data stream is parsed to obtain CPU power consumption data, frequency data, and fan speed data; The power consumption data, frequency data, and fan speed data are standardized to generate CPU performance data in a unified format.

[0066] In one embodiment, the data display module 105, when transmitting the alarm signal and the performance data to the monitoring application software, is used to: The alarm signals and performance data are encapsulated into data packets according to the data interface specifications of the monitoring application software. The data packet is sent to the monitoring application software through a preset network socket, and a reception confirmation signal is received from the monitoring application software. If the reception confirmation signal is not received, the data packet is transmitted according to the preset transmission period until the reception confirmation signal is received. When the reception confirmation signal is received, the transmission status of the data packet is determined to be successful.

[0067] This invention provides a data analysis device based on a CPU platform. By identifying the CPU type and operating system type of the monitoring application software's operating environment, it provides accurate decision-making basis for cross-platform adaptive monitoring. By calling the monitoring program corresponding to the identified CPU type and operating system type in the monitoring program unit, it achieves precise matching of monitoring logic and on-demand loading of resources, avoiding the execution of redundant code. Activating the hardware monitoring interface corresponding to the CPU type according to the monitoring program and loading the target monitoring driver corresponding to the hardware monitoring interface ensures the correctness of underlying hardware access instructions and system calls, thereby directly guaranteeing the accuracy and reliability of data collection from a technical perspective. Real-time monitoring of CPU performance data through the target monitoring driver yields high-quality basic data. Alarm analysis of the monitored performance data generates CPU platform operation alarm signals, enabling intelligent judgment of system status. The operation alarm signals and performance data are transmitted to the monitoring application software and displayed on its visual interface, providing maintenance personnel with a unified, real-time, and accurate data view, greatly improving the efficiency of monitoring data acquisition and the observability of system status.

[0068] Specific limitations regarding CPU-based data analysis devices can be found in the above description of CPU-based data analysis methods, and will not be repeated here. Each module in the aforementioned CPU-based data analysis device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0069] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a CPU-based data analysis method on the server side.

[0070] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the client-side functions or steps of a CPU-based data analysis method.

[0071] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: Identify the CPU type and operating system type of the environment in which the monitoring application software is running; The monitoring program corresponding to the identified CPU type and operating system type is called in the preset monitoring program unit; The monitoring program activates the hardware monitoring interface corresponding to the CPU type and loads the target monitoring driver corresponding to the hardware monitoring interface. The target monitoring driver monitors CPU performance data in real time, performs alarm analysis on the monitored performance data, and generates alarm signals for the CPU platform. The alarm signal and the performance data are transmitted to the monitoring application software, and the alarm signal and the performance data are displayed on the visual interface of the monitoring application software.

[0072] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Identify the CPU type and operating system type of the environment in which the monitoring application software is running; The monitoring program corresponding to the identified CPU type and operating system type is called in the preset monitoring program unit; The monitoring program activates the hardware monitoring interface corresponding to the CPU type and loads the target monitoring driver corresponding to the hardware monitoring interface. The target monitoring driver monitors CPU performance data in real time, performs alarm analysis on the monitored performance data, and generates alarm signals for the CPU platform. The alarm signal and the performance data are transmitted to the monitoring application software, and the alarm signal and the performance data are displayed on the visual interface of the monitoring application software.

[0073] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0074] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0076] It should be noted that if any software tools or components not belonging to our company appear in the embodiments of this application, they are merely for illustrative purposes and do not represent actual use.

[0077] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A data analysis method based on a CPU platform, characterized in that, include: Identify the CPU type and operating system type of the environment in which the monitoring application software is running; The monitoring program corresponding to the identified CPU type and operating system type is called in the preset monitoring program unit; The monitoring program activates the hardware monitoring interface corresponding to the CPU type and loads the target monitoring driver corresponding to the hardware monitoring interface. The target monitoring driver monitors CPU performance data in real time, performs alarm analysis on the monitored performance data, and generates alarm signals for the CPU platform. The alarm signal and the performance data are transmitted to the monitoring application software, and the alarm signal and the performance data are displayed on the visual interface of the monitoring application software.

2. The data analysis method based on a CPU platform as described in claim 1, characterized in that, The identification of the CPU type and operating system type of the operating environment of the monitoring application software includes: The monitoring application software calls the system platform interface based on its operating environment, and extracts the machine architecture information and operating system name information of the operating environment through the system platform interface. The architecture type sequence in the machine architecture information is parsed, and the CPU type of the operating environment of the monitoring application software is determined based on the architecture type sequence. Extract the system identifier from the operating system name information, and match the predefined list of operating system types based on the system identifier; The operating system type of the monitoring application software's running environment is determined based on the matching results.

3. The data analysis method based on a CPU platform as described in claim 1, characterized in that, The step of calling the monitoring program corresponding to the identified CPU type and operating system type in the preset monitoring program unit includes: Access the preset monitoring program configuration library based on the identified CPU type and operating system type; Query the monitoring program path associated with the CPU type and operating system type in the monitoring program configuration library; In the preset monitoring program unit, the target location corresponding to the monitoring program is located according to the monitoring program path; The monitoring program corresponding to the CPU type and operating system type is invoked based on the target location.

4. The data analysis method based on a CPU platform as described in claim 1, characterized in that, Activating the hardware monitoring interface corresponding to the CPU type according to the monitoring program includes: The hardware monitoring interface address corresponding to the CPU type is determined based on the monitoring program. Construct the hardware access instruction corresponding to the CPU type based on the hardware monitoring interface address; Send the hardware access command to the hardware monitoring interface corresponding to the CPU type; Receive response data from the hardware monitoring interface, and determine the activation status of the hardware monitoring interface based on the response data.

5. The data analysis method based on a CPU platform as described in claim 1, characterized in that, The loading of the target monitoring driver corresponding to the hardware monitoring interface includes: Identify the driver type corresponding to the hardware monitoring interface; Select the target monitoring driver corresponding to the driver type from the preset driver repository; Initialize the target monitoring driver and establish a connection between the initialized target monitoring driver and the hardware monitoring interface to obtain the connection status; The target monitoring driver is loaded into the preset system kernel according to the connection status.

6. The data analysis method based on a CPU platform as described in claim 4, characterized in that, The real-time monitoring of CPU performance data through the target monitoring driver includes: The target monitoring driver sends a data acquisition request to the hardware monitoring interface. Based on the data acquisition request, the raw performance data stream of the CPU is received from the hardware monitoring interface; The raw performance data stream is parsed to obtain CPU power consumption data, frequency data, and fan speed data; The power consumption data, frequency data, and fan speed data are standardized to generate CPU performance data in a unified format.

7. The data analysis method based on a CPU platform as described in claim 1, characterized in that, The step of transmitting the alarm signal and the performance data to the monitoring application software includes: The alarm signals and performance data are encapsulated into data packets according to the data interface specifications of the monitoring application software. The data packet is sent to the monitoring application software through a preset network socket, and a reception confirmation signal is received from the monitoring application software. If the reception confirmation signal is not received, the data packet is transmitted according to the preset transmission period until the reception confirmation signal is received. When the reception confirmation signal is received, the transmission status of the data packet is determined to be successful.

8. A data analysis device based on a CPU platform, characterized in that, include: The type identification module is used to identify the CPU type and operating system type of the operating environment in which the monitoring application software is running; The monitoring program identification module is used to call the monitoring program corresponding to the identified CPU type and operating system type in the preset monitoring program unit; The monitoring driver loading module is used to activate the hardware monitoring interface corresponding to the CPU type according to the monitoring program, and load the target monitoring driver corresponding to the hardware monitoring interface. The alarm signal generation module is used to monitor the CPU performance data in real time through the target monitoring driver, perform alarm analysis on the monitored performance data, and generate alarm signals for the CPU platform. The data display module is used to transmit the alarm signal and the performance data to the monitoring application software and display the alarm signal and the performance data on the visual interface of the monitoring application software.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the CPU-based data analysis method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the CPU-based data analysis method as described in any one of claims 1 to 7.