Kernel debugging probe-based operating system fault rehearsal method and device, equipment and medium
By simulating the synaptic plasticity of biological neural networks through kernel probes, a debug probe network is constructed, which solves the problems of low efficiency in static probe configuration and difficulty in cross-dimensional fault correlation in kernel debugging. It realizes dynamic localization and analysis of kernel faults, improves debugging cycle and repair efficiency, and ensures the credibility and consistency of debugging results.
Patent Information
- Application Number
- CN202511509616.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-22
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-10-22
AI Technical Summary
Existing kernel debugging faces challenges such as inefficient static probe configuration, difficulty in cross-dimensional fault correlation, and insufficient reliability of debugging results. This makes it difficult to cover all scenarios for complex faults, resulting in long debugging cycles. There is a lack of effective tools for analyzing the correlation between hardware anomalies and software vulnerabilities. There is a need for multi-team collaborative troubleshooting, and scattered debugging logs lack mathematical consistency verification, which prolongs the repair cycle.
By simulating the synaptic plasticity of biological neural networks through kernel probes, a debugging probe network is constructed. The fusion weight matrix is updated based on the probe triggering situation to build system feature vectors, perform fault pre-simulation, dynamically locate nodes to be faulty, and screen repair solutions in a preset environment. Debugging data is stored using blockchain.
It enables dynamic location and analysis of kernel faults, shortens the debugging cycle, improves the accuracy of fault prediction and repair efficiency, and ensures the mathematical consistency of debugging results and the data uniformity of distributed collaboration.
Smart Images

