Operating system fault preview method, device and equipment based on kernel debugging probe and medium
By simulating the synaptic plasticity of biological neural networks through kernel probes, a debug probe network is constructed, and the weight matrix and eigenvalues are dynamically updated. This solves the problems of low efficiency in static probe configuration and difficulty in cross-dimensional fault correlation in kernel debugging, and enables rapid fault location and efficient repair.
Patent Information
- Application Number
- CN202511509616.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-22
AI Technical Summary
Current kernel debugging faces bottlenecks such as low efficiency in configuring static probes, difficulty in cross-dimensional fault correlation, and insufficient reliability of debugging results, making it difficult to quickly locate and repair complex faults. Furthermore, the lack of effective tools for analyzing the correlation between hardware anomalies and software vulnerabilities prolongs the repair cycle.
By simulating the synaptic plasticity of biological neural networks using kernel probes, a debugging probe network is constructed, the fusion weight matrix is dynamically updated, and fault prediction and node localization are performed by combining system feature vectors and feature values. Effective repair solutions are then selected, and the repair solutions are verified by simulating fault scenarios in a preset environment.
It enables dynamic location and analysis of kernel faults, shortens the debugging cycle, improves the accuracy of fault prediction and repair efficiency, reduces the need for multi-team collaboration, and ensures the mathematical consistency of debugging results.
Smart Images

