Method and system for simulating and testing notebook pre-installed environment based on virtualization technology
By simulating the notebook hardware architecture in a virtualized environment, injecting user operation behavior sequences and monitoring the operating status, generating compatibility analysis reports, and optimizing the pre-installed environment image files, the time-consuming and labor-intensive problems of traditional testing methods are solved, and efficient and comprehensive notebook pre-installed environment testing is achieved.
Patent Information
- Application Number
- CN202510979592.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-07-16
AI Technical Summary
Traditional laptop pre-installation environment testing methods are time-consuming and labor-intensive, making it difficult to fully cover various user operation scenarios and hardware configuration combinations. Furthermore, they lack efficiency and accuracy, and are unable to meet the needs of modern laptop R&D.
By creating a virtualized environment instance that matches the target notebook hardware architecture, injecting simulated user operation behavior sequences, generating a dynamic test case set, and calling the resource scheduling engine to execute these test cases, monitoring the running status data, generating an environment compatibility analysis report, and finally optimizing the pre-installed environment image file.
It achieves efficient and comprehensive testing of the pre-installed environment in a virtual environment, improves the stability and compatibility of the pre-installed environment, shortens the R&D cycle, and reduces testing costs.
Smart Images

Figure CN120469878B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for simulating and testing a notebook pre-installed environment based on virtualization technology. Background Art
[0002] During the development and production of laptops, stability and compatibility testing of the pre-installed environment is crucial for ensuring product quality and user experience. Traditional testing methods typically rely on individual hardware devices, which is not only time-consuming and labor-intensive but also fails to fully cover a wide range of user scenarios and hardware configuration combinations. Furthermore, with the increasing complexity of software systems and the diversification of hardware architectures, traditional testing methods are no longer efficient and accurate enough to meet the demands of modern laptop R&D. Summary of the Invention
[0003] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a method for simulating and testing a pre-installed environment for a notebook computer based on virtualization technology, the method comprising:
[0004] Creating a virtualized environment instance that matches the target laptop's hardware architecture, the virtualized environment instance including a pre-installed operating system and a pre-installed software set;
[0005] Injecting a simulated user operation behavior sequence into the virtualized environment instance according to a predefined environment configuration strategy to generate a dynamic test case set;
[0006] Invoking a resource scheduling engine to execute the dynamic test case set in the virtualized environment instance and monitor the running status data of the preinstalled operating system and preinstalled software set;
[0007] Extracting abnormal response patterns from the operating status data and generating an environmental compatibility analysis report;
[0008] The resource configuration parameters of the virtualized environment instance are adjusted according to the environmental compatibility analysis report to generate an optimized pre-installed environment image file.
[0009] On the other hand, an embodiment of the present invention also provides a notebook pre-installed environment simulation test system based on virtualization technology, including a processor and a machine-readable storage medium, the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0010] Based on the above aspects, the embodiment of the present invention realizes a comprehensive simulation of the pre-installed environment in a virtual environment by creating a virtualized environment instance that matches the hardware architecture of the target notebook. By injecting a simulated user operation behavior sequence, generating a dynamic test case set, and calling the resource scheduling engine to execute these test cases, the running status data of the pre-installed operating system and the pre-installed software set can be efficiently monitored. Furthermore, by extracting the abnormal response pattern in the running status data, an environmental compatibility analysis report is generated, which provides strong data support for optimizing the pre-installed environment. Finally, the resource configuration parameters of the virtualized environment instance are adjusted according to the environmental compatibility analysis report to generate an optimized pre-installed environment image file, which not only improves the stability and compatibility of the pre-installed environment, but also greatly shortens the R&D cycle and reduces the testing cost. Thus, with virtualization technology as the core, efficient and comprehensive testing of the notebook pre-installed environment is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 The present invention provides a flowchart of a method for simulating and testing a pre-installed environment for a laptop computer based on virtualization technology.
[0012] Figure 2 Schematic diagram of exemplary hardware and software components of a laptop pre-installed environment simulation test system based on virtualization technology provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0013] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This is a flow chart of a method for simulating and testing a pre-installed environment for a notebook computer based on virtualization technology provided by an embodiment of the present invention. The method for simulating and testing a pre-installed environment for a notebook computer based on virtualization technology is introduced in detail below.
[0014] Step S110: creating a virtualized environment instance that matches the target notebook hardware architecture, wherein the virtualized environment instance includes a pre-installed operating system and a pre-installed software set.
[0015] During the laptop pre-installation environment simulation testing process, the first step is to create a virtualized environment instance that matches the target laptop's hardware architecture. This virtualized environment instance must include a pre-installed operating system and pre-installed software. The reason for creating such a virtualized environment instance is that it provides a stable and repeatable test environment for subsequent simulation testing, avoiding the risks of hardware damage and data loss that may arise from testing directly on actual laptop hardware. For example, a newly released laptop model may have a completely new hardware architecture. In the absence of a large number of real hardware devices for testing, creating a virtualized environment instance allows for efficient and comprehensive testing of the pre-installed environment.
[0016] Step S111: Acquire a hardware configuration data set of the target notebook, wherein the hardware configuration data set includes processor architecture information, memory capacity distribution information, storage device interface protocol information, and peripheral driver feature information.
[0017] To create a virtualization environment instance that closely matches the target laptop's hardware architecture, you first need to obtain the target laptop's hardware configuration data. Every piece of information in this hardware configuration data plays a critical role in building the virtualization environment. Processor architecture information reflects the processor's computing power and instruction set characteristics. Different processor architectures differ in how they process instructions and their efficiency, and these characteristics must be accurately simulated when building the virtualization environment. Memory capacity distribution information describes how memory is allocated to different system processes and applications. Proper memory distribution simulation ensures smooth software operation in the virtualized environment. Storage device interface protocol information determines the data transmission method and speed between the storage device and the system, and these transmission characteristics must be simulated in the virtualization environment. Peripheral driver feature information describes how various external devices (such as mice, keyboards, and printers) interact with the laptop system and their driver requirements.
[0018] There are several ways to obtain this information. Processor architecture information can be obtained from the processor's technical documentation or hardware testing tools. Memory capacity distribution information can be obtained using the operating system's system information viewing tool or specialized memory testing software. Storage device interface protocol information can be found in the storage device's product manual or through the system's built-in device management tools. Peripheral driver feature information can be obtained from the peripheral driver installation package instructions or by viewing the device properties in the system's device manager.
[0019] Step S112: constructing a virtualization driver layer based on the processor architecture information, wherein the virtualization driver layer includes a virtualization instruction conversion module that is compatible with the physical processor instruction set.
[0020] After obtaining the processor architecture information, a virtualization driver layer can be built based on it. The core of this driver layer is a virtualization instruction conversion module that is compatible with the physical processor's instruction set. This module converts the physical processor's instruction set into instructions that the virtualized environment can understand and execute, thereby simulating the physical processor's computational processes.
[0021] Step S1121: traverse the operation instruction set in the processor architecture information to identify abnormal instruction fragments that conflict with the target virtualization platform.
[0022] First, a comprehensive traversal of the instruction set in the processor architecture information is performed. During this traversal, each instruction is compared with the instruction set supported by the target virtualization platform. If an instruction is found to have no corresponding processing method in the target virtualization platform or to cause an error in the target virtualization platform, the instruction is identified as an abnormal instruction fragment.
[0023] During the comparison process, a line-by-line comparison can be performed, extracting the computational instructions from the processor architecture information in a predetermined order and matching them with the instruction set of the target virtualization platform. For each instruction, a detailed comparison can be performed based on its opcode, operands, and other aspects. For example, if the opcode of an instruction in the processor architecture does not exist in the instruction set of the target virtualization platform, then this computational instruction is likely an abnormal instruction fragment.
[0024] Step S1122: performing instruction remapping processing on the abnormal instruction fragment based on the conflict resolution strategy to generate a replacement instruction sequence.
[0025] When an abnormal instruction segment is identified, it needs to be remapped according to the conflict resolution strategy. The conflict resolution strategy is a set of pre-defined rules used to convert abnormal instructions into instructions that the target virtualization platform can handle.
[0026] Specifically, the instruction remapping process can be divided into the following sub-steps. First, the function and purpose of the abnormal instruction fragment are analyzed to determine the calculation or operation it is intended to perform. Then, the target virtualization platform's instruction set is searched for instruction combinations that can achieve the same or similar functions. These instruction combinations are appropriately adjusted and optimized to replace the original abnormal instruction fragment.
[0027] For example, assuming that the exception instruction fragment is a multiplication instruction implemented using a specific algorithm in the physical processor, and the target virtualization platform does not have a directly corresponding multiplication instruction, then a replacement instruction sequence can be generated by simulating the multiplication operation by using a combination of basic operation instructions such as addition and shift.
[0028] Step S1123: Encapsulate the replacement instruction sequence into an instruction conversion buffer, and configure a buffer overflow protection mechanism.
[0029] After generating the replacement instruction sequence, it needs to be encapsulated into the instruction conversion buffer. The instruction conversion buffer is a temporary storage area used to store the converted instruction sequence. Encapsulating the replacement instruction sequence into the buffer facilitates subsequent instruction scheduling and execution.
[0030] To prevent buffer overflows, you need to configure a buffer overflow protection mechanism. Buffer overflows can lead to serious problems such as data loss and system crashes. Buffer overflow protection can be implemented by setting a maximum buffer capacity and monitoring usage. When buffer usage approaches maximum capacity, appropriate measures can be taken, such as pausing instruction encapsulation or clearing partially executed instructions.
[0031] Step S1124: creating a virtualized thread pool according to the number of parallel computing units in the processor architecture information, wherein the virtualized thread pool includes a virtual thread allocation policy that matches the number of physical processor cores.
[0032] A virtualized thread pool is created based on the number of parallel computing units (PCUs) in the processor architecture. The number of PCUs reflects the physical processor's ability to handle multiple tasks simultaneously. The virtualized thread pool manages and schedules virtual threads, which are similar to threads in a physical processor and are used to perform specific computing tasks.
[0033] When creating a virtualized thread pool, ensure that it includes a virtual thread allocation policy that matches the number of physical processor cores. This means that virtual thread allocation should be properly planned based on the number of physical processor cores, allowing each core to fully utilize its computing power. For example, if the physical processor has multiple cores, a corresponding number of virtual threads can be allocated to each core, allowing them to execute different tasks in parallel, thereby improving the overall computing efficiency of the virtualized environment.
[0034] Step S1125: establishing a dynamic scheduling link between the instruction conversion buffer and the virtualization thread pool, and generating a real-time response interface of the virtualization driver layer.
[0035] Finally, a dynamic scheduling link is established between the instruction translation buffer and the virtualized thread pool. This dynamic scheduling link dispatches the converted instruction sequence from the instruction translation buffer to the virtualized thread pool for execution. This dynamic scheduling link allows for flexible allocation of instructions to different virtual threads based on the real-time needs of the virtualized environment.
[0036] In the process of establishing a dynamic scheduling link, a reasonable scheduling algorithm needs to be designed to ensure that instructions can be executed efficiently. For example, a priority scheduling algorithm can be used to assign different priorities to instructions based on their importance and urgency, giving priority to high-priority instructions.
[0037] At the same time, by establishing this dynamic scheduling link, a real-time response interface for the virtualization driver layer can be generated. This real-time response interface allows external systems or programs to obtain the operating status and execution results of the virtualization driver layer in real time, facilitating monitoring and management.
[0038] Step S113: Divide the virtual memory space according to the memory capacity distribution information, wherein the virtual memory space includes dynamically allocated memory blocks and statically reserved system resource blocks.
[0039] After obtaining the memory capacity distribution information, we can use this information to divide the virtual memory space. The virtual memory space is the area used to store data and programs in the virtualization environment. Its division should simulate the actual memory usage of the target laptop as much as possible.
[0040] Virtual memory space is primarily divided into dynamically allocated memory blocks and statically reserved system resource blocks. Dynamically allocated memory blocks are used to meet the memory needs of applications during operation. These memory blocks can be dynamically allocated and released based on application needs. Statically reserved system resource blocks are reserved for the operating system and some critical system services. These blocks are allocated at system startup and are generally not dynamically allocated to applications during system operation.
[0041] When dividing the virtual memory space, the sizes of dynamically allocated memory blocks and statically reserved system resource blocks can be determined based on the proportional relationship in the memory capacity distribution information. For example, if the memory capacity distribution information shows that the system reserves a certain proportion of memory for system resources, then the statically reserved system resource blocks in the virtual memory space are also divided according to the same proportion.
[0042] Step S114: parsing the storage device interface protocol information to generate a virtual disk mapping file, wherein the virtual disk mapping file includes logical storage units aligned with the partition structure of the physical storage device.
[0043] The purpose of parsing the storage device interface protocol information is to generate a virtual disk mapping file. A virtual disk mapping file is a file used to simulate a physical storage device in a virtualized environment. It contains logical storage units that are aligned with the partition structure of the physical storage device.
[0044] When parsing the storage device interface protocol information, it's necessary to understand the specifics of the protocol, including the data transmission format, command set, and error handling mechanisms. Based on this information, the format and content of the virtual disk mapping file can be determined. For example, if the physical storage device uses a specific partition format, the virtual disk mapping file must also use the same partition format, and the size and arrangement of the logical storage units must be consistent with the physical storage device's partition structure.
[0045] The process of generating a virtual disk mapping file can be divided into the following steps. First, the basic file format and metadata are determined based on the storage device interface protocol information. Then, the corresponding logical storage units are created according to the partition structure of the physical storage device. Finally, these logical storage units are organized into a complete virtual disk mapping file.
[0046] Step S115: parse the peripheral driver feature information, extract the type identifier and communication protocol version of the physical peripheral device, and generate a virtual peripheral driver adaptation layer. The virtual peripheral driver adaptation layer includes a driver interface set classified based on device type and configures a protocol emulation strategy that matches the physical peripheral device.
[0047] Parse the peripheral driver signature information to extract the physical peripheral device type identifier and communication protocol version. This information is crucial for generating the virtual peripheral driver adaptation layer. The virtual peripheral driver adaptation layer enables the virtualized environment to interact properly with various external devices.
[0048] Based on the extracted physical peripheral device type identifiers, driver interfaces can be categorized. Different types of peripheral devices (such as mice, keyboards, and printers) have different driver requirements. This categorization allows for the provision of specialized driver interfaces for each type of device. Furthermore, based on the communication protocol version, a protocol emulation policy is configured to match the physical peripheral device. This protocol emulation policy simulates the communication process between the physical peripheral device and the laptop system, ensuring that the virtualized environment can correctly process the data and commands sent by the peripheral device.
[0049] When generating a virtual peripheral driver adaptation layer, you can first create a driver interface set, with each driver interface corresponding to a type of peripheral device. Then, configure a corresponding protocol emulation strategy for each driver interface based on the communication protocol version. For example, for a mouse device, configure the corresponding emulation strategy for mouse movement, clicks, and other operations based on its communication protocol version.
[0050] Step S116: Integrate the virtualization driver layer, the virtual memory space, the virtual disk mapping file, and the virtual peripheral driver adaptation layer to generate an initialization configuration template for the virtualization environment instance.
[0051] The previously constructed virtualization driver layer, the divided virtual memory space, the generated virtual disk mapping file, and the virtual peripheral driver adapter layer are integrated to generate an initialization configuration template for the virtualization environment instance. This initialization configuration template contains all the configuration information required to start the virtualization environment instance.
[0052] The integration process must ensure compatibility and coordination between various components. For example, the virtualization driver layer must be able to correctly manage virtual memory space and schedule instructions to the virtual thread pool for execution. The virtual disk mapping file must be correctly identified and used by the virtualization driver layer. The virtual peripheral driver adapter layer must be able to communicate normally with other components in the virtualized environment.
[0053] When generating an initialization configuration template, the configuration information of each component can be organized and stored in a predetermined format. For example, the configuration parameters and settings of each component can be recorded in a text file or configuration file to form a complete initialization configuration template.
[0054] Step S120: injecting a simulated user operation behavior sequence into the virtualized environment instance according to a predefined environment configuration policy to generate a dynamic test case set.
[0055] After creating a virtualized environment instance, the next step is to inject simulated user operation sequences into the instance according to the predefined environment configuration policy to generate a dynamic test case set. The predefined environment configuration policy specifies the rules and conditions for simulated user operations, while the simulated user operation sequences simulate the various operations a real user would perform when using a laptop. By injecting these operation sequences and generating a dynamic test case set, the pre-installed operating system and pre-installed software can be comprehensively tested under different user operation scenarios.
[0056] Step S121: parsing the operation trigger condition set and the operation execution parameter set in the predefined environment configuration policy, wherein the operation trigger condition set includes an event trigger time window, a concurrent operation quantity threshold, and a dependent service status identifier.
[0057] First, the set of operation trigger conditions and operation execution parameters in the predefined environment configuration policy must be parsed. The operation trigger condition set contains several key pieces of information. The event trigger time window specifies the time period within which the operation can be triggered, which helps simulate real user operation behavior at different time points. The concurrent operation threshold limits the number of operations that can be executed at the same time, preventing the system from crashing due to excessive concurrent operations. The dependent service status identifier specifies the status requirements of the services that the operation depends on. The corresponding operation can only be executed when these services are in a specific state.
[0058] The operation execution parameter set includes various parameters during the operation execution process, such as the duration of the operation, the interval between operations, etc. These parameters determine the specific execution method and effect of the operation.
[0059] When parsing these collections, text parsing can be used to extract relevant information from predefined environment configuration policy files, organize them, and categorize them. For example, event triggering time windows, concurrent operation thresholds, and dependent service status identifiers can be extracted and stored in different data structures for subsequent use.
[0060] Step S122: Decompose the simulated user operation behavior sequence into an atomic operation unit queue, each atomic operation unit including an operation type identifier, a target object path, and an input parameter set.
[0061] Decompose the simulated user action sequence into a sequence of atomic action units. An atomic action unit is the smallest execution unit in the action sequence. Each atomic action unit contains an action type identifier, a target object path, and a set of input parameters. The action type identifier specifies the specific action type, such as click, enter, or save. The target object path points to the object targeted by the action, such as an application window or a file. The input parameter set contains the specific parameters required for the action, such as the text entered or the selected option.
[0062] The decomposition process can be performed according to the logical order of the operations. For example, if the simulated user operation sequence is a series of file operations, each file operation (such as opening a file, editing a file, saving a file, etc.) can be decomposed into an atomic operation unit. During the decomposition process, the independence and integrity of each atomic operation unit must be ensured. In other words, each atomic operation unit can be executed independently and contains all the information required to perform the operation.
[0063] Step S123: screening candidate atomic operation units that meet the service dependency relationship in the atomic operation unit queue according to the dependent service status identifier, and performing temporal arrangement and combination of the candidate atomic operation units based on the event triggering time window.
[0064] Based on the dependent service status identifier, the operations in the atomic operation unit queue are screened to find candidate atomic operation units that meet the service dependency. Only when the service on which an atomic operation unit depends is in a specific state will the atomic operation unit be selected as a candidate operation unit.
[0065] Then, the candidate atomic operation units are arranged and combined in a temporal order based on the event-triggered time window. This means determining the execution order and time point of each candidate atomic operation unit based on the requirements of the event-triggered time window. For example, if the event-triggered time window stipulates that only a specific number of operations can be executed within a certain time period, then the candidate atomic operation units need to be arranged reasonably to ensure that the number of operations within that time period does not exceed the specified threshold.
[0066] When performing temporal permutations and combinations, sorting algorithms and time planning algorithms can be used. For example, candidate atomic operation units can be sorted based on the operation priority and event triggering time window requirements, and then the specific execution time of each operation unit can be determined using the time planning algorithm.
[0067] Step S124: concurrently grouping the candidate atomic operation units after the time sequence arrangement and combination based on the concurrent operation quantity threshold to generate an initial test case set.
[0068] Based on the concurrent operation threshold, the candidate atomic operation units that have been time-ordered are concurrently grouped. The concurrent operation threshold limits the number of operations that can be executed at the same time. Concurrent grouping ensures that the number of operations at each time point does not exceed this threshold.
[0069] During concurrent grouping, candidate atomic operation units can be grouped according to execution time and operation type. For example, operations that can be executed concurrently within the same time period can be grouped together to form a concurrent operation group. Each concurrent operation group constitutes an initial test case.
[0070] By concurrently grouping all candidate atomic operation units, an initial test case set is finally generated. The initial test case set contains multiple initial test cases, each of which represents a group of operations that can be executed concurrently at a specific time point.
[0071] Step S125: performing resource consumption evaluation on each test case in the initial test case set, and calculating resource consumption evaluation parameters of each test case.
[0072] Perform resource consumption evaluation on each test case in the initial test case set. The purpose of resource consumption evaluation is to understand how much system resources each test case consumes during execution, such as CPU resources, memory resources, and disk I / O resources.
[0073] To calculate resource consumption evaluation parameters for each test case, simulate execution. In a virtualized environment, simulate each test case and record its resource usage during execution. For example, record CPU usage, memory usage, and disk read and write times. Then, based on this recorded data, calculate resource consumption evaluation parameters for each test case.
[0074] When calculating resource consumption evaluation parameters, a weighted average approach can be used. For example, different resource types are assigned different weights, and the usage of each resource type is multiplied by the corresponding weight, and the results are added together to obtain the final resource consumption evaluation parameters.
[0075] Step S126: verifying the resource consumption evaluation parameters in the resource consumption evaluation process according to the dependent service status identifier, and adjusting the time interval parameters and the concurrent operation execution order in the operation execution parameter set based on the verification result.
[0076] Verify the resource consumption evaluation parameters during the resource consumption evaluation process based on the dependent service status identifier. The purpose of verification is to ensure that each test case does not affect the normal operation of the dependent service due to excessive resource consumption during execution.
[0077] If a test case's resource consumption assessment parameters are found to exceed the tolerance of the dependent service, adjust the interval parameters and the order of concurrent operations in the operation execution parameter set based on the verification results. For example, you can increase the interval between operations, reduce the number of concurrent operations, or adjust the execution order of certain operations to reduce resource consumption.
[0078] When adjusting time interval parameters and the order in which concurrent operations are executed, you can use optimization algorithms. For example, you can simulate different adjustment scenarios, calculate the resource consumption under each scenario, and then select the scenario that minimizes resource consumption while meeting the status requirements of dependent services.
[0079] Step S127: updating the initial test case set based on the adjusted operation execution parameter set to generate a dynamic test case set.
[0080] The initial test case set is updated based on the adjusted set of operation execution parameters. The updating process includes modifying information such as the operation time interval and concurrent operation execution order in each test case.
[0081] By updating the initial test case set, a dynamic test case set is finally generated. The test cases in this dynamic test case set take into account resource consumption and dependent service status requirements, and can more accurately simulate real user operations in different scenarios, providing more effective test cases for subsequent testing work.
[0082] Step S130: calling a resource scheduling engine to execute the dynamic test case set in the virtualized environment instance, and monitoring the running status data of the pre-installed operating system and the pre-installed software set.
[0083] After generating a dynamic test case set, the resource scheduling engine is invoked to execute the set within the virtualized environment instance and monitor the operational status of the pre-installed operating system and pre-installed software. The resource scheduling engine rationally allocates resources within the virtualized environment to ensure the smooth execution of each test case. Monitoring operational status data is used to understand the performance and stability of the pre-installed operating system and pre-installed software during test case execution.
[0084] Step S131: Obtain resource dependency parameters of each test case in the dynamic test case set.
[0085] To execute a dynamic test case collection, you first need to obtain the resource dependency parameters for each test case. These parameters describe the system resources required by each test case during execution, such as CPU resources, memory resources, and disk I / O resources. By understanding these resource dependency parameters, the resource scheduling engine can better allocate resources.
[0086] Resource dependency parameters can be obtained by extracting them from the configuration information of a dynamic test case collection. Each test case records its required resource information when it is generated. This information is extracted and organized into a set of resource dependency parameters. For example, for a test case involving extensive data processing, its resource dependency parameters may indicate the need for high CPU usage and a large amount of memory space.
[0087] Step S132: Generate a resource allocation strategy based on the resource configuration parameters of the virtualized environment instance and the resource dependency parameters of each test case in the dynamic test case set, wherein the resource allocation strategy includes a test case execution priority queue and a parallel execution thread number constraint rule.
[0088] The resource allocation strategy is generated based on the resource configuration parameters of the virtualization environment instance and the resource dependency parameters of each test case. Resource configuration parameters include the total number of virtual thread pool threads in the virtualization driver layer, the dynamically allocated block capacity threshold of the virtual memory space, the maximum logical storage unit throughput rate of the virtual disk mapping file, and the number of concurrent driver interfaces in the virtual peripheral driver adaptation layer.
[0089] The process of generating a resource allocation strategy is as follows:
[0090] Step S1321: extract the total number of virtual thread pool threads of the virtualization driver layer, the dynamically allocated block capacity threshold of the virtual memory space, the maximum logical storage unit throughput rate of the virtual disk mapping file, and the number of concurrent driver interfaces of the virtual peripheral driver adaptation layer to form a multi-dimensional resource configuration parameter set.
[0091] The resource configuration information for each key component in the virtualized environment instance is extracted to form a multidimensional set of resource configuration parameters. Each parameter in this multidimensional set represents the available amount of a specific resource in the virtualized environment. For example, the total number of threads in the virtual thread pool reflects the number of threads available for concurrent execution of tasks in the virtualized environment, while the dynamically allocated block capacity threshold of the virtual memory space indicates the amount of memory that can be dynamically allocated to test cases.
[0092] Step S1322: performing dimensional standardization conversion on the heterogeneous parameters in the multi-dimensional resource configuration parameter set to generate a standardized resource capacity vector, wherein the standardized resource capacity vector includes a dimensionless capacity score corresponding to each resource type.
[0093] Because the parameters in a multidimensional resource configuration parameter set have different dimensions and value ranges, these heterogeneous parameters need to be normalized to facilitate subsequent calculations and comparisons. The purpose of normalization is to convert parameters with different dimensions into dimensionless values so that they can be compared on the same dimension.
[0094] The dimensional standardization conversion process can be performed by first determining the value range of each parameter, and then mapping each parameter value to a set interval, such as between 0 and 1. For example, for the total number of threads in the virtual thread pool, the maximum and minimum values are first determined, and then the current total number of threads is converted to a value between 0 and 1 according to a set formula. In this way, the multidimensional resource configuration parameter set is converted into a standardized resource capacity vector, where each element represents the dimensionless capacity score of a resource type.
[0095] Step S1323: Map the resource dependency parameters of each test case in the dynamic test case set to the corresponding resource type dimension and calculate the standardized resource requirement vector.
[0096] Based on the resource dependency parameters of each test case in the dynamic test case set, it is mapped to the corresponding resource type dimension. The resource dependency parameters of each test case describe its requirements for different resource types, and these requirements are classified and organized according to resource types.
[0097] Next, the resource requirements of each test case are normalized to calculate a standardized resource requirement vector. This normalization process is similar to the normalization transformation of a multidimensional resource configuration parameter set, mapping each test case's resource requirement value to a range between 0 and 1. This way, each test case has a corresponding standardized resource requirement vector, reflecting its relative requirements for various resources.
[0098] Step S1324: Match the standardized resource capacity vector with the standardized resource requirement vector of each test case to generate a resource adaptation coefficient sequence.
[0099] The standardized resource capacity vector is matched with the standardized resource requirement vector for each test case. The matching process compares the degree of compatibility between each test case's resource requirements and the available resources in the virtualized environment. The resource compatibility coefficient can be calculated by calculating the similarity or difference between the two vectors.
[0100] For example, the vector dot product method can be used to calculate the resource fitness coefficient. The standardized resource capacity vector is multiplied by the corresponding elements of the standardized resource demand vector, and the results are added together to obtain a numerical value, which is the resource fitness coefficient. By performing this calculation for each test case, a sequence of resource fitness coefficients is generated. Each element in this sequence represents the degree of fitness between a test case and the virtualized environment resources.
[0101] Step S1325: Prioritize the dynamic test case set according to the resource adaptation coefficient sequence to generate a test case execution priority queue.
[0102] The dynamic test case set is prioritized according to the resource adaptation coefficient sequence. The higher the resource adaptation coefficient, the better the test case is adapted to the virtualized environment resources and the higher the priority should be for execution.
[0103] The sorting process can use a sorting algorithm such as bubble sort or quick sort. The dynamic test case set is sorted from high to low according to the resource adaptability coefficient to generate a test case execution priority queue. In this test case execution priority queue, the test cases at the front have a higher execution priority.
[0104] Step S1326: Based on the proportional relationship between the total number of virtual thread pool threads of the virtualization driver layer and the dynamically allocated block capacity threshold of the virtual memory space, calculate the maximum number of concurrent threads in the parallel execution thread number constraint rule and the memory allocation upper limit of each thread.
[0105] Based on the proportional relationship between the total number of virtual thread pool threads in the virtualization driver layer and the dynamically allocated block capacity threshold of the virtual memory space, the maximum number of concurrent threads in the parallel execution thread number constraint rule and the memory allocation upper limit of each thread are calculated.
[0106] First, determine the ratio between the total number of threads in the virtual thread pool and the dynamically allocated block capacity threshold of the virtual memory space. This ratio reflects the relative distribution of thread resources and memory resources in the virtualization environment. Then, based on this ratio and the system's performance requirements, calculate the maximum number of concurrent threads and the upper limit of memory allocation for each thread.
[0107] For example, if the total number of threads in the virtual thread pool is large, and the dynamically allocated block capacity threshold of the virtual memory space is relatively small, then in order to avoid memory resource exhaustion, it may be necessary to lower the maximum number of concurrent threads and appropriately reduce the memory allocation limit for each thread.
[0108] Step S1327: The test case execution priority queue and the parallel execution thread number constraint rule are integrated to generate a resource allocation strategy including a time slice rotation strategy and a resource preemption threshold configuration.
[0109] By integrating the test case execution priority queue with the constraints on the number of parallel execution threads, a resource allocation strategy is generated, including a time-slice rotation strategy and resource preemption threshold configuration. The time-slice rotation strategy determines the length of time each test case can occupy resources during execution, while the resource preemption threshold configuration specifies the circumstances under which resources can be preempted from other test cases.
[0110] During the integration process, it's important to consider test case priorities and the limits on the number of parallel execution threads. Higher-priority test cases can be allocated longer time slices and more resources. Additionally, appropriate resource preemption thresholds should be set based on resource usage and system performance requirements. For example, if a test case's resource usage exceeds a set threshold, other higher-priority test cases can be allowed to preempt some of its resources.
[0111] Step S133: loading the dynamic test case set into the virtualization driver layer in the virtualization environment instance according to the test case execution priority queue, activating virtual threads based on the parallel execution thread number constraint rule, and injecting the dynamic test case set.
[0112] Dynamic test case collections are loaded into the virtualization driver layer within the virtualized environment instance, following the test case execution priority queue. The virtualization driver layer is the core component responsible for managing and scheduling resources within the virtualized environment. Loading test cases here ensures their execution within the virtualized environment.
[0113] Based on the parallel execution thread count constraint, virtual threads are activated and a dynamic test case collection is injected. Based on the maximum number of concurrent threads specified in the parallel execution thread count constraint, the corresponding number of virtual threads is activated. Test cases are then assigned to these virtual threads in order of priority and begin execution.
[0114] When injecting dynamic test case collections, ensure that each test case receives appropriate resource allocation. Prioritize resource allocation for higher-priority test cases to ensure smooth execution. Furthermore, dynamically adjust resource allocation based on time-slice rotation policies and resource preemption threshold configurations to ensure overall system performance and stability.
[0115] Step S134: collecting kernel event logs of the preinstalled operating system and process status snapshots of the preinstalled software set in real time, and extracting a multi-dimensional operation indicator set.
[0116] During the execution of the dynamic test case set, the kernel event log of the pre-installed operating system and the process status snapshots of the pre-installed software set are collected in real time. The kernel event log records various events during the operation of the operating system kernel, such as system calls and interrupt processing. The process status snapshot reflects the current status of each process in the pre-installed software set, such as CPU utilization and memory usage.
[0117] By analyzing kernel event logs and process status snapshots, we extract a multi-dimensional set of operational metrics. These metrics can include CPU usage, memory usage, disk I / O rate, process response time, and more. Each metric reflects the operational status of the pre-installed operating system and pre-installed software from a different perspective.
[0118] You can use built-in monitoring tools or specialized performance monitoring software to collect kernel event logs and process status snapshots. Organize and analyze the collected data to extract the required multi-dimensional operational indicators.
[0119] Step S135: establishing a dynamic mapping relationship between the multi-dimensional operation indicator set and the real-time resource load parameters of the virtualization environment instance, and generating operation status data with a timestamp.
[0120] A dynamic mapping relationship is established between a multi-dimensional set of operating indicators and the real-time resource load parameters of the virtualized environment instance. The real-time resource load parameters include the virtual thread pool usage of the virtualization driver layer, the occupancy of the virtual memory space, and the read and write rates of the virtual disk mapping file.
[0121] By analyzing the relationship between multi-dimensional operational metrics and real-time resource load parameters, we can understand the interplay between the operational status of the pre-installed operating system and pre-installed software and virtualized environment resource usage. For example, when a test case executes, CPU utilization increases, and virtual thread pool usage also changes accordingly.
[0122] Based on this dynamic mapping, time-stamped operational status data is generated. The timestamp records the time each operational status data point was collected, enabling more accurate analysis of system performance at different points in time. Multi-dimensional operational indicator sets and real-time resource load parameters are organized chronologically to generate time-stamped operational status data, providing data support for subsequent anomaly analysis and report generation.
[0123] Step S140: extracting abnormal response patterns from the operating status data and generating an environmental compatibility analysis report.
[0124] After acquiring the time-stamped operational status data, you need to extract abnormal response patterns and generate an environmental compatibility analysis report. Abnormal response patterns are patterns in the operational status data that do not conform to normal operating rules. These patterns may indicate compatibility issues between the pre-installed operating system and pre-installed software set and the virtualization environment.
[0125] Step S141: Compare the operating status data with a predefined baseline operating mode dimension by dimension, and calculate the real-time deviation parameter of each dimensional indicator. The baseline operating mode includes a standard operating indicator range corresponding to the target notebook hardware architecture.
[0126] Compare the operating status data dimension by dimension with a predefined baseline operating mode. The baseline operating mode is a set of pre-set standard operating indicator ranges determined based on the target notebook hardware architecture and operating data under normal usage.
[0127] During the comparison process, for each metric in the operating status data, a real-time deviation parameter is calculated from the corresponding metric range in the baseline operating mode. This real-time deviation parameter reflects the degree of difference between the current operating status and the standard operating status. For example, if a metric is CPU usage, and the baseline operating mode specifies a specific CPU usage range, the real-time deviation parameter is calculated based on the deviation of the current CPU usage from that range.
[0128] To calculate the real-time deviation parameter, first determine the center value of the indicator interval, then calculate the difference between the current indicator value and the center value, and then divide the difference by the width of the indicator interval to obtain a relative deviation value. By performing this calculation for each dimension indicator, a set of real-time deviation parameters is obtained.
[0129] Step S142: performing dynamic threshold segmentation on the real-time deviation parameter based on a sliding time window, identifying abnormal fluctuation segments exceeding the dynamic threshold, and generating an abnormal event set with a timestamp.
[0130] Dynamic threshold segmentation is applied to real-time deviation parameters based on a sliding time window. A sliding time window is a fixed-length interval within which real-time deviation parameters are analyzed. Dynamic thresholds are dynamically adjusted based on historical data and current operating conditions to determine whether real-time deviation parameters are abnormal.
[0131] Within the sliding time window, the real-time deviation parameter is continuously sampled. The baseline operating parameter distribution of each dimension metric within the sliding time window is calculated based on historical statistical parameters. The percentile corresponding to the historical anomaly probability is selected to generate the dynamic threshold range. For example, the 95th percentile is selected as the upper limit of the dynamic threshold, and the 5th percentile is selected as the lower limit.
[0132] Consecutive sampling points that exceed the dynamic threshold range are merged into abnormal fluctuation segments, and the start and end timestamps of each abnormal fluctuation segment are recorded. This allows the occurrence time and duration of each abnormal fluctuation segment to be determined.
[0133] The peak deviation, fluctuation duration, and associated fluctuation coefficients of adjacent dimensional indicators in the abnormal fluctuation segment are extracted. The fluctuation contribution of each dimensional indicator is weighted and fused to generate a characteristic fingerprint of the abnormal fluctuation segment. The characteristic fingerprint is a unique identifier of the abnormal fluctuation segment and is used for subsequent cluster analysis and pattern matching.
[0134] Abnormal fluctuation segments are clustered and grouped based on their characteristic fingerprints, and abnormal fluctuation segments within the same cluster group are marked as homologous abnormal events. This generates a timestamped abnormal event set that contains all identified abnormal events and their occurrence times.
[0135] Step S143: constructing a multi-dimensional abnormal feature vector according to the dimensional distribution density and duration parameters of each abnormal fluctuation segment in the abnormal event set.
[0136] A multidimensional anomaly feature vector is constructed based on the dimensional distribution density and duration parameters of each abnormal fluctuation segment in the abnormal event set. The dimensional distribution density reflects the distribution of abnormal fluctuations across different dimensional indicators, while the duration parameter indicates how long the abnormal fluctuation lasts.
[0137] The dimension distribution density and duration parameter are used as elements of a multidimensional anomaly feature vector. Each abnormal fluctuation segment corresponds to a multidimensional anomaly feature vector that describes the characteristics of the abnormal fluctuation. For example, if there are three dimension indicators, the multidimensional anomaly feature vector may contain three dimension distribution density values and one duration parameter value.
[0138] By constructing multidimensional abnormal feature vectors for all abnormal fluctuation fragments, the abnormal event set can be converted into a feature vector set, which is convenient for subsequent pattern matching and analysis.
[0139] Step S144: matching the multi-dimensional abnormal feature vector with the fault feature vectors in a pre-stored compatibility fault mode library to determine the abnormal response mode and the associated hardware component or software module.
[0140] The multi-dimensional abnormal feature vector is matched with the fault feature vector in the pre-stored compatibility fault mode library. The compatibility fault mode library is a pre-established database containing various known compatibility fault modes, each of which has a corresponding fault feature vector.
[0141] The matching process can adopt similarity calculation methods, such as Euclidean distance, cosine similarity, etc. The similarity between the multi-dimensional abnormal feature vector and the fault feature vector is calculated to find the fault feature vector with the highest similarity.
[0142] Based on the matching results, the abnormal response pattern and the associated hardware component or software module are determined. If a multidimensional abnormal feature vector is highly similar to a fault feature vector in the compatibility fault pattern library, the abnormal response pattern corresponding to the abnormal event can be assumed to be the fault pattern. The associated hardware component or software module can then be determined based on the description of the fault pattern.
[0143] Step S145: Count the triggering frequency and resource load parameter fluctuation range of each abnormal response mode in the virtualized environment instance, and generate an environment compatibility analysis report, which includes an abnormality type distribution matrix, hardware component compatibility score and software module stability rating.
[0144] Count the trigger frequency and resource load parameter fluctuation range of each abnormal response pattern in the virtualized environment instance. The trigger frequency refers to the number of times a certain abnormal response pattern occurs during the test, while the resource load parameter fluctuation range reflects the degree of change in the resource load parameter when the abnormal event occurs.
[0145] Based on the statistical results, an environmental compatibility analysis report is generated. This report includes an anomaly type distribution matrix, hardware component compatibility scores, and software module stability ratings. The anomaly type distribution matrix shows the distribution of different anomaly types during testing. The hardware component compatibility scores reflect the compatibility of each hardware component with the pre-installed operating system and pre-installed software set. The software module stability ratings assess the stability of each software module in the virtualized environment.
[0146] Generating an anomaly type distribution matrix can be done by classifying and statistically analyzing anomaly response patterns and calculating the frequency of each anomaly type. Hardware component compatibility scores can be evaluated based on the hardware components associated with an anomaly event and their trigger frequency. A higher trigger frequency indicates poorer compatibility. Software module stability ratings can be evaluated based on the software module's involvement in the anomaly event and the fluctuation range of resource load parameters. A greater fluctuation range indicates poorer stability of the software module.
[0147] Step S150: adjusting resource configuration parameters of the virtualization environment instance according to the environment compatibility analysis report to generate an optimized pre-installed environment image file.
[0148] Based on the generated environment compatibility analysis report, the resource configuration parameters of the virtualization environment instance are adjusted to improve the compatibility of the pre-installed operating system and pre-installed software set with the virtualization environment. Finally, an optimized pre-installation environment image file is generated, which can be used for subsequent laptop pre-installation environment deployment.
[0149] Step S151: parsing the anomaly type distribution matrix, and extracting anomaly response pattern identifiers associated with hardware component compatibility scores and software module stability ratings.
[0150] Parse the anomaly type distribution matrix to extract anomaly response pattern identifiers associated with hardware component compatibility scores and software module stability ratings. The anomaly type distribution matrix records the distribution of different anomaly types. By analyzing the data in the matrix, we can identify anomaly response patterns that are related to hardware component compatibility and software module stability.
[0151] Each exception response pattern is assigned a unique identifier. These identifiers are extracted to form a set of exception response pattern identifiers associated with the hardware component compatibility score and software module stability rating. This set of exception response pattern identifiers will serve as the basis for subsequent adjustments to resource configuration parameters.
[0152] Step S152: Match a parameter correction rule set in a preset resource configuration adjustment policy library according to the abnormal response pattern identifier, wherein the parameter correction rule set includes a processor virtual thread increment coefficient, a memory block dynamic allocation ratio correction factor, a storage device interface protocol simulation rate adjustment parameter, and a peripheral driver interface concurrency optimization threshold.
[0153] Based on the exception response pattern identifier, a corresponding parameter modification rule set is matched in a pre-set resource configuration adjustment policy library. The resource configuration adjustment policy library is a pre-established database containing various resource configuration adjustment policies. Each exception response pattern identifier corresponds to a set of parameter modification rules. These parameter modification rule sets include various parameters used to adjust resource configuration, such as the processor virtual thread increment coefficient, the memory block dynamic allocation ratio correction factor, the storage device interface protocol emulation rate adjustment parameter, and the peripheral driver interface concurrency optimization threshold. By matching the exception response pattern identifier, a resource configuration adjustment policy for a specific exception situation can be found. The specific matching process involves using the exception response pattern identifier as an index to search the resource configuration adjustment policy library for the corresponding parameter modification rule set. The resource configuration adjustment policy library may use a data structure (such as a hash table) to store these rules to improve search efficiency. Once a matching rule set is found, the modification rules for each parameter within it can be retrieved. For example, if the exception response pattern identifier indicates that the exception is caused by insufficient processor resources, the corresponding parameter modification rule set may include a processor virtual thread increment coefficient, which is used to increase the number of virtual threads on the processor to improve its processing power.
[0154] Step S153: Calculate the total thread amount adjustment of the virtual thread pool of the virtualization driver layer based on the hardware component compatibility score, and determine the dynamic allocation block capacity threshold scaling ratio of the virtual memory space according to the software module stability rating.
[0155] The virtualization driver layer calculates the total thread pool thread adjustment based on the hardware component compatibility score. The hardware component compatibility score reflects the compatibility between the hardware component and the pre-installed operating system and pre-installed software. A low score indicates a potential bottleneck in the hardware component's operation, necessitating an adjustment to the total thread pool thread count to improve performance. When calculating the adjustment, the relationship between the hardware component compatibility score and the total thread pool thread count adjustment must be determined. This relationship can be achieved using a pre-defined mapping function. For example, when the hardware component compatibility score falls below a certain threshold, the total thread pool thread count is increased by a pre-defined ratio. Assuming the hardware component compatibility score is A and the pre-defined mapping function is f(A), the total thread pool thread count adjustment B can be expressed as B = f(A).
[0156] Meanwhile, determine the scaling ratio of the dynamic allocation block capacity threshold of the virtual memory space according to the software module stability rating. The software module stability rating reflects the stability degree of the software module in the virtualization environment. If the rating is low, it indicates that problems such as insufficient memory may occur during the operation of the software module, and it is necessary to adjust the dynamic allocation block capacity threshold of the virtual memory space. The process of determining the scaling ratio can also be completed through a pre-set mapping relationship. Let the software module stability rating be C, and the corresponding mapping function be g(C), then the scaling ratio D of the dynamic allocation block capacity threshold of the virtual memory space can be expressed as D = g(C).
[0157] Step S154: Update the maximum logical storage unit throughput rate of the virtual disk mapping file according to the storage device interface protocol simulation rate adjustment parameter, and reconfigure the upper limit of the concurrent interface call frequency in the protocol simulation strategy of the virtual peripheral driver adaptation layer based on the optimization threshold of the peripheral driver interface concurrency number.
[0158] Update the maximum logical storage unit throughput rate of the virtual disk mapping file according to the storage device interface protocol simulation rate adjustment parameter. The storage device interface protocol simulation rate adjustment parameter is obtained from the parameter correction rule set, and it is used to adjust the data transfer rate of the virtual disk mapping file. The process of updating the maximum logical storage unit throughput rate is to multiply the current maximum logical storage unit throughput rate by the storage device interface protocol simulation rate adjustment parameter to obtain the updated maximum logical storage unit throughput rate. Let the current maximum logical storage unit throughput rate be E, and the storage device interface protocol simulation rate adjustment parameter be F, then the updated maximum logical storage unit throughput rate G can be expressed as G = E × F.
[0159] Reconfigure the upper limit of the concurrent interface call frequency in the protocol simulation strategy of the virtual peripheral driver adaptation layer based on the optimization threshold of the peripheral driver interface concurrency number. The optimization threshold of the peripheral driver interface concurrency number is set to optimize the concurrency performance of the peripheral driver interface. When reconfiguring the upper limit of the concurrent interface call frequency, compare the current upper limit of the concurrent interface call frequency with the optimization threshold of the peripheral driver interface concurrency number. If the current upper limit is higher than the threshold, adjust the upper limit of the concurrent interface call frequency to the threshold; if the current upper limit is lower than the threshold, appropriately increase the upper limit of the concurrent interface call frequency according to the set rules. Let the current upper limit of the concurrent interface call frequency be H, and the optimization threshold of the peripheral driver interface concurrency number be I, then the determination rule for the reconfigured upper limit of the concurrent interface call frequency J is: if H > I, then J = I; if H < I, then J = H + K (K is the increment value determined according to the set rules).
[0160] Step S155: The adjusted total number of virtual thread pool threads, the dynamically allocated block capacity threshold, the maximum logical storage unit throughput rate, and the upper limit of the concurrent interface call frequency are integrated to generate an optimized resource configuration parameter set.
[0161] The adjusted total number of virtual thread pool threads, the dynamically allocated block capacity threshold, the maximum logical storage unit throughput rate, and the upper limit on concurrent interface call frequency are combined to generate an optimized resource configuration parameter set. The fusion process combines these adjusted parameters to form a new resource configuration parameter set. These parameters can be stored in a data structure (such as an array or list). Assuming the adjusted total number of virtual thread pool threads is L, the dynamically allocated block capacity threshold is M, the maximum logical storage unit throughput rate is N, and the upper limit on concurrent interface call frequency is P, the optimized resource configuration parameter set Q can be expressed as Q = [L, M, N, P].
[0162] Step S156: injecting the optimized resource configuration parameter set into the initialization configuration template of the virtualization environment instance, triggering the resource scheduling engine to execute the verification test case set, and collecting the optimized multi-dimensional operation indicator set.
[0163] Inject the optimized resource configuration parameter set into the initialization configuration template of the virtualization environment instance. The initialization configuration template is the configuration file used when creating the virtualization environment instance. Injecting the optimized resource configuration parameter set into it enables the virtualization environment instance to use the new resource configuration parameters the next time it is started. The injection process updates the parameter values in the optimized resource configuration parameter set to the corresponding positions in the initialization configuration template.
[0164] After the injection is complete, the resource scheduling engine is triggered to execute a set of verification test cases. This set of verification test cases is a pre-prepared set of test cases used to verify the effectiveness of the optimized resource configuration. During the execution of the verification test case set, the optimized multi-dimensional operational indicator set is collected in real time. This collection method is similar to the previous one used to collect operational status data. By monitoring the kernel event logs of the pre-installed operating system and process status snapshots of the pre-installed software set, multi-dimensional operational indicators such as CPU utilization, memory utilization, and disk I / O rate are extracted.
[0165] Step S157: comparing the optimized multi-dimensional operating indicator set with a predefined standard operating indicator interval of a baseline operating mode to verify the elimination status of the abnormal response mode.
[0166] Compare the optimized multi-dimensional operating indicator set to the standard operating indicator ranges of the predefined baseline operating mode. The predefined baseline operating mode is a set of standard operating indicator ranges that represent the performance range of the system under normal operation. The comparison process compares each indicator value in the optimized multi-dimensional operating indicator set with the standard range of the corresponding indicator in the baseline operating mode.
[0167] For each indicator, if its value is within the standard range, the corresponding operating status is considered normal; if its value is outside the standard range, the corresponding operating status is considered to be abnormal. This comparison can verify the elimination of abnormal response patterns. If all indicators are within the standard range, it means that the abnormal response pattern has probably been eliminated; if some indicators still exceed the standard range, it means that the abnormal response pattern may still exist.
[0168] Step S158: When the triggering frequency of the abnormal response mode is lower than a preset fault tolerance threshold, the pre-installed environment image file is generated based on the optimized resource configuration parameter set and the verified virtualized environment instance.
[0169] When the trigger frequency of the abnormal response mode is lower than the preset fault tolerance threshold, it indicates that the optimized resource configuration has achieved good results and the system compatibility has been improved. At this time, a pre-installed environment image file is generated based on the optimized resource configuration parameter set and the verified virtualization environment instance. The process of generating a pre-installed environment image file is to package the configuration information and operating status of the optimized virtualization environment instance to form a pre-installed environment image file that can be used for deployment. This pre-installed environment image file contains a pre-installed operating system, a pre-installed software set, and optimized resource configuration parameters, and can be used for subsequent notebook pre-installed environment deployment.
[0170] Step S159: When the triggering frequency of the abnormal response mode is not lower than the preset fault tolerance threshold, the above steps are repeated until the preset maximum number of optimization iterations is reached or the fault tolerance threshold is met.
[0171] If the trigger frequency of the exception response mode is not lower than the preset fault tolerance threshold, it indicates that the optimized resource configuration has not completely resolved the compatibility issue and requires further adjustment. In this case, steps S151-S158 are repeated, i.e., re-parsing the exception type distribution matrix, matching the parameter correction rule set, adjusting the resource configuration parameters, executing the verification test case set, comparing the operating indicators, and verifying the elimination status of the exception response mode.
[0172] During the repeated execution process, a preset maximum number of optimization iterations must be set to avoid an infinite loop. If the triggering frequency of the abnormal response mode falls below the preset fault tolerance threshold before the preset maximum number of optimization iterations is reached, the iteration is terminated and the pre-installed environment image file is generated. If the triggering frequency of the abnormal response mode still does not fall below the preset fault tolerance threshold after the preset maximum number of optimization iterations is reached, the optimization process is deemed unable to further improve system compatibility. In this case, manual intervention or other measures can be taken according to the specific situation.
[0173] Figure 2 A schematic diagram illustrates exemplary hardware and software components of a virtualization-based laptop pre-installation environment simulation test system 100 that can implement the concepts of the present application, as provided in some embodiments of the present application. For example, the processor 120 can be used in the virtualization-based laptop pre-installation environment simulation test system 100 to perform the functions described in the present application.
[0174] The virtualization-based laptop pre-installation environment simulation test system 100 can be a general-purpose server or a special-purpose server, both of which can be used to implement the virtualization-based laptop pre-installation environment simulation test method of the present application. Although only one server is shown in this application, for convenience, the functions described in this application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0175] For example, the notebook pre-installed environment simulation test system 100 based on virtualization technology may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and storage media 140 in different forms, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the notebook pre-installed environment simulation test system 100 based on virtualization technology may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The notebook pre-installed environment simulation test system 100 based on virtualization technology also includes an I / O interface 150 between the computer and other input and output devices.
[0176] For ease of explanation, only one processor is described in the notebook pre-installed environment simulation test system 100 based on virtualization technology. However, it should be noted that the notebook pre-installed environment simulation test system 100 based on virtualization technology in this application can also include multiple processors, so the steps performed by one processor described in this application can also be performed jointly or individually by multiple processors. For example, if the processor of the notebook pre-installed environment simulation test system 100 based on virtualization technology executes step A and step B, it should be understood that step A and step B can also be performed jointly by two different processors or individually in one processor. For example, the first processor executes step A, the second processor executes step B, or the first processor and the second processor execute steps A and B together.
[0177] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When a processor executes the computer-executable instructions, the above-mentioned notebook pre-installation environment simulation test method based on virtualization technology is implemented.
[0178] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, multiple features are sometimes combined into one embodiment, figure or description thereof.
Claims
1. A notebook pre-installation environment simulation test method based on virtualization technology, characterized in that: The method comprises: Creating a virtualized environment instance that matches the target laptop's hardware architecture, the virtualized environment instance including a pre-installed operating system and a pre-installed software set; Injecting a simulated user operation behavior sequence into the virtualized environment instance according to a predefined environment configuration strategy to generate a dynamic test case set; Invoking a resource scheduling engine to execute the dynamic test case set in the virtualized environment instance and monitor the running status data of the preinstalled operating system and preinstalled software set; Extracting abnormal response patterns from the operating status data and generating an environmental compatibility analysis report; Adjusting resource configuration parameters of the virtualized environment instance according to the environmental compatibility analysis report to generate an optimized pre-installed environment image file; The step of creating a virtualized environment instance that matches the target laptop hardware architecture includes: Obtaining a hardware configuration data set of a target notebook, wherein the hardware configuration data set includes processor architecture information, memory capacity distribution information, storage device interface protocol information, and peripheral driver feature information; Building a virtualization driver layer based on the processor architecture information, wherein the virtualization driver layer includes a virtualization instruction conversion module compatible with the physical processor instruction set; Dividing a virtual memory space according to the memory capacity distribution information, wherein the virtual memory space includes a dynamically allocated memory block and a statically reserved system resource block; Parsing the storage device interface protocol information to generate a virtual disk mapping file, wherein the virtual disk mapping file includes logical storage units aligned with a partition structure of a physical storage device; Parsing the peripheral driver feature information, extracting the type identifier and communication protocol version of the physical peripheral device, and generating a virtual peripheral driver adaptation layer, wherein the virtual peripheral driver adaptation layer includes a set of driver interfaces classified based on device type and is configured with a protocol emulation strategy that matches the physical peripheral device; The virtualization driver layer, the virtual memory space, the virtual disk mapping file and the virtual peripheral driver adaptation layer are integrated to generate an initialization configuration template for the virtualization environment instance.
2. The method for simulating and testing a pre-installed notebook environment based on virtualization technology according to claim 1, wherein: The constructing of a virtualization driver layer based on the processor architecture information includes: Traversing the operation instruction set in the processor architecture information to identify abnormal instruction fragments that conflict with the target virtualization platform; Performing instruction remapping processing on the abnormal instruction fragment based on a conflict resolution strategy to generate an alternative instruction sequence; Encapsulating the replacement instruction sequence into an instruction conversion buffer and configuring a buffer overflow protection mechanism; Creating a virtualized thread pool according to the number of parallel computing units of the processor architecture information, wherein the virtualized thread pool includes a virtual thread allocation strategy that matches the number of physical processor cores; A dynamic scheduling link is established between the instruction conversion buffer and the virtualization thread pool, and a real-time response interface of the virtualization driver layer is generated.
3. The method for simulating and testing a pre-installed environment of a notebook computer based on virtualization technology according to claim 1, wherein: The step of injecting a simulated user operation behavior sequence into the virtualized environment instance according to a predefined environment configuration strategy to generate a dynamic test case set includes: Parsing the operation trigger condition set and the operation execution parameter set in the predefined environment configuration policy, wherein the operation trigger condition set includes an event trigger time window, a concurrent operation number threshold, and a dependent service status identifier; Decomposing the simulated user operation behavior sequence into a queue of atomic operation units, each atomic operation unit including an operation type identifier, a target object path, and an input parameter set; Filtering candidate atomic operation units that meet the service dependency relationship in the atomic operation unit queue according to the dependent service status identifier, and performing temporal arrangement and combination of the candidate atomic operation units based on the event triggering time window; Based on the concurrent operation number threshold, the candidate atomic operation units after the time sequence arrangement and combination are concurrently grouped to generate an initial test case set; Performing resource consumption evaluation on each test case in the initial test case set, and calculating resource consumption evaluation parameters for each test case; Verifying resource consumption evaluation parameters in a resource consumption evaluation process according to the dependent service status identifier, and adjusting time interval parameters and a concurrent operation execution order in the operation execution parameter set based on the verification result; The initial test case set is updated based on the adjusted operation execution parameter set to generate a dynamic test case set.
4. The method for simulating and testing a pre-installed notebook environment based on virtualization technology according to claim 1, wherein: The calling of the resource scheduling engine to execute the dynamic test case set in the virtualized environment instance and monitor the running status data of the pre-installed operating system and the pre-installed software set includes: Obtaining resource dependency parameters of each test case in the dynamic test case set; Generate a resource allocation strategy based on the resource configuration parameters of the virtualized environment instance and the resource dependency parameters of each test case in the dynamic test case set, wherein the resource allocation strategy includes a test case execution priority queue and a parallel execution thread number constraint rule; Loading the dynamic test case set into the virtualization driver layer in the virtualization environment instance according to the test case execution priority queue, activating virtual threads based on the parallel execution thread number constraint rule and injecting the dynamic test case set; Collecting kernel event logs of the preinstalled operating system and process status snapshots of the preinstalled software set in real time, and extracting a multi-dimensional operating indicator set; A dynamic mapping relationship between the multi-dimensional operation indicator set and the real-time resource load parameters of the virtualization environment instance is established to generate operation status data with a timestamp.
5. The method for simulating and testing a pre-installed environment of a notebook computer based on virtualization technology according to claim 4, wherein: Generating a resource allocation strategy according to the resource configuration parameters of the virtualized environment instance and the resource dependency parameters of each test case in the dynamic test case set includes: Extract the total number of virtual thread pool threads of the virtualization driver layer, the dynamically allocated block capacity threshold of the virtual memory space, the maximum logical storage unit throughput rate of the virtual disk mapping file, and the number of concurrent driver interfaces of the virtual peripheral driver adaptation layer to form a multi-dimensional resource configuration parameter set; Performing dimensional standardization conversion on heterogeneous parameters in the multi-dimensional resource configuration parameter set to generate a standardized resource capacity vector, wherein the standardized resource capacity vector includes a dimensionless capacity score corresponding to each resource type; According to the resource dependency parameters of each test case in the dynamic test case set, mapping to the corresponding resource type dimension and calculating the standardized resource requirement vector; Matching the standardized resource capacity vector with the standardized resource requirement vector of each test case to generate a resource adaptation coefficient sequence; Prioritizing the dynamic test case set according to the resource adaptation coefficient sequence to generate a test case execution priority queue; Calculate the maximum number of concurrent threads and the upper limit of memory allocation for each thread in the parallel execution thread number constraint rule based on the proportional relationship between the total number of virtual thread pool threads of the virtualization driver layer and the dynamically allocated block capacity threshold of the virtual memory space; The test case execution priority queue and the parallel execution thread number constraint rule are integrated to generate a resource allocation strategy including a time slice rotation strategy and a resource preemption threshold configuration.
6. The method for simulating and testing a pre-installed environment for a notebook computer based on virtualization technology according to claim 1, wherein: The extracting of abnormal response patterns from the operating status data and generating an environmental compatibility analysis report includes: Comparing the operating status data with a predefined baseline operating mode dimension by dimension, and calculating a real-time deviation parameter for each dimension indicator, wherein the baseline operating mode includes a standard operating indicator range corresponding to the target notebook hardware architecture; Performing dynamic threshold segmentation on the real-time deviation parameter based on a sliding time window, identifying abnormal fluctuation segments exceeding the dynamic threshold, and generating an abnormal event set with a timestamp; Constructing a multidimensional abnormal feature vector according to the dimensional distribution density and duration parameters of each abnormal fluctuation segment in the abnormal event set; Matching the multi-dimensional abnormal feature vector with the fault feature vectors in a pre-stored compatibility fault mode library to determine the abnormal response mode and the associated hardware component or software module; The triggering frequency and resource load parameter fluctuation range of each abnormal response mode in the virtualization environment instance are counted to generate an environment compatibility analysis report, which includes an abnormality type distribution matrix, hardware component compatibility score and software module stability rating.
7. The method for simulating and testing a pre-installed environment of a notebook computer based on virtualization technology according to claim 6, wherein: The method of performing dynamic threshold segmentation on the real-time deviation parameter based on the sliding time window, identifying abnormal fluctuation segments exceeding the dynamic threshold, and generating an abnormal event set with a timestamp includes: Calculate the baseline operating parameter distribution of each dimension indicator within the sliding time window based on historical statistical parameters, and select the percentile corresponding to the historical anomaly probability to generate a dynamic threshold interval; Continuously sampling the real-time deviation parameter within the sliding time window, merging the continuous sampling points that exceed the dynamic threshold interval into abnormal fluctuation segments, and recording the start timestamp and end timestamp of each abnormal fluctuation segment; Extract the peak deviation, fluctuation duration and associated fluctuation coefficient of adjacent dimensional indicators in the abnormal fluctuation segment, perform weighted fusion of the fluctuation contribution of each dimensional indicator, and generate the characteristic fingerprint of the abnormal fluctuation segment; The abnormal fluctuation segments are clustered and grouped according to the characteristic fingerprint, and the abnormal fluctuation segments in the same cluster group are marked as homologous abnormal events, and a set of abnormal events with timestamps is generated.
8. The method for simulating and testing a pre-installed environment of a notebook computer based on virtualization technology according to claim 6, wherein: The adjusting the resource configuration parameters of the virtualized environment instance according to the environmental compatibility analysis report to generate an optimized pre-installed environment image file includes: parsing the anomaly type distribution matrix to extract anomaly response pattern identifiers associated with hardware component compatibility scores and software module stability ratings; Matching a parameter correction rule set in a preset resource configuration adjustment policy library according to the abnormal response mode identifier, the parameter correction rule set including a processor virtual thread increment coefficient, a memory block dynamic allocation ratio correction factor, a storage device interface protocol simulation rate adjustment parameter, and a peripheral driver interface concurrent number optimization threshold; Calculating an adjustment amount for the total number of threads in a virtual thread pool of a virtualization driver layer based on the hardware component compatibility score, and determining a scaling ratio of a dynamically allocated block capacity threshold of a virtual memory space based on the software module stability rating; The maximum logical storage unit throughput rate of the virtual disk mapping file is updated according to the storage device interface protocol emulation rate adjustment parameter, and the upper limit of the concurrent interface call frequency in the protocol emulation strategy of the virtual peripheral driver adaptation layer is reconfigured based on the peripheral driver interface concurrent number optimization threshold; The adjusted total number of virtual thread pool threads, the dynamically allocated block capacity threshold, the maximum logical storage unit throughput rate, and the upper limit of the concurrent interface call frequency are integrated to generate an optimized resource configuration parameter set; Injecting the optimized resource configuration parameter set into the initialization configuration template of the virtualized environment instance, triggering the resource scheduling engine to execute the verification test case set, and collecting the optimized multi-dimensional operation indicator set; Comparing the optimized multi-dimensional operating indicator set with a predefined standard operating indicator interval of a baseline operating mode to verify the elimination status of the abnormal response mode; When the triggering frequency of the abnormal response mode is lower than a preset fault tolerance threshold, generating the pre-installed environment image file based on the optimized resource configuration parameter set and the verified virtualized environment instance; When the triggering frequency of the abnormal response mode is not lower than the preset fault tolerance threshold, the above steps are repeated until the preset maximum number of optimization iterations is reached or the fault tolerance threshold is met.
9. A notebook pre-installed environment simulation test system based on virtualization technology, characterized in that: It includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the notebook pre-installed environment simulation test method based on virtualization technology as described in any one of claims 1-8 above.
Citation Information
Patent Citations
Virtualization platform hardware compatibility test method
CN111176964A
Automatic test method for reducing test technical threshold of intelligent terminal system
CN117931620A