Figure CN120994452B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of system debugging, in particular to an operating system fault rehearsal method and device based on kernel debugging probes, equipment and medium. BACKGROUND
[0002] With the continuous development of various operating systems, kernel debugging has become increasingly important, but current kernel debugging faces many bottlenecks, such as low efficiency of static probe configuration, difficulty in cross-dimension fault correlation, and insufficient reliability of debugging results.
[0003] Traditional system debugging requires manual presetting of probe positions, and it is difficult to cover all scenarios when facing complex faults (such as occasional deadlocks), and the debugging period can last for several weeks. Moreover, there is a lack of effective tools for analyzing the correlation between hardware exceptions (such as cache consistency errors) and software vulnerabilities (such as race conditions), resulting in a high proportion of kernel crashes that require multiple teams to collaborate to troubleshoot. Furthermore, the lack of mathematical consistency verification of scattered debugging logs often prolongs the repair period due to ambiguous results in open source community collaboration scenarios. SUMMARY
[0004] Therefore, the purpose of the present application is to provide an operating system fault rehearsal method and device based on kernel debugging probes, which can simulate biological neural network synaptic plasticity through kernel probes, construct a debugging probe network, and realize dynamic positioning and analysis of kernel faults. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses an operating system fault rehearsal method based on kernel debugging probes, comprising:
[0006] updating a preset fusion weight matrix based on the probe triggering condition of the preset kernel debugging probe in the target operating system to obtain an updated fusion weight matrix; the preset fusion weight matrix is a matrix representing the fault characteristics of each parameter of the target operating system through the changes of each weight in the matrix;
[0007] constructing a system feature vector according to the current system data of the target operating system, and calculating a system feature value according to the system feature vector and the updated fusion weight matrix;
[0008] determining whether to perform fault rehearsal on the target operating system based on the system feature value, and if so, locating a fault node to be located based on the system feature vector to determine a target fault node to be located;
[0009] running a plurality of repair schemes corresponding to the target fault node to be located in a preset environment, and selecting a target repair scheme from the plurality of repair schemes based on the obtained running results.
[0010] Optionally, the preset fusion weight matrix is updated based on the probe triggering condition of the preset kernel debugging probe in the target operating system to obtain an updated fusion weight matrix.
[0011] Architecture information of the target operating system is read, and a preset hardware probe corresponding to the architecture information is deployed for the target operating system;
[0012] A preset kernel symbol table of the target operating system is read to determine a plurality of system functions corresponding to the preset kernel symbol table, and a corresponding preset software probe is deployed for the plurality of system functions;
[0013] A corresponding sandbox program is constructed according to the preset hardware probe and the preset software probe, and the sandbox program is loaded into a system kernel of the target operating system.
[0014] Optionally, the preset fusion weight matrix is updated based on the probe triggering condition of the preset kernel debugging probe in the target operating system to obtain an updated fusion weight matrix, including:
[0015] The probe triggering condition of the preset hardware probe and the preset software probe is counted through the sandbox program;
[0016] An activated probe is determined according to the probe triggering condition, and a plurality of probe connections corresponding to the activated probe are determined;
[0017] A target weight connection with the highest weight is filtered out from the plurality of probe connections, and the preset fusion weight matrix is updated according to a target weight corresponding to the target weight connection to obtain an updated fusion weight matrix.
[0018] Optionally, the system feature vector is constructed according to the current system data of the target operating system, and the system feature value is calculated according to the system feature vector and the updated fusion weight matrix, including:
[0019] Hardware feature data in the target operating system is read through a preset hardware reading instruction, and software feature data in the target operating system is collected through a preset collection function;
[0020] The mutual information and the correlation coefficient between the hardware feature data and the software feature data are calculated, and the association feature between the hardware feature data and the software feature data is determined according to the mutual information and the correlation coefficient;
[0021] A target fusion vector is constructed based on the association feature, the hardware feature data, and the software feature data, and the target fusion vector is taken as a system feature vector;
[0022] multiply the system feature vector and the updated fusion weight matrix to obtain a system feature value.
[0023] Optionally, the method further includes:
[0024] determining whether the system feature value is greater than a preset feature value threshold;
[0025] if the system feature value is greater than the preset feature value threshold, determining to perform fault rehearsal on the target operating system;
[0026] segmenting the system feature vector into a plurality of sub-vectors, and encoding the plurality of sub-vectors into a corresponding plurality of topological qubits;
[0027] performing quantum Fourier transform on the plurality of quantum topological bits to obtain a corresponding plurality of quantum states;
[0028] reconstructing the plurality of quantum states by maximum likelihood estimation to determine a pre-fault system state trajectory of the target operating system;
[0029] generating a fault probability heat map based on the pre-fault system state trajectory to determine a fault node of the target operating system based on the fault probability heat map to obtain a target fault node.
[0030] Optionally, the method further includes:
[0031] selecting a plurality of repair schemes corresponding to the fault type from a plurality of preset repair schemes based on the fault type corresponding to the target fault node;
[0032] running the plurality of repair schemes in a preset environment and determining a plurality of evaluation indexes corresponding to running the plurality of repair schemes;
[0033] selecting a target repair scheme that satisfies a preset evaluation condition from the plurality of evaluation indexes.
[0034] Optionally, the method further includes:
[0035] generating a debugging data packet based on a kernel version, system configuration information, a hash value corresponding to the system feature vector, the target repair scheme, and a current system timestamp of the target operating system;
[0036] compute a root hash value corresponding to the debugging data packet, and perform consensus arbitration on the root hash value to determine whether to perform a chain operation on the root hash value according to an arbitration result obtained;
[0037] If the chain operation is performed on the root hash value, the root hash value is updated to a preset blockchain.
[0038] In a second aspect, the present application discloses an operating system fault rehearsal device based on a kernel debugging probe, comprising:
[0039] a matrix updating module configured to update a preset fusion weight matrix based on a probe triggering condition of a preset kernel debugging probe in a target operating system to obtain an updated fusion weight matrix, the preset fusion weight matrix being a matrix representing fault characteristics of each parameter of the target operating system through changes in each weight in the matrix;
[0040] a feature value calculation module configured to construct a system feature vector according to current system data of the target operating system, and calculate a system feature value according to the system feature vector and the updated fusion weight matrix;
[0041] a node positioning module configured to determine whether to perform a fault rehearsal on the target operating system based on the system feature value, and if so, to perform a fault node positioning based on the system feature vector to determine a target fault node;
[0042] a scheme screening module configured to run a plurality of repair schemes corresponding to the target fault node in a preset environment, and screen a target repair scheme from the plurality of repair schemes based on a running result obtained.
[0043] In a third aspect, the present application discloses an electronic device, comprising:
[0044] a memory configured to save a computer program;
[0045] a processor configured to execute the computer program to implement the operating system fault rehearsal method based on a kernel debugging probe as described above.
[0046] In a fourth aspect, the present application discloses a computer readable storage medium configured to save a computer program, wherein the computer program is executed by a processor to implement the operating system fault rehearsal method based on a kernel debugging probe as described above.
[0047] 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
[0048] 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.
[0049] Figure 1 This application discloses a flowchart of an operating system fault prediction method based on a kernel debugging probe.
[0050] 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;
[0051] Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0052] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0053] Traditional system debugging needs to manually preset probe positions, and it is difficult to cover all scenarios when facing complex faults (such as occasional deadlocks), and the debugging period is as long as several weeks; and there is a lack of effective tools for correlation analysis of hardware exceptions (such as cache consistency errors) and software vulnerabilities (such as race conditions), resulting in a high proportion of kernel crashes that need to be investigated by multiple teams; further, the scattered debugging logs lack mathematical consistency verification, and in the open source community collaboration scenario, the repair period is often extended due to ambiguous results.
[0054] In order to overcome the above technical problems, the present application discloses an operating system fault rehearsal method, device and equipment based on kernel debugging probe and medium, which can simulate biological neural network synaptic plasticity through kernel probe, construct a debugging probe network, and realize dynamic positioning and analysis of kernel faults.
[0055] Referring to Figure 1 The embodiments of the present application disclose an operating system fault rehearsal method based on a kernel debugging probe, which comprises:
[0056] Step S11, updating the preset fusion weight matrix based on the probe triggering condition of the preset kernel debugging probe in the target operating system to obtain an updated fusion weight matrix; the preset fusion weight matrix is a matrix representing the fault characteristics of each parameter of the target operating system through the weight changes in each item in the matrix.
[0057] In this embodiment, before updating the preset fusion weight matrix, a kernel debugging probe needs to be set in the target operating system, so as to update the fusion weight matrix according to the triggering condition of the kernel debugging probe. Specifically, hardware probe deployment and software probe dynamic generation are needed. As for the deployment of the hardware probe, the architecture information of the target operating system needs to be read, and the preset hardware probe corresponding to the architecture information is deployed for the target operating system, for example, the micro-architecture information is obtained by reading the CPUID (Central Processing Unit Identification) instruction, the corresponding probe is automatically deployed, and according to different platforms, the L1d (L1 Data Cache) cache, branch prediction related probe, or NEON instruction unit (Advanced SIMD), cache coherence probe, etc. can be deployed. It needs to be noted that the probe simulates the plasticity of the biological neural network synapse through the neuromorphic synapse network, to realize the dynamic positioning and analysis of the kernel fault, wherein the hardware layer adds branch prediction neurons, collects the branch prediction error rate through the IntelPT (Processor Tracing) technology, and maps it to the neuron activation value "a = prediction error number / total branch number", when "a>0.1", the branch prediction abnormal alarm is triggered; and the hardware aspect integrates the cache line filling neurons, and uses the PMC (Performance Monitoring Counter) to monitor the L1d cache line filling times, when the filling times are >50 times in 100 consecutive cycles, the cache invalidation related probe is activated.
[0058] As for the dynamic generation of the software probe, the preset kernel symbol table of the target operating system can be read to determine the corresponding system functions in the preset kernel symbol table, and the corresponding preset software probe is deployed based on the system functions, for example, the kernel symbol table is analyzed, and the related functions of memory management, process scheduling, and system call are automatically instrumented. The related functions of memory management include but are not limited to the "kmalloc" function, the "kfree" function, etc.; the related functions of process scheduling include but are not limited to the "schedule" function, the "preempt_count" function, etc.; and the related functions of system call include but are not limited to the "sys_call_table" function, the "sysenter" function, etc. As for the dynamic generation of the software probe, the preset kernel symbol table of the target operating system can be read to determine the corresponding system functions in the preset kernel symbol table, and the corresponding preset software probe is deployed based on the system functions, for example, the kernel symbol table is analyzed, and the related functions of memory management, process scheduling, and system call are automatically instrumented. The related functions of memory management include but are not limited to the "kmalloc" function, the "kfree" function, etc.; the related functions of process scheduling include but are not limited to the "schedule" function, the "preempt_count" function, etc.; and the related functions of system call include but are not limited to the "sys_call_table" function, the "sysenter" function, etc. ), dynamically deploying probes at runtime, with a plugging overhead control at <1% CPU (Central Processing Unit) utilization; and software level can perform asynchronous probe sampling, sparse sampling strategy is adopted for low probability events (such as kernel panic), event characteristics are recorded through probability hash, and 90% of invalid sampling data is reduced.
[0059] Finally, a corresponding sandbox program needs to be constructed according to the preset hardware probe and the preset software probe, and the sandbox program is loaded into the system kernel of the target operating system. It needs to be noted that the sandbox program is an eBPF program, and the trigger condition of the probe can be set, for example, the function call frequency is greater than 1000 times / second.
[0060] Further, the preset fusion weight matrix needs to be updated according to the statistical probe trigger condition, and the preset fusion weight matrix is a matrix representing the fault characteristics of each parameter of the target operating system through the weight change in the matrix. The initialization of the preset fusion weight matrix adopts the Xavier initialization method, and an initial weight of 0.7 is given to the hardware-software cross-dimension connection to strengthen the cross-layer association, and the preset fusion weight matrix satisfies the following formula:
[0061] ;
[0062] wherein, represents a single weight element in the weight matrix W, that is, the value of connecting the i-th input neuron (or feature) to the j-th output neuron (or feature). In a neural network, the weight matrix is used to define the connection strength between layers; represents the number of input neurons (i.e., the input dimension of this layer). In a neural network, this usually refers to the number of units in the previous layer (or input layer); represents the number of output neurons (i.e., the output dimension of this layer). In a neural network, this usually refers to the number of units in the current layer (or output layer). In this way, through the Xavier initialization method, the variance of weight initialization can be kept consistent, preventing gradient vanishing or explosion during training. By adjusting the range of weights according to the number of input and output neurons, it ensures that the signal propagates effectively in the network.
[0063] When performing weight updates, it is necessary to count the probe triggering conditions of the preset hardware probes and the preset software probes according to the sandbox program, then to determine the activated probes according to the probe triggering conditions, to determine a plurality of probe connections corresponding to the activated probes, to finally filter out a target weight connection with the highest weight from the plurality of probe connections, and to update the preset fusion weight matrix according to a target weight corresponding to the target weight connection, so as to obtain an updated fusion weight matrix. It needs to be explained that when multiple probes are activated at the same time, only the probe connection with the highest weight is retained, and the rest of the weights are attenuated according to “ ” decay, wherein, is a decay factor, and the value is 0.1), for example, in memory leak detection, only the probes associated with the “kmalloc” function are strengthened, and the interference signals of irrelevant modules are suppressed.
[0064] It needs to be explained that the update of the weight in the matrix is dynamically optimized by Hebb learning, and the real-time update of the weight, the normalization of the weight and the attenuation of the weight are required. Regarding the real-time update of the weight, when the probes i and j are activated at the same time, the following python instructions are executed: ; ; ; # symmetric connection. wherein, and are the activation values of the probe i and the probe j (the value range is usually 0 to 1); delta is the weight adjustment amount; is the connection weight from the probe i to the probe j; is the connection weight from the probe j to the probe i (symmetric connection). When two probes are activated at the same time, the connection weight between them is enhanced, and the enhancement amplitude depends on the preset learning rate and the activation intensity of the two probes , which is a bidirectional symmetric update and are both increased. Taking a specific scenario as an example, the activation value of the probe = 0.8, and the activation value of the schedule probe = 0.9, then the connection weight between the two probes is increased by 0.072. In this way, components that are frequently activated together should establish stronger connections, which can mimic the biological process of neural pathway strengthening in the brain, and thus enhance the accuracy of weight update.
[0065] Further, regarding the normalization and attenuation of the weight, L2 normalization is performed every 100 ms: , and the background probe is attenuated (the decay coefficient of the unactivated probe), and when the CPU temperature is greater than 70 degrees, the decay coefficient is raised to 0.995, slowing down the weight decay. It should be noted that the change of the weight is also related to the hardware temperature of the operating system corresponding to the device, and the temperature and the learning rate need to be mapped, and the temperature-learning rate mapping function can be defined as follows: wherein is the base learning rate, k=2 is the temperature sensitivity coefficient, is the normal temperature threshold, is the critical temperature. When the CPU temperature exceeds , the learning rate is automatically raised to 1.8 times of the base value to accelerate the focus of the fault probe in a high-temperature environment.
[0066] Step S12, constructing a system feature vector according to the current system data of the target operating system, and calculating a system feature value according to the system feature vector and the updated fusion weight matrix.
[0067] In the embodiment, a system feature vector needs to be constructed according to current system data of the operating system, and then a system feature value is calculated based on the constructed feature vector and the updated fusion matrix. Specifically, first, hardware feature data in the target operating system needs to be read through a preset hardware reading instruction, and software feature data in the target operating system needs to be collected through a preset collection function. Specifically, the PMC counter needs to be read through the RDPMC (Read Performance Monitoring Counter) instruction to read the hardware data at a sampling frequency of 1MHz, and the hardware feature data includes CPU core indicators, cache system indicators, and bus and memory indicators. The CPU core indicators include CPU temperature, branch prediction error rate (collected through Intel PT technology, mapped as neuron activation value a = prediction error number / total branch number), AVX-512 (Advanced Vector Extensions 512) instruction energy consumption / delay (simulated through a quantum dot Cellular Automaton model), etc. The cache system indicators include cache hit rate of each level of cache, cache line filling frequency, cache coherence protocol state, etc. The bus and memory indicators include memory bandwidth utilization, DRAM (Dynamic Random Access Memory) refresh delay, PCIe (Peripheral Component Interconnect Express) bus transmission error number, etc. Further, the eBPF probe asynchronous collection function needs to be used to collect the function call stack to read the software data at a sampling rate of 10kHz, and the software feature data includes kernel function call data, control flow and data flow data, fault event data, etc. The kernel function call data includes the number of calls / parameters of memory management functions (kmalloc / kfree), the trigger frequency of process scheduling functions (scheduling while ) The return code abnormality rate of the system call, the branch prediction error rate, the CPU high temperature rate, the memory allocation function triggering rate, the panic log rate, the deadlock detection signal rate, and the spin lock holding time rate are all calculated. The control flow and data flow data include the dynamic Bayesian network of function calls (the probability transition matrix from syscall to kernel function to driver function), the memory pointer flow direction (encrypted tracking through Intel SGX (Software Guard Extension) to identify the dangerous path of uninitialized pointers to function parameters), and the fault event data include the kernel panic log, the deadlock detection signal, and the spin lock holding time (abnormal holding exceeding the threshold value triggers probe sampling). It should be noted that the hardware data and the software data are processed to obtain the corresponding hardware feature data and software feature data, and the hardware data is subjected to wavelet packet decomposition to extract five energy maximum frequency band features to obtain the hardware feature data. The TF-IDF (term frequency-inverse document frequency) vector of function calls is constructed based on the software data to identify high-frequency abnormal call patterns to obtain the software feature data.
[0068] Further, the mutual information and the correlation coefficient between the hardware feature data and the software feature data need to be calculated, and the correlation feature between the hardware feature data and the software feature data is determined according to the mutual information and the correlation coefficient. Then, the target fusion vector is constructed based on the correlation feature, the hardware feature data, and the software feature data, and the target fusion vector is taken as the system feature vector, and the target fusion vector can be represented as V. It should be noted that the hardware cache invalidation is associated with the triggering timing of the software memory allocation function (kmalloc), the branch prediction error is associated with the execution frequency of the kernel conditional judgment statement, and the CPU high temperature is associated with the resource occupation rate of the driver module (such as the graphics card driver), so the correlation feature between the hardware feature data and the software feature data needs to be calculated. And the target fusion vector V = [hardware feature; software feature; correlation feature], which has 128 dimensions. Finally, the product between the system feature vector and the updated fusion weight matrix needs to be calculated to obtain the system feature value, which can be represented as f(V) = V·W.
[0069] Step S13, determining whether to perform fault rehearsal on the target operating system based on the system feature value, if the fault rehearsal is performed, locating the fault node based on the system feature vector to determine the target fault node.
[0070] In this embodiment, first, the feature value needs to be judged, and it needs to be determined whether the system feature value is greater than the preset feature value threshold. If the system feature value is greater than the preset feature value threshold, it is determined that the fault rehearsal is performed on the target operating system. The preset feature value threshold is 3 , and The historical mean standard deviation is obtained. Then the system feature vector needs to be divided into a plurality of sub-vectors, and the plurality of sub-vectors are encoded into a plurality of corresponding topological quantum bits. In this embodiment, the fusion feature vector V is divided into 16 8-dimensional sub-vectors, each sub-vector is encoded into a topological quantum bit, and then the plurality of quantum topological bits are subjected to quantum Fourier transform to obtain a plurality of corresponding quantum states. It needs to be noted that the quantum Fourier transform can enhance the quantum entanglement effect of the features. Further, the plurality of quantum topological bits are subjected to quantum Fourier transform to obtain a plurality of corresponding quantum states, and then the plurality of quantum states are reconstructed by maximum likelihood estimation to determine the pre-fault system state trajectory of the target operating system. The fault probability heat map is generated based on the pre-fault system state trajectory, and the node to be failed of the target operating system is determined based on the fault probability heat map to obtain the target node to be failed. In this way, through signal fusion of hardware and software, the collaborative vulnerability of hardware and software can be reduced, and the node that may fail in the current state of the system can be identified.
[0071] In step S14, a plurality of repair schemes corresponding to the target node to be failed are run in a preset environment, and a target repair scheme is screened from the plurality of repair schemes based on the obtained running results.
[0072] In this embodiment, it is necessary to run a plurality of repair schemes corresponding to the target to be failed node in the preset environment, and to select a target repair scheme from the plurality of repair schemes based on the obtained running results. Specifically, it is necessary to select a plurality of repair schemes corresponding to the fault type of the target to be failed node from a plurality of preset repair schemes based on the fault type. It should be noted that the preset environment is a digital twin pre-training platform, and a quantum dot Cellular Automaton (QCA, Qualitative Comparative Analysis) model of Intel Alder Lake is constructed in the platform, which accurately simulates the energy consumption and delay characteristics of AVX-512 instructions, and can realize the meta-universe mapping of compilation optimization, encode 27 optimization options of GCC-03 (GNU Compiler Collection, 03 optimization options of GNU compiler suite) as adjustable parameters of digital twin, and replay the fault performance under different compilation configurations. And can design conditional GAN (cGAN, Conditional Generative Adversarial Network, Conditional Generative Adversarial Network) to generate fault scenarios, input hardware configuration and software version, to output probe activation mode of 100,000 simulated faults, and improve the accuracy of simulation characteristics after multiple iterations. Further, it is necessary to run the plurality of repair schemes in the preset environment, and to determine a plurality of evaluation indexes corresponding to the plurality of repair schemes, and the evaluation indexes are resource utilization rate improvement rate, fault recurrence probability, system performance overhead, and then select a target repair scheme that meets a preset evaluation condition from the plurality of evaluation indexes. The preset evaluation condition can be set by the user as needed. In this way, the universe pre-training can effectively improve the predictive debugging success rate of the vulnerability, and through the pre-rehearsal of the fault and the selection of the scheme, the real fault of the operating system can be effectively avoided.
[0073] In this embodiment, the preset fusion weight matrix can be updated based on the probe triggering condition of the preset kernel debugging probe in the target operating system to obtain an updated fusion weight matrix; the preset fusion weight matrix is a matrix representing the parameter fault characteristics of the target operating system through changes in the weights in the matrix; a system feature vector is constructed according to the current system data of the target operating system, and a system feature value is calculated according to the system feature vector and the updated fusion weight matrix; it is determined whether to perform fault rehearsal on the target operating system based on the system feature value, if fault rehearsal is performed, the fault node to be located is determined based on the system feature vector to determine the target fault node to be located; a plurality of repair schemes corresponding to the target fault node are run in a preset environment, and a target repair scheme is selected from the plurality of repair schemes based on the obtained running results. Thus, the preset fusion weight matrix can be updated according to the probe triggering condition of the preset kernel debugging probe in the target operating system, then a system feature vector is constructed according to the system data, and a system feature value is calculated according to the system feature vector and the updated fusion weight matrix, then after determining to perform fault rehearsal on the target operating system according to the system feature value, the fault node to be located is determined according to the system feature vector, and a target repair scheme corresponding to the fault node to be located is selected in a preset environment. In this way, the kernel probe can simulate the synaptic plasticity of biological neural networks to construct a debugging probe network, realize dynamic positioning and analysis of kernel faults, and prevent the operating system from occurring real faults.
[0074] As a preferred embodiment, the information related to this system fault rehearsal can be stored in the blockchain. Specifically, a debugging data packet can be generated based on the kernel version of the target operating system, system configuration information, a hash value corresponding to the system feature vector, a target repair scheme, and a current system timestamp, a root hash value corresponding to the debugging data packet is calculated, and the root hash value is subjected to consensus arbitration to determine whether to perform a chain operation on the root hash value according to the obtained arbitration result. If the root hash value is subjected to a chain operation, the root hash value is updated to a preset blockchain. It should be noted that the generated debugging data packet is the basic data unit of blockchain evidence, which is generated based on the key data of the fault diagnosis whole process, ensures the integrity, traceability and mathematical consistency of the data, and provides a unified data benchmark for distributed collaborative debugging. Moreover, data chaining needs to be subjected to consensus arbitration, and only in the case that the consensus arbitration is passed, the chain operation is performed, and incremental verification is needed, the function fingerprints of new and old kernel versions need to be compared, only the incremental verification of the probe weight of the changed function is performed, specifically, a difference list needs to be generated, and the incremental verification of the related probe weight in the difference list is performed, and the verification result also needs to be chained, and the state of the debugging record is updated to verified.
[0075] Referring to Figure 2As shown, the embodiment of the present application discloses an operating system fault rehearsal device based on a kernel debugging probe, comprising:
[0076] a matrix updating module 11, configured to update a preset fusion weight matrix based on a probe triggering condition of a preset kernel debugging probe in a target operating system, to obtain an updated fusion weight matrix; the preset fusion weight matrix is a matrix representing parameter fault features of the target operating system through weight changes in the matrix;
[0077] an eigenvalue calculation module 12, configured to construct a system feature vector according to current system data of the target operating system, and calculate a system eigenvalue according to the system feature vector and the updated fusion weight matrix;
[0078] a node positioning module 13, configured to determine whether to perform fault rehearsal on the target operating system based on the system eigenvalue, and if so, to perform fault node positioning based on the system feature vector, to determine a target fault node;
[0079] a scheme screening module 14, configured to run a plurality of repair schemes corresponding to the target fault node in a preset environment, and screen a target repair scheme from the plurality of repair schemes based on obtained running results.
[0080] In this embodiment, the preset fusion weight matrix can be updated based on the probe triggering condition 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 representing parameter fault features of the target operating system through weight changes in the matrix; a system feature vector is constructed according to current system data of the target operating system, and a system eigenvalue is calculated according to the system feature vector and the updated fusion weight matrix; whether to perform fault rehearsal on the target operating system is determined based on the system eigenvalue, and if so, fault node positioning is performed based on the system feature vector, to determine a target fault node; a plurality of repair schemes corresponding to the target fault node are run in a preset environment, and a target repair scheme is screened from the plurality of repair schemes based on obtained running results. In this way, the preset fusion weight matrix can be updated according to the probe triggering condition of the preset kernel debugging probe in the target operating system, then a system feature vector is constructed according to system data, and a system eigenvalue is calculated according to the system feature vector and the obtained updated fusion weight matrix, then whether to perform fault rehearsal on the target operating system is determined according to the system eigenvalue, after which fault node positioning is performed according to the system feature vector, and a target repair scheme corresponding to the fault node is screened in a preset environment. In this way, kernel probe can simulate biological neural network synaptic plasticity, a debugging probe network can be constructed, and dynamic positioning and analysis of kernel faults can be realized.
[0081] In some embodiments, the kernel-debug-probe-based operating system fault preplay device can further include:
[0082] a first probe deployment unit configured to read architecture information of a target operating system and deploy preset hardware probes corresponding to the architecture information for the target operating system;
[0083] a second probe deployment unit configured to read a preset kernel symbol table of the target operating system, determine a plurality of system functions corresponding to the preset kernel symbol table, and deploy corresponding preset software probes based on the plurality of system functions;
[0084] a program loading unit configured to construct a corresponding sandbox program based on the preset hardware probes and the preset software probes, and load the sandbox program to a system kernel of the target operating system.
[0085] In some embodiments, the matrix updating module 11 can specifically include:
[0086] an information statistics unit configured to statistically record probe triggering conditions of the preset hardware probes and the preset software probes through the sandbox program;
[0087] a probe connection determination unit configured to determine activated probes based on the probe triggering conditions and determine a plurality of probe connections corresponding to the activated probes;
[0088] a matrix updating unit configured to filter out a target weight connection with the highest weight from the plurality of probe connections, and update the preset fusion weight matrix based on a target weight corresponding to the target weight connection to obtain an updated fusion weight matrix.
[0089] In some embodiments, the feature value calculation module 12 can specifically include:
[0090] a feature acquisition unit configured to read hardware feature data in the target operating system through a preset hardware reading instruction and acquire software feature data in the target operating system through a preset acquisition function;
[0091] a correlation feature determination unit configured to calculate mutual information and a correlation coefficient between the hardware feature data and the software feature data, and determine a correlation feature between the hardware feature data and the software feature data based on the mutual information and the correlation coefficient;
[0092] a feature vector determination unit configured to construct a target fusion vector based on the correlation feature, the hardware feature data, and the software feature data, and use the target fusion vector as a system feature vector;
[0093] a characteristic value calculation unit, configured to calculate a product between the system characteristic vector and the updated fusion weight matrix to obtain a system characteristic value.
[0094] In some embodiments, the node positioning module 13 can specifically include:
[0095] a data comparison unit, configured to determine whether the system characteristic value is greater than a preset characteristic value threshold;
[0096] a fault rehearsal unit, configured to determine to perform fault rehearsal on the target operating system if the system characteristic value is greater than the preset characteristic value threshold;
[0097] a vector encoding unit, configured to split the system characteristic vector into a plurality of sub-vectors, and encode the plurality of sub-vectors into a corresponding plurality of topological qubits;
[0098] a data conversion unit, configured to perform quantum Fourier transform on the plurality of quantum topological bits to obtain a corresponding plurality of quantum states;
[0099] a state trajectory determination unit, configured to reconstruct the plurality of quantum states by maximum likelihood estimation to determine a pre-fault system state trajectory of the target operating system;
[0100] a fault node positioning unit, configured to generate a fault probability heat map based on the pre-fault system state trajectory, to determine a fault node of the target operating system based on the fault probability heat map, to obtain a target fault node.
[0101] In some embodiments, the scheme screening module 14 can specifically include:
[0102] a repair scheme determination unit, configured to screen a plurality of repair schemes corresponding to a fault type of the target fault node from a plurality of preset repair schemes according to the fault type;
[0103] a repair scheme running unit, configured to run the plurality of repair schemes in a preset environment, and determine a plurality of evaluation indexes corresponding to the plurality of repair schemes;
[0104] a repair scheme screening unit, configured to screen a target repair scheme satisfying a preset evaluation condition from the plurality of evaluation indexes.
[0105] In some embodiments, the operating system fault rehearsal apparatus based on the kernel debugging probe can further include:
[0106] The data packet generation unit is configured to generate a debugging data packet based on a kernel version of the target operating system, system configuration information, a hash value corresponding to the system feature vector, the target repair scheme, and a current system timestamp.
[0107] The consensus arbitration unit is configured to calculate a root hash value corresponding to the debugging data packet, and perform consensus arbitration on the root hash value to determine whether to perform a chain operation on the root hash value according to an obtained arbitration result.
[0108] The data chain unit is configured to update the root hash value to a preset blockchain if the chain operation is performed on the root hash value.
[0109] Further, the embodiment of the present application further discloses an electronic device, Figure 3 is an electronic device 20 structure diagram according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation on the use range of the present application.
[0110] Figure 3 A structure diagram of an electronic device 20 provided by the embodiment of the present application. The electronic device 20 can specifically 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. Wherein, the memory 22 is used to store computer programs, the computer programs are loaded and executed by the processor 21, to realize the related steps in the operating system fault preplay method based on kernel debugging probe disclosed in any of the preceding embodiments. In addition, the electronic device 20 in the embodiment can be an electronic computer.
[0111] In the embodiment, the power supply 23 is used to provide working 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 the external device, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited here; the input / output interface 25 is used to obtain external input data or output data to the outside world, and the specific interface type can be selected according to the specific application needs, which is not limited here.
[0112] In addition, the memory 22 as the carrier of resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.
[0113] The operating system 221 is configured to manage and control each hardware device on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. The computer program 222 can further include computer programs capable of performing other specific work in addition to the computer program capable of performing the operating system fault walkthrough method based on the kernel debugging probe disclosed by the electronic device 20 in any of the foregoing embodiments.
[0114] Further, the present application also discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the operating system fault walkthrough method based on the kernel debugging probe disclosed above. For the specific steps of the method, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0115] The embodiments in the present specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same or similar parts between the embodiments, please refer to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and please refer to the method part for the relevant part.
[0116] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0117] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0118] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the stated element.
[0119] The above describes the technical solutions provided by the present application in detail, and the principles and implementation manners of the present application are described by applying specific examples. The above description of the examples is only for helping to understand the method and core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed, and the above description of the content of the specification should not be understood as limiting the present 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. The step of 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 includes: The sandbox program is used to collect statistics on the triggering status of preset hardware probes and 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. 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 characteristic data in the target operating system is read using preset hardware read instructions, and software characteristic data in the target operating system is collected using preset acquisition functions; the hardware characteristic data includes CPU core indicators, cache system indicators, and bus and memory indicators; the software characteristic data includes kernel function call data, control flow and data flow data, and fault event data. 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.
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 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.
4. 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.
5. The operating system fault prediction method based on kernel debugging probes according to any one of claims 1 to 4, 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.
6. 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 the target repair solution from the several repair solutions based on the obtained running results. The matrix update module includes: The information statistics unit is used to collect statistics on the probe triggering status of preset hardware probes and 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. The feature value calculation module includes: The feature acquisition unit is used to read hardware feature data from the target operating system through preset hardware read instructions, and to acquire software feature data from the target operating system through preset acquisition functions; the hardware feature data includes CPU core indicators, cache system indicators, and bus and memory indicators; the software feature data includes kernel function call data, control flow and data flow data, and fault event data. 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.
7. 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 5.
8. 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 5.
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