Figure CN120994452A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of system debugging, and in particular to a method, apparatus, device and medium for predicting operating system faults based on kernel debugging probes. Background Technology
[0002] With the continuous development of various operating systems, kernel debugging has become increasingly important. However, current kernel debugging faces many bottlenecks, such as low efficiency in static probe configuration, difficulty in cross-dimensional fault correlation, and insufficient reliability of debugging results.
[0003] Traditional system debugging requires manual pre-setting of probe locations, which makes it difficult to cover the entire scenario when facing complex faults (such as occasional deadlocks), and the debugging cycle can be as long as several weeks. Furthermore, there is a lack of effective tools for correlation analysis between hardware anomalies (such as cache consistency errors) and software vulnerabilities (such as race conditions), resulting in a high percentage of kernel crashes requiring multi-team collaboration for troubleshooting. In addition, scattered debugging logs lack mathematical consistency verification, which often prolongs the repair cycle in open source community collaboration scenarios due to ambiguity in the results. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for operating system fault prediction based on kernel debugging probes. This method can simulate the synaptic plasticity of biological neural networks using kernel probes to construct a debugging probe network, thereby achieving dynamic localization and analysis of kernel faults. The specific solution is as follows: Firstly, this application discloses an operating system fault prediction method based on a kernel debugging probe, including: The preset fusion weight matrix is updated based on the probe triggering status of the preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix; the preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes in the weights of each item in the matrix. A system feature vector is constructed based on the current system data of the target operating system, and system feature values are calculated based on the system feature vector and the updated fusion weight matrix. Based on the system feature values, it is determined whether to perform fault pre-simulation on the target operating system. If fault pre-simulation is performed, the fault node is located based on the system feature vector to determine the target fault node. Several repair schemes corresponding to the target fault node are run in a preset environment, and the target repair scheme is selected from the several repair schemes based on the obtained running results.
[0005] Optionally, before updating the preset fusion weight matrix based on the probe triggering status of a preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix, the method further includes: Read the architecture information of the target operating system and deploy a preset hardware probe corresponding to the architecture information for the target operating system; The preset kernel symbol table of the target operating system is read to determine the corresponding system functions in the preset kernel symbol table, and the corresponding preset software probes are deployed for the system functions. A corresponding sandbox program is constructed based on the preset hardware probe and the preset software probe, and the sandbox program is loaded into the system kernel of the target operating system.
[0006] Optionally, updating the preset fusion weight matrix based on the probe triggering status of a preset kernel debugging probe in the target operating system to obtain an updated fusion weight matrix includes: The sandbox program statistically analyzes the probe triggering status of the preset hardware probes and the preset software probes. Based on the probe triggering status, the activated probes are determined, and the corresponding probe connections are determined. The target weight connection with the highest weight is selected from the probe connections, and the preset fusion weight matrix is updated according to the target weight corresponding to the target weight connection to obtain the updated fusion weight matrix.
[0007] Optionally, the step of constructing a system feature vector based on the current system data of the target operating system, and calculating system feature values based on the system feature vector and the updated fusion weight matrix, includes: Hardware feature data in the target operating system is read using a preset hardware read instruction, and software feature data in the target operating system is collected using a preset acquisition function; Calculate the mutual information and correlation coefficient between the hardware feature data and the software feature data, and determine the correlation features between the hardware feature data and the software feature data based on the mutual information and the correlation coefficient; A target fusion vector is constructed based on the associated features, the hardware feature data, and the software feature data, and the target fusion vector is used as the system feature vector. The system feature vector and the updated fusion weight matrix are multiplied to obtain the system feature values.
[0008] Optionally, the step of determining whether to perform fault pre-simulation on the target operating system based on the system feature values, and if fault pre-simulation is performed, then locating the node to be faulted based on the system feature vector to determine the target node to be faulted, includes: Determine whether the system feature value is greater than a preset feature value threshold; If the system characteristic value is greater than the preset characteristic value threshold, then it is determined to perform a fault simulation on the target operating system; The system feature vector is divided into several sub-vectors, and the several sub-vectors are encoded into several corresponding topological qubits; Perform a quantum Fourier transform on the aforementioned quantum topological bits to obtain the corresponding quantum states; The quantum states are reconstructed using maximum likelihood estimation to determine the pre-failure system state trajectory of the target operating system. A fault probability heatmap is generated based on the system state trajectory before the fault, and the target operating system node to be faulted is determined based on the fault probability heatmap to obtain the target node to be faulted.
[0009] Optionally, the step of running several repair schemes corresponding to the target faulty node in a preset environment, and selecting the target repair scheme from the several repair schemes based on the obtained running results, includes: Based on the fault type corresponding to the target fault node, and according to the fault type, several repair schemes corresponding to the fault type are selected from several preset repair schemes. Run the aforementioned repair schemes in a preset environment and determine several evaluation indicators corresponding to the running of the aforementioned repair schemes; Select target repair solutions that meet the preset evaluation conditions from the aforementioned evaluation indicators.
[0010] Optionally, the operating system fault prediction method based on kernel debug probes further includes: A debug data package is generated based on the kernel version of the target operating system, system configuration information, hash value corresponding to the system feature vector, target repair scheme, and current system timestamp. Calculate the root hash value corresponding to the debug data packet, and perform consensus arbitration on the root hash value to determine whether to perform on-chain operation on the root hash value based on the obtained arbitration result; If the root hash value is put on-chain, the root hash value will be updated to the preset blockchain.
[0011] Secondly, this application discloses an operating system fault prediction device based on a kernel debugging probe, comprising: The matrix update module is used to update the preset fusion weight matrix based on the probe triggering status of the preset kernel debugging probe in the target operating system, so as to obtain the updated fusion weight matrix; the preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes of each weight in the matrix. The feature value calculation module is used to construct a system feature vector based on the current system data of the target operating system, and to calculate system feature values based on the system feature vector and the updated fusion weight matrix. The node localization module is used to determine whether to perform fault pre-simulation on the target operating system based on the system feature values. If fault pre-simulation is performed, the node to be faulted is located based on the system feature vector to determine the target node to be faulted. The solution filtering module is used to run several repair solutions corresponding to the target fault node in a preset environment, and to filter out the target repair solution from the several repair solutions based on the obtained running results.
[0012] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute the computer program to implement the operating system fault prediction method based on kernel debug probes as described above.
[0013] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned operating system fault prediction method based on a kernel debugging probe.
[0014] In this application, a preset fusion weight matrix can be updated based on the probe triggering status of a preset kernel debugging probe in the target operating system to obtain an updated fusion weight matrix. The preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes in the weights of each item within the matrix. A system feature vector is constructed based on the current system data of the target operating system, and system feature values are calculated based on the system feature vector and the updated fusion weight matrix. Based on the system feature values, it is determined whether to perform fault pre-simulation on the target operating system. If fault pre-simulation is performed, the fault node is located based on the system feature vector to determine the target fault node. Several repair schemes corresponding to the target fault node are run in a preset environment, and the target repair scheme is selected from the several repair schemes based on the obtained running results. Thus, the preset fusion weight matrix can be updated based on the probe triggering status of the preset kernel debugging probe in the target operating system, then a system feature vector can be constructed based on the system data, and system feature values can be calculated based on the system feature vector and the obtained updated fusion weight matrix. After determining whether to perform fault pre-simulation on the target operating system based on the system feature values, the fault node is located based on the system feature vector, and the target repair scheme corresponding to the fault node is selected in the preset environment. In this way, the synaptic plasticity of biological neural networks can be simulated by kernel probes to build a debugging probe network, enabling dynamic localization and analysis of kernel faults. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This application discloses a flowchart of an operating system fault prediction method based on a kernel debugging probe. Figure 2 This is a schematic diagram of an operating system fault pre-simulation structure based on a kernel debugging probe disclosed in this application; Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0017] 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 embodiments of the present invention, and not all embodiments. 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.
[0018] Traditional system debugging requires manual pre-setting of probe locations, which makes it difficult to cover the entire scenario when facing complex faults (such as occasional deadlocks), and the debugging cycle can be as long as several weeks. Furthermore, there is a lack of effective tools for correlation analysis between hardware anomalies (such as cache consistency errors) and software vulnerabilities (such as race conditions), resulting in a high percentage of kernel crashes requiring multi-team collaboration for troubleshooting. In addition, scattered debugging logs lack mathematical consistency verification, which often prolongs the repair cycle in open source community collaboration scenarios due to ambiguity in the results.
[0019] To overcome the aforementioned technical problems, this application discloses an operating system fault prediction method, apparatus, device, and medium based on kernel debugging probes. It can simulate the synaptic plasticity of biological neural networks through kernel probes, construct a debugging probe network, and realize the dynamic localization and analysis of kernel faults.
[0020] See Figure 1 As shown, this embodiment of the invention discloses an operating system fault prediction method based on a kernel debugging probe, including: Step S11: Update the preset fusion weight matrix based on the probe triggering status of the preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix; the preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes in the weights of each item in the matrix.
[0021] In this embodiment, before updating the preset fusion weight matrix, a kernel debugging probe needs to be set up in the target operating system so that the fusion weight matrix can be updated according to the triggering of the kernel debugging probe. Specifically, hardware probes need to be deployed and software probes need to be dynamically generated. Regarding the deployment of hardware probes, the architecture information of the target operating system needs to be read, and preset hardware probes corresponding to the architecture information need to be deployed for the target operating system. For example, microarchitecture information can be obtained by reading the CPUID (Central Processing Unit Identification) instruction, and corresponding probes can be automatically deployed. Depending on the platform, L1d (L1 Data Cache) cache, branch prediction related probes, or NEON instruction unit (Advanced SIMD, Single Instruction Multiple Data Stream), cache consistency probes, etc., can be deployed. It should be noted that the probe uses a neuromorphic synaptic network to simulate the plasticity of biological neural network synapses, enabling dynamic localization and analysis of kernel faults. Specifically, a branch prediction neuron is added at the hardware level. The branch prediction error rate is collected using Intel PT (Processor Tracing) technology and mapped to the neuron activation value "a = number of prediction errors / total number of branches". When "a > 0.1", a branch prediction anomaly alarm is triggered. In addition, a cache line filling neuron is integrated into the hardware. The L1d cache line filling frequency is monitored using PMC (Performance Monitoring Counter). When the number of fillings exceeds 50 times within 100 consecutive cycles, the cache failure-related probe is activated.
[0022] The dynamic generation of software probes involves reading the target operating system's preset kernel symbol table to identify corresponding system functions. Based on these system functions, pre-defined software probes are deployed. For example, the kernel symbol table is analyzed to automatically instrument functions related to memory management, process scheduling, and system calls. Memory management functions include, but are not limited to, "kmalloc" and "kfree"; process scheduling functions include, but are not limited to, "schedule" and "...". "functions, etc.; system call related functions include, but are not limited to, " "function," "Functions, etc. At the software level, adaptive instrumentation based on eBPF (extended Berkeley Packet Filter) is used, analyzed by the LLVM (Low Level Virtual Machine) compiler, to automatically identify high-risk functions (such as..." The probes are dynamically deployed at runtime, and the instrumentation overhead is controlled to <1% of CPU (Central Processing Unit) utilization. Furthermore, asynchronous probe sampling can be performed at the software level. For low-probability events (such as kernel panics), a sparse sampling strategy is adopted, and event characteristics are recorded through probabilistic hashing, reducing invalid sampling data by 90%.
[0023] Finally, a corresponding sandbox program needs to be built based on the preset hardware probes and preset software probes, and then the sandbox program is loaded into the system kernel of the target operating system. It should be noted that the sandbox program is an eBPF program, and the trigger conditions for the probes can be set, such as the number of function calls being greater than 1000 times / second.
[0024] Furthermore, the preset fusion weight matrix needs to be updated based on the statistical probe triggering situation. The preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes in the weights of each item in the matrix. The preset fusion weight matrix is initialized using the Xavier initialization method, assigning an initial weight of 0.7 to the hardware-software cross-dimensional connection to strengthen cross-layer correlation. The preset fusion weight matrix satisfies the following formula: ; in, This represents a single weight element in the weight matrix W, specifically the value connecting the i-th input neuron (or feature) to the j-th output neuron (or feature). In neural networks, the weight matrix defines the connection strength between layers. This indicates the number of input neurons (i.e., the input dimension of this layer). In neural networks, this typically refers to the number of units in the previous layer (or input layer). This represents the number of output neurons (i.e., the output dimension of this layer). In neural networks, this typically refers to the number of units in the current layer (or output layer). This allows the Xavier initialization method to maintain consistent variance in the weight initialization, preventing gradient vanishing or exploding during training. By adjusting the range of weights based on the number of input and output neurons, it ensures effective signal propagation within the network.
[0025] When updating weights, it's necessary to statistically analyze the triggering status of preset hardware and software probes using the sandbox program. Then, based on the triggering status, activated probes are identified, along with their corresponding probe connections. Finally, the target weight connection with the highest weight is selected from these connections, and the preset fusion weight matrix is updated based on the target weight of this connection to obtain the updated fusion weight matrix. It should be noted that when multiple probes are activated simultaneously, only the probe connection with the highest weight is retained; the remaining weights are adjusted accordingly. "Attenuation, among which, (This is a decay factor with a value of 0.1). For example, in memory leak detection, only probes associated with the "kmalloc" function are enhanced, while interference signals from irrelevant modules are suppressed.
[0026] It should be noted that the weights in the matrix are dynamically optimized through Heb learning. This requires real-time weight updates, weight normalization, and weight decay. Regarding real-time weight updates, when probes i and j are activated simultaneously, the following Python command is executed: ; ; ; # Symmetrical connection. Where, and is the activation value of probe i and probe j (the value range is usually from 0 to 1); delta is the weight adjustment amount; The connection weights from probe i to probe j; Let represent the connection weights (symmetric connections) from probe j to probe i. When both probes are activated simultaneously, the connection weights between them are enhanced, and the magnitude of this enhancement depends on the preset learning rate and the activation strength of the two probes. This is a two-way symmetric update. and All have increased. Taking a specific scenario as an example, Activation value of probe =0.8, the activation value of the schedule probe If the weight is 0.9, then the connection weight between the two probes increases by 0.072. This means that frequently co-activated components should establish stronger connections, mimicking the biological process of neural pathway strengthening in the brain, thus enhancing the accuracy of weight updates.
[0027] Furthermore, regarding the normalization and decay of weights, L2 normalization is performed every 100ms: And background probe attenuation (The attenuation coefficient of the inactive probe), and when the CPU temperature is greater than 70 degrees Celsius, the attenuation coefficient increases to 0.995, slowing down weight decay. It should be noted that the weight change is also related to the hardware temperature of the device corresponding to the operating system, which requires mapping temperature to the learning rate. A temperature-learning rate mapping function can be defined as follows: ,in The baseline learning rate is k=2, where k is the temperature sensitivity coefficient. The threshold temperature is the room temperature. This is the critical temperature. When the CPU temperature exceeds... At that time, the learning rate is automatically increased to 1.8 times the baseline value to accelerate the focusing of fault probes in high-temperature environments.
[0028] Step S12: Construct a system feature vector based on the current system data of the target operating system, and calculate system feature values based on the system feature vector and the updated fusion weight matrix.
[0029] In this embodiment, it is necessary to construct a system feature vector based on the current system data of the operating system, and then calculate the system feature value based on the constructed feature vector and the updated fusion matrix. Specifically, the process first requires reading hardware characteristic data from the target operating system using preset hardware read instructions, and then collecting software characteristic data from the target operating system using preset acquisition functions. Specifically, the RDPMC (Read Performance Monitoring Counter) instruction is used to read the PMC counter at a sampling frequency of 1MHz. The hardware characteristic data includes CPU core metrics, cache system metrics, and bus and memory metrics. CPU core metrics include CPU temperature, branch prediction error rate (collected using Intel PT technology and mapped to neuron activation value a = number of prediction errors / total number of branches), and AVX-512 (Advanced Vector Extensions 512) instruction power consumption / latency (simulated using a quantum dot cellular Automaton model). Cache system metrics include cache hit rates at each cache level, cache line fill counts, and cache coherence protocol status. Bus and memory metrics include memory bandwidth utilization, DRAM (Dynamic Random Access Memory) refresh latency, and PCIe (Peripheral Component Interconnect Express) bus transmission error count. Furthermore, it is necessary to asynchronously collect function call stacks using eBPF probes, reading software data at a sampling rate of 10kHz. The software feature data includes kernel function call data, control flow and data flow data, and fault event data. Specifically, the kernel function call data includes the number of calls / parameters to memory management functions (kmalloc / kfree) and process scheduling functions (kmalloc / kfree). The triggering frequency of ) and system calls ( The data includes return code anomaly rates, control flow and data flow data (dynamic Bayesian networks of function calls, probability transition matrices from syscall to kernel function to driver function), memory pointer flow (encrypted and traced via Intel SGX (Software Guard Extension) to identify dangerous paths from uninitialized pointers to function parameters), and fault event data (kernel panic logs, deadlock detection signals, and spinlock holding time (abnormal holding exceeding a threshold triggers probe sampling). It should be noted that after processing hardware and software data, corresponding hardware and software feature data can be obtained. Furthermore, wavelet packet decomposition is performed on the hardware data to extract the five highest-energy frequency bands to obtain hardware feature data. Based on the software data, a TF-IDF (termfrequency–inverse document frequency) vector of function calls is constructed to identify high-frequency abnormal call patterns and obtain software feature data.
[0030] Furthermore, it is necessary to calculate the mutual information and correlation coefficients between hardware and software feature data, and determine the correlation features between them based on these coefficients. Then, a target fusion vector is constructed based on these correlation features, hardware feature data, and software feature data, and this target fusion vector is used as the system feature vector, which can be represented as V. It should be noted that hardware cache failures are related to the triggering timing of the software memory allocation function (kmalloc), branch prediction errors are related to the execution frequency of kernel conditional statements, and CPU high temperatures are related to the resource utilization of driver modules (such as graphics card drivers). Therefore, it is necessary to calculate the correlation features between hardware and software feature data. The target fusion vector V = [hardware features; software features; correlation features], with a total of 128 dimensions. Finally, it is necessary to calculate the product between the system feature vector and the updated fusion weight matrix to obtain the system eigenvalue, which can be expressed as f(V) = V·W.
[0031] Step S13: Determine whether to perform fault pre-simulation on the target operating system based on the system feature values. If fault pre-simulation is performed, locate the node to be faulted based on the system feature vector to determine the target node to be faulted.
[0032] In this embodiment, the first step is to determine the feature value. Specifically, it needs to be determined whether the system feature value is greater than a preset feature value threshold. If the system feature value is greater than the preset feature value threshold, then a fault simulation is performed on the target operating system. The preset feature value threshold is 3. ,and The standard deviation is the historical mean. Then, the system feature vector needs to be divided into several sub-vectors, and these sub-vectors are encoded into corresponding topological qubits. In this embodiment, the fused feature vector V is divided into 16 8-dimensional sub-vectors, each encoded as a topological qubit. A quantum Fourier transform is then performed on these topological qubits to obtain corresponding quantum states. It should be noted that the quantum Fourier transform can enhance the quantum entanglement effect of the features. Further, a quantum Fourier transform is performed on these topological qubits to obtain corresponding quantum states. Then, the quantum states are reconstructed using maximum likelihood estimation to determine the pre-failure system state trajectory of the target operating system. A failure probability heatmap is generated based on the pre-failure system state trajectory, and the target failure node of the target operating system is determined based on the failure probability heatmap. In this way, through signal fusion of hardware and software, hardware and software coordination vulnerabilities can be reduced, and nodes that may fail in the current state of the system can be identified.
[0033] Step S14: Run several repair schemes corresponding to the target fault node in a preset environment, and select the target repair scheme from the several repair schemes based on the obtained running results.
[0034] In this embodiment, several repair schemes corresponding to the target fault node need to be run in a preset environment, and the target repair scheme is selected from the several repair schemes based on the obtained running results. Specifically, it is necessary to select several repair schemes corresponding to the fault type based on the fault type of the target fault node. It should be noted that the preset environment is a digital twin pre-training platform, and the platform builds the Intel Alder Lake quantum dot Cellular Automaton (QCA, Qualitative Comparative Analysis) model to accurately simulate the energy consumption and latency characteristics of AVX-512 instructions. It can also realize the metaverse mapping of compilation optimization, encode the 27 optimization options of GCC-03 (GNU Compiler Collection, GNU compiler suite 03 optimization options) into adjustable parameters of digital twin, and pre-simulate the fault performance under different compilation configurations. Furthermore, a conditional generative adversarial network (cGAN) can be designed to generate fault scenarios. Inputting hardware configuration and software version, it can output hundreds of thousands of simulated fault probe activation modes. Through multiple iterations, the accuracy of simulated features can be improved. Further, several remediation schemes need to be run in a preset environment, and several evaluation metrics corresponding to these schemes need to be determined. These metrics include resource utilization improvement rate, fault recurrence probability, and system performance overhead. Then, target remediation schemes that meet preset evaluation conditions are selected from these metrics. These preset evaluation conditions can be set according to user needs. In this way, pre-training can effectively improve the success rate of predictive debugging of vulnerabilities, and through fault simulation and scheme selection, real operating system failures can be effectively avoided.
[0035] In this embodiment, the preset fusion weight matrix can be updated based on the probe triggering status of the preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix. The preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes in the weights of each item in the matrix. A system feature vector is constructed based on the current system data of the target operating system, and system feature values are calculated based on the system feature vector and the updated fusion weight matrix. Based on the system feature values, it is determined whether to perform fault pre-simulation on the target operating system. If fault pre-simulation is performed, the fault node is located based on the system feature vector to determine the target fault node. Several repair schemes corresponding to the target fault node are run in a preset environment, and the target repair scheme is selected from the several repair schemes based on the obtained running results. Thus, the preset fusion weight matrix can be updated based on the probe triggering status of the preset kernel debugging probe in the target operating system, then a system feature vector is constructed based on the system data, and system feature values are calculated based on the system feature vector and the obtained updated fusion weight matrix. After determining whether to perform fault pre-simulation on the target operating system based on the system feature values, the fault node is located based on the system feature vector, and the target repair scheme corresponding to the fault node is selected in the preset environment. In this way, kernel probes can simulate the synaptic plasticity of biological neural networks, construct a debug probe network, and achieve dynamic location and analysis of kernel faults to prevent real operating system failures.
[0036] As a preferred embodiment, the relevant information from this system fault simulation can be stored in the blockchain. Specifically, a debug data package can be generated based on the target operating system's kernel version, system configuration information, the hash value corresponding to the system feature vector, the target repair plan, and the current system timestamp. The root hash value corresponding to the debug data package is calculated, and consensus arbitration is performed on the root hash value. The arbitration result determines whether to upload the root hash value to the blockchain. If the root hash value is uploaded, it is updated to the preset blockchain. It should be noted that the generated debug data package is the basic data unit for blockchain notarization. It is generated based on key data from the entire fault diagnosis process, ensuring data integrity, traceability, and mathematical consistency, providing a unified data benchmark for distributed collaborative debugging. Furthermore, data uploading to the blockchain requires consensus arbitration; uploading only occurs if consensus arbitration is successful. Incremental verification is also required, comparing the function fingerprints of the old and new kernel versions. Incremental verification is only performed on the probe weights of the changed functions. Specifically, a difference list needs to be generated, and incremental verification is performed on the probe weights related to the difference list. The verification results also need to be uploaded to the blockchain, updating the debug record status to "verified."
[0037] See Figure 2As shown, this embodiment of the invention discloses an operating system fault prediction device based on a kernel debugging probe, comprising: The matrix update module 11 is used to update the preset fusion weight matrix based on the probe triggering status of the preset kernel debugging probe in the target operating system, so as to obtain the updated fusion weight matrix; the preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes of each weight in the matrix. The feature value calculation module 12 is used to construct a system feature vector based on the current system data of the target operating system, and to calculate system feature values based on the system feature vector and the updated fusion weight matrix. The node positioning module 13 is used to determine whether to perform fault pre-simulation on the target operating system based on the system feature value. If fault pre-simulation is performed, the node to be faulted is located based on the system feature vector to determine the target node to be faulted. The scheme selection module 14 is used to run several repair schemes corresponding to the target fault node in a preset environment, and select the target repair scheme from the several repair schemes based on the obtained running results.
[0038] In this embodiment, the preset fusion weight matrix can be updated based on the probe triggering status of the preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix. The preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes in the weights of each item in the matrix. A system feature vector is constructed based on the current system data of the target operating system, and system feature values are calculated based on the system feature vector and the updated fusion weight matrix. Based on the system feature values, it is determined whether to perform fault pre-simulation on the target operating system. If fault pre-simulation is performed, the fault node is located based on the system feature vector to determine the target fault node. Several repair schemes corresponding to the target fault node are run in a preset environment, and the target repair scheme is selected from the several repair schemes based on the obtained running results. Thus, the preset fusion weight matrix can be updated based on the probe triggering status of the preset kernel debugging probe in the target operating system, then a system feature vector is constructed based on the system data, and system feature values are calculated based on the system feature vector and the obtained updated fusion weight matrix. After determining whether to perform fault pre-simulation on the target operating system based on the system feature values, the fault node is located based on the system feature vector, and the target repair scheme corresponding to the fault node is selected in the preset environment. In this way, the synaptic plasticity of biological neural networks can be simulated by kernel probes to build a debugging probe network, enabling dynamic localization and analysis of kernel faults.
[0039] In some embodiments, the operating system fault prediction device based on kernel debugging probes may further include: The first probe deployment unit is used to read the architecture information of the target operating system and deploy a preset hardware probe corresponding to the architecture information for the target operating system. The second probe deployment unit is used to read the preset kernel symbol table of the target operating system to determine the corresponding system functions in the preset kernel symbol table, and deploy corresponding preset software probes for the system functions. The program loading unit is used to construct a corresponding sandbox program based on the preset hardware probe and the preset software probe, and load the sandbox program into the system kernel of the target operating system.
[0040] In some embodiments, the matrix update module 11 may specifically include: The information statistics unit is used to count the probe triggering status of the preset hardware probes and the preset software probes through the sandbox program; The probe connection determination unit is used to determine the activated probes based on the probe triggering status, and to determine a number of probe connections corresponding to the activated probes. The matrix update unit is used to select the target weight connection with the highest weight from the plurality of probe connections, and update the preset fusion weight matrix according to the target weight corresponding to the target weight connection to obtain the updated fusion weight matrix.
[0041] In some embodiments, the feature value calculation module 12 may specifically include: The feature acquisition unit is used to read hardware feature data in the target operating system through a preset hardware read instruction, and to acquire software feature data in the target operating system through a preset acquisition function; The association feature determination unit is used to calculate the mutual information and correlation coefficient between the hardware feature data and the software feature data, and to determine the association features between the hardware feature data and the software feature data based on the mutual information and the correlation coefficient. The feature vector determination unit is used to construct a target fusion vector based on the associated features, the hardware feature data, and the software feature data, and to use the target fusion vector as the system feature vector. The eigenvalue calculation unit is used to calculate the product between the system eigenvector and the updated fusion weight matrix to obtain the system eigenvalue.
[0042] In some embodiments, the node positioning module 13 may specifically include: A data comparison unit is used to determine whether the system feature value is greater than a preset feature value threshold. The fault prediction unit is used to determine to perform fault prediction on the target operating system if the system characteristic value is greater than the preset characteristic value threshold. A vector encoding unit is used to divide the system feature vector into several sub-vectors and encode the several sub-vectors into several corresponding topological qubits; A data conversion unit is used to perform quantum Fourier transform on the plurality of quantum topological bits to obtain the corresponding plurality of quantum states; A state trajectory determination unit is used to reconstruct the plurality of quantum states through maximum likelihood estimation in order to determine the system state trajectory of the target operating system before failure. The fault node location unit is used to generate a fault probability heatmap based on the system state trajectory before the fault, and to determine the fault node of the target operating system based on the fault probability heatmap, so as to obtain the target fault node.
[0043] In some embodiments, the scheme selection module 14 may specifically include: The repair scheme determination unit is used to select a number of repair schemes corresponding to the fault type from a number of preset repair schemes based on the fault type corresponding to the target fault node. The repair scheme operation unit is used to run the plurality of repair schemes in a preset environment and determine a plurality of evaluation indicators corresponding to the running of the plurality of repair schemes; The repair scheme screening unit is used to screen out target repair schemes that meet preset evaluation conditions from the several evaluation indicators.
[0044] In some embodiments, the operating system fault prediction device based on kernel debugging probes may further include: The data packet generation unit is used to generate debug data packets based on the kernel version of the target operating system, system configuration information, hash value corresponding to the system feature vector, target repair scheme, and current system timestamp. The consensus arbitration unit is used to calculate the root hash value corresponding to the debug data packet and to perform consensus arbitration on the root hash value, so as to determine whether to perform on-chain operation on the root hash value based on the arbitration result. The data upload unit is used to update the root hash value to a preset blockchain if an upload operation is performed on the root hash value.
[0045] Furthermore, embodiments of this application also disclose an electronic device, Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0046] Figure 3This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the operating system fault prediction method based on kernel debugging probes disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0047] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0048] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0049] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the operating system fault prediction method based on a kernel debugging probe executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0050] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed operating system fault prediction method based on a kernel debugging probe. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0051] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0052] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0053] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0054] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0055] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for predicting operating system faults based on kernel debugging probes, characterized in that, include: The preset fusion weight matrix is updated based on the probe triggering status of the preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix. The preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes in the weights of each item in the matrix; A system feature vector is constructed based on the current system data of the target operating system, and system feature values are calculated based on the system feature vector and the updated fusion weight matrix. Based on the system feature values, it is determined whether to perform fault pre-simulation on the target operating system. If fault pre-simulation is performed, the fault node is located based on the system feature vector to determine the target fault node. Several repair schemes corresponding to the target fault node are run in a preset environment, and the target repair scheme is selected from the several repair schemes based on the obtained running results.
2. The operating system fault prediction method based on kernel debugging probes according to claim 1, characterized in that, Before updating the preset fusion weight matrix based on the probe triggering status of the preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix, the process also includes: Read the architecture information of the target operating system and deploy a preset hardware probe corresponding to the architecture information for the target operating system; The preset kernel symbol table of the target operating system is read to determine the corresponding system functions in the preset kernel symbol table, and the corresponding preset software probes are deployed for the system functions. A corresponding sandbox program is constructed based on the preset hardware probe and the preset software probe, and the sandbox program is loaded into the system kernel of the target operating system.
3. The operating system fault prediction method based on kernel debugging probes according to claim 2, characterized in that, The step of updating the preset fusion weight matrix based on the probe triggering status of the preset kernel debugging probe in the target operating system to obtain the updated fusion weight matrix includes: The sandbox program statistically analyzes the probe triggering status of the preset hardware probes and the preset software probes. Based on the probe triggering status, the activated probes are determined, and the corresponding probe connections are determined. The target weight connection with the highest weight is selected from the probe connections, and the preset fusion weight matrix is updated according to the target weight corresponding to the target weight connection to obtain the updated fusion weight matrix.
4. The operating system fault prediction method based on kernel debugging probes according to claim 1, characterized in that, The step of constructing a system feature vector based on the current system data of the target operating system, and calculating system feature values based on the system feature vector and the updated fusion weight matrix, includes: Hardware feature data in the target operating system is read using a preset hardware read instruction, and software feature data in the target operating system is collected using a preset acquisition function; Calculate the mutual information and correlation coefficient between the hardware feature data and the software feature data, and determine the correlation features between the hardware feature data and the software feature data based on the mutual information and the correlation coefficient; A target fusion vector is constructed based on the associated features, the hardware feature data, and the software feature data, and the target fusion vector is used as the system feature vector. The system feature vector and the updated fusion weight matrix are multiplied to obtain the system feature values.
5. The operating system fault prediction method based on kernel debugging probes according to claim 1, characterized in that, The step of determining whether to perform fault pre-simulation on the target operating system based on the system feature values, and if fault pre-simulation is performed, then locating the node to be faulted based on the system feature vector to determine the target node to be faulted, includes: Determine whether the system feature value is greater than a preset feature value threshold; If the system characteristic value is greater than the preset characteristic value threshold, then it is determined to perform a fault simulation on the target operating system; The system feature vector is divided into several sub-vectors, and the several sub-vectors are encoded into several corresponding topological qubits; Perform a quantum Fourier transform on the aforementioned quantum topological bits to obtain the corresponding quantum states; The quantum states are reconstructed using maximum likelihood estimation to determine the pre-failure system state trajectory of the target operating system. A fault probability heatmap is generated based on the system state trajectory before the fault, and the target operating system node to be faulted is determined based on the fault probability heatmap to obtain the target node to be faulted.
6. The operating system fault prediction method based on kernel debugging probes according to claim 1, characterized in that, The step of running several repair schemes corresponding to the target faulty node in a preset environment, and selecting the target repair scheme from the several repair schemes based on the obtained running results, includes: Based on the fault type corresponding to the target fault node, and according to the fault type, several repair schemes corresponding to the fault type are selected from several preset repair schemes. Run the aforementioned repair schemes in a preset environment and determine several evaluation indicators corresponding to the running of the aforementioned repair schemes; Select target repair solutions that meet the preset evaluation conditions from the aforementioned evaluation indicators.
7. The operating system fault prediction method based on kernel debugging probes according to any one of claims 1 to 6, characterized in that, Also includes: A debug data package is generated based on the kernel version of the target operating system, system configuration information, hash value corresponding to the system feature vector, target repair scheme, and current system timestamp. Calculate the root hash value corresponding to the debug data packet, and perform consensus arbitration on the root hash value to determine whether to perform on-chain operation on the root hash value based on the obtained arbitration result; If the root hash value is put on-chain, the root hash value will be updated to the preset blockchain.
8. An operating system fault prediction device based on a kernel debugging probe, characterized in that, include: The matrix update module is used to update the preset fusion weight matrix based on the probe triggering status of the preset kernel debugging probe in the target operating system, so as to obtain the updated fusion weight matrix; the preset fusion weight matrix is a matrix that represents the fault characteristics of each parameter of the target operating system through the changes of each weight in the matrix. The feature value calculation module is used to construct a system feature vector based on the current system data of the target operating system, and to calculate system feature values based on the system feature vector and the updated fusion weight matrix. The node localization module is used to determine whether to perform fault pre-simulation on the target operating system based on the system feature values. If fault pre-simulation is performed, the node to be faulted is located based on the system feature vector to determine the target node to be faulted. The solution filtering module is used to run several repair solutions corresponding to the target fault node in a preset environment, and to filter out the target repair solution from the several repair solutions based on the obtained running results.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the operating system fault prediction method based on a kernel debug probe as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs, wherein the computer programs, when executed by a processor, implement the operating system fault prediction method based on a kernel debug probe as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Neural mimicry calculation-based online neuron classification method
CN114925734A
Business request exception delimitation analysis method and system, electronic equipment and storage medium
CN119088612A
AI-based domestic environment application offline deployment method, equipment and medium
CN120406983A
Server test method, electronic equipment, storage medium and program product
CN120639659A
Fault identification method and device
CN120671087A