Server simulation method and device, electronic equipment and readable storage medium

By obtaining and matching server parameters and hardware parameters, adding or updating simulated servers solves the problems of difficulty in operation and maintenance and high management costs caused by changes in server models and versions, and achieves the effects of reducing management costs and improving efficiency.

CN119336571APending Publication Date: 2025-01-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411380372.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

With the iterative update of server models and versions, it is difficult for management software developers to conduct comprehensive compatibility testing, resulting in increased server operation and maintenance difficulties and high management costs.

Method used

By obtaining the server parameters and hardware parameters of the simulation server, the matching of the pre -category simulation server attribute information is performed to add or update the simulation server to simulate the required machines and configurations.

Benefits of technology

It reduces server management costs, improves management efficiency, reduces the server simulation process, reduces workload, and enables quick and stable server simulation and compatibility management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336571A_ABST
    Figure CN119336571A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer science, and provides a server simulation method and device, electronic equipment and a readable storage medium, and the method comprises the steps: obtaining server parameters of a to-be-simulated server, the server parameters comprising a server model, a substrate management controller parameter and a basic input / output system parameter; a configuration document of the to-be-simulated server is obtained, hardware parameters contained in the configuration document are extracted, and the hardware parameters comprise a central processing unit parameter, a hard disk parameter and a disk array parameter; matching the server parameters and the hardware parameters with pre-stored attribute information of a classification simulation server; and according to a matching result, by utilizing the hardware parameters and the server parameters, newly adding a first simulation server in the classification simulation server, or updating a second simulation server in the classification simulation server. According to the technical scheme provided by one or more embodiments, the server management cost can be reduced, and the server management efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer science and technology, and in particular to a server simulation method, device, electronic device and readable storage medium. Background Art

[0002] With the advent of the digital age, the scope of server use is becoming wider and wider, and the number of servers in the market is increasing. Centralized management of servers has become an indispensable requirement and a big challenge for server management software developers.

[0003] With the iterative updates of server models and versions by server manufacturers, there are now many types of servers on the market, and the servers have been in use for a long time. After the machines have been on the market for a period of time, the developers of the management software may not have so many server types to conduct subsequent compatibility testing, which makes it more difficult to operate and maintain the servers. Summary of the invention

[0004] In view of this, one or more embodiments of the present disclosure provide a server simulation method, device, electronic device and readable storage medium, which can simulate server operations, simulate the required machines and configurations, reduce server management costs, and improve server management efficiency.

[0005] On the one hand, the present disclosure provides a server simulation method, which includes: obtaining server parameters of a server to be simulated, wherein the server parameters include server model, baseboard management controller parameters, and basic input and output system parameters; obtaining a configuration document of the server to be simulated, and extracting hardware parameters contained in the configuration document, wherein the hardware parameters include central processing unit parameters, hard disk parameters, and disk array parameters; matching the server parameters and the hardware parameters with attribute information of a pre-stored classified simulation server; and according to the matching result, adding a first simulation server to the classified simulation server, or updating a second simulation server in the classified simulation server, using the hardware parameters and the server parameters.

[0006] On the other hand, the present disclosure also provides a server simulation device, which includes: a first acquisition unit, used to acquire server parameters of the server to be simulated, and the server parameters include server model, baseboard management controller parameters, and basic input and output system parameters; a second acquisition unit, used to acquire the configuration document of the server to be simulated, and extract the hardware parameters contained in the configuration document, and the hardware parameters include central processing unit parameters, hard disk parameters, and disk array parameters; a matching unit, used to match the server parameters and the hardware parameters with the attribute information of the pre-stored classified simulation server; a simulation unit, used to add a first simulation server to the classified simulation server, or update the second simulation server in the classified simulation server, based on the matching result and using the hardware parameters and the server parameters.

[0007] On the other hand, the present disclosure further provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the server simulation method of the landing page is implemented.

[0008] On the other hand, the present disclosure further provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it implements the above-mentioned server simulation method of the landing page.

[0009] The technical solution provided by one or more embodiments of the present disclosure can confirm the server system features of the server to be simulated, such as the server model, the baseboard management controller of the server, the basic input and output system of the server, etc.; it can also use the configuration document of the server to be simulated to confirm the hardware device features of the server to be simulated, such as the central processing unit, hard disk, disk array, etc. Then, according to the information of the required simulated server, it is matched with the simulated and classified maintained servers to determine whether it is necessary to create a new virtual machine to simulate the server, or to update the original simulated server.

[0010] The technical solution provided by one or more embodiments of the present disclosure can simulate a server according to the hardware configuration requirements, the baseboard management controller requirements of the server and the basic input and output system requirements of the server. In the absence of a certain model of server, the simulated server can meet the requirements for compatible adaptation of the server.

[0011] The technical solution provided by one or more embodiments of the present disclosure can classify and unify simulated servers based on server parameters and hardware parameters. In this way, server management costs can be reduced and management efficiency can be improved. In some cases, for example, only the hardware configurations such as the hard disk, central processing unit model, and disk array card model are modified, or only the baseboard management controller version number is changed, the pre-stored classified simulated servers can be updated by replacing the corresponding firmware. In this way, the simulation process of the server can be reduced and the workload can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The features and advantages of the embodiments of the present disclosure may be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:

[0013] Figure 1 A schematic diagram showing the steps of a method for managing a server in the related art is shown;

[0014] Figure 2 A schematic diagram showing the steps of a server simulation method in one embodiment of the present disclosure is shown;

[0015] Figure 3 A schematic diagram showing a flow chart of a simulation server classification marking process in one embodiment of the present disclosure;

[0016] Figure 4 A schematic diagram of a process of adding a simulation server in one embodiment of the present disclosure is shown;

[0017] Figure 5 A schematic diagram showing a flow chart of a server simulation method in one embodiment of the present disclosure is shown;

[0018] Figure 6 A schematic diagram of functional units of a server simulation device in one embodiment of the present disclosure is shown;

[0019] Figure 7 A schematic structural diagram of an electronic device in one embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0021] For related technologies, see Figure 1, the functions of the baseboard management controller (Baseboard Management Controller, BMC) can be simulated to achieve management compatibility of the server. Specifically, a mapping file can be constructed based on the function list supported by the BMC that needs to be simulated, and the functions of other types of BMCs can be added to the constructed mapping file. Subsequently, a state file can be constructed, and the information of the software BMC and the virtual server can be stored in the state file. In response to the software BMC receiving a request, the requested information can be parsed, and the corresponding information in the state file can be read according to the requested information. The corresponding mapping file can be searched based on the corresponding information in the read state file. The BMC can be operated based on the functions stored in the corresponding mapping file.

[0022] It can be seen that in the related technology, when compatible with the server, it is necessary to simulate the BMC, construct the mapping file and the status file, and then perform the file parsing function based on the request interface. These need to be constructed based on the actual BMC return, and if the BMC version changes and the functional interface changes, the mapping file and the status file need to be manually modified. Moreover, based on the real interface return established by this modification, the labor cost is high and the scalability is poor.

[0023] Especially when the difference between BMC versions is small, there are only slight differences in parameters between them, and the interface needs to be compared, which takes a long time. In addition, the difference in model parameters is difficult to find manually, and it is easy to miss in the test. If there is no test machine of this model, it may not be possible to correctly construct it based on its BMC version.

[0024] In view of this, the server simulation method provided in one or more embodiments of the present disclosure can simulate the operation of the server, simulate the required machine and configuration, and facilitate the compatibility of management software and subsequent optimization and use. It can not only provide a simulation test environment, but also reduce the cost of server ownership.

[0025] See also Figure 2 , a server simulation method for a landing page provided in one embodiment of the present disclosure may include the following steps.

[0026] S1: Obtain server parameters of a server to be simulated, wherein the server parameters include server model, baseboard management controller parameters, and basic input and output system parameters.

[0027] In this embodiment, the server parameters to be simulated can be obtained first, and the server parameters include but are not limited to the server model, the platform to which the server's BMC belongs (such as OPENBMC), the server's BMC version, and the server's Basic Input Output System (BIOS) version.

[0028] S2: Obtain the configuration document of the server to be simulated, and extract the hardware parameters contained in the configuration document, wherein the hardware parameters include central processing unit parameters, hard disk parameters, and disk array parameters.

[0029] In this embodiment, the hardware parameters of the server can be extracted from the configuration document of the server based on the pattern matching mode. The extracted hardware parameters include but are not limited to the central processing unit (CPU) model, CPU configuration, hard disk model, hard disk configuration, disk array (RAID) card model, network card model, and high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIE).

[0030] Optionally, regular expressions (Regular Expressions, REGEX) can be used to match the pattern of character combinations in the string to efficiently extract hardware parameters. Optionally, the hardware parameters can be exported as a predetermined standard file, such as a lightweight data exchange format (JavaScript Object Notation, JSON) format file, so that it is easy to read, maintain and expand. Optionally, the extracted hardware parameter information can be stored in a database to facilitate the comparison of hardware parameters and the loading and use of subsequent software.

[0031] S3: Match the server parameters and the hardware parameters with the pre-stored attribute information of the classified simulation server.

[0032] In this embodiment, the historically simulated servers can be saved and stored in categories to form classified simulation servers. When a new simulation server is required, it can be matched and compared with the existing classified simulation servers. According to the matching results, you can choose to create a new simulation server, or you can choose to modify or update the existing simulation server. If you choose to modify or update the existing simulation server, you can reduce the simulation cost and improve the simulation efficiency.

[0033] In some embodiments, the server simulation method may include classifying the classified simulation server. The classification process may include: classifying the classified simulation server at a primary level according to the server model and marking a primary classification identifier; classifying the classified simulation server at a secondary level according to the baseboard management controller parameters and marking a secondary classification identifier; classifying the classified simulation server at a tertiary level according to the hardware parameters and marking a tertiary classification identifier.

[0034] Specifically, see Figure 3 , you can perform primary classification and labeling according to the server model and the naming rules of the model, such as the server M5, M6, and M7 series. Then, you can perform secondary classification and labeling according to the platform to which the BMC belongs and the BMC chip, such as distinguishing the first platform and the second platform in M7, and distinguishing A and B in the chip. Finally, you can perform tertiary classification and labeling according to the hardware configuration parameters, such as using the json data exported from the server's hardware configuration document for automatic labeling. Through the three-level classification identification, you can determine whether there are changes in major firmware such as the CPU, for example, there are differences between CPUs provided by different manufacturers.

[0035] In some embodiments, the matching with the attribute information of the pre-stored classified simulation server includes: performing a first-level matching on the server model of the server to be simulated and the server characteristic attributes of the classified simulation server; if the first-level matching fails, generating a first matching result, and the first matching result is used to indicate that the first simulation server is added to the classified simulation server; if the first-level matching is successful, performing a second-level matching on the baseboard management controller parameters of the server to be simulated and the baseboard management controller characteristic attributes of the classified simulation server; if the second-level matching fails, generating a second matching result, and the second matching result is used to indicate that the first simulation server is added to the classified simulation server; if the second-level matching is successful, performing a third-level matching on the hardware parameters of the server to be simulated and the hardware characteristic attributes of the classified simulation server; if the third-level matching fails, generating a third matching result, and the third matching result is used to indicate that the first simulation server is added to the classified simulation server; if the third-level matching is successful, generating a fourth matching result, and the fourth matching result is used to indicate that the second simulation server in the classified simulation server is updated.

[0036] Specifically, the server parameters and hardware parameters are matched step by step with the attribute information of the pre-stored classified simulation servers, so as to determine whether to create a new simulation server or to update the existing simulation server.

[0037] In an actual application example, the first category matching can be performed in the classified simulation servers according to the server model of the server to be simulated. If the matching fails, a new simulation server needs to be created and the series class to which this model belongs is established in the first category. If the matching is successful, continue to search for the second category.

[0038] According to the BMC platform and BMC chip category of the server to be simulated, the second category matching can be performed in the classified simulated server. Among them, the chip has little impact on the category, mainly the platform to which the BMC belongs. The chip category can be used as a tag parameter, and the second category matching is mainly based on the platform to which the BMC belongs. As above, if the match fails, you need to create a new simulated server and establish its series in the second category. If the match is successful, continue to look for the third category.

[0039] According to the hardware parameters of the server to be simulated, a third category match can be performed in the classified simulated servers to determine whether a new simulated server needs to be created or a simulated server needs to be updated.

[0040] In some embodiments, the hardware parameters of the server to be simulated are matched with the hardware characteristic attributes of the classified simulation servers at three levels, including: obtaining a target hardware parameter string of the server to be simulated; obtaining a reference hardware parameter string of each reference simulation server in the classified simulation servers; calculating the longest common subsequence between the target hardware parameter string and the reference hardware parameter string, and the length of the longest common subsequence; calculating the cosine similarity between the target hardware parameter string and the reference hardware parameter string; and determining the degree of match between the reference simulation server and the server to be simulated based on the longest common subsequence and the cosine similarity.

[0041] In a practical application example, the stored hardware parameters are compared with the parameters of the server to be simulated. If the data has been stored in a standardized manner, it can be serialized into {S1, S2, S3, ..., Sn}, where each Si (i = 1, 2, ..., n) represents a set of serial number strings of hardware parameters. When the hardware parameter string of the server to be simulated is M, the longest common subsequence {Z1, Z2, ..., Zn} between M and Si and the length of the subsequence can be calculated. Then, the similarity between the sequence Si and M can be calculated using the formula The simulated server hardware parameters with the highest cosine similarity can be selected. Among them, Sj and Mj are converted into vectors, for example, the string is divided into words or characters, and a vector representing the number of occurrences of each word or character is created. k is the length value of Si. The closer ρ is to 1, the higher the similarity. According to the longest common subsequence and the cosine similarity value, the sequence S with the highest matching degree can be selected.

[0042] If the hardware parameters of sequence Z and M are completely matched, there is no need to update or create a new simulation server, and the corresponding simulation server can be used directly; if the CPU in the parameters found by the algorithm cannot be matched, a new simulation server needs to be created, because even under the same BMC platform, different CPUs may have different commands for the machine interface. If the hardware such as RAID cards and hard disks cannot be matched, select the simulation server in the third category with the highest matching degree and update the file corresponding to the hardware parameters of one of them.

[0043] S4: According to the matching result, using the hardware parameters and the server parameters, a first simulation server is added to the classified simulation server, or a second simulation server is updated in the classified simulation server.

[0044] In some embodiments, adding a new first simulation server to the classified simulation server includes: installing source software on a target operating system; adjusting the source software based on the hardware parameters to obtain target software; configuring a first hardware environment of the first simulation server using the target software; inputting the server parameters into the target software to configure a first baseboard management controller of the first simulation server and a first basic input / output system of the first simulation server.

[0045] Optionally, the target operating system may be a Linux system, such as Ubuntu or CentOS system. The source software may be QEMU, a simulated processor whose source code is distributed under the General Public License (GPL).

[0046] In some embodiments, adding a new first simulation server to the classified simulation server includes: preparing a target operating system and downloading a target source code to the target operating system; using the hardware parameters, modifying the target source code, and determining a hardware code, wherein the hardware code corresponds to the hardware function of the first simulation server; compiling the hardware code to obtain a target software; inputting a first control instruction into the target software so that the target software creates a hardware image of the first simulation server; inputting a second control instruction containing the baseboard management controller parameters into the target software so that the target software creates a baseboard management controller image of the first simulation server; and inputting a third control instruction containing the basic input / output system parameters into the target software so that the target software creates a basic input / output system image of the first simulation server.

[0047] For a practical example, see Figure 4To create a new simulation server, you first need to prepare a Linux system environment: such as Ubuntu or CentOS system.

[0048] Then, you can download the QEMU source code and generate custom functions based on the extracted hardware parameters to perform hardware simulation. For example, you can modify the QEMU source code to simulate physically adding hardware devices (you can modify the hw / arm / aspeed.c file in the QEMU root directory) and implement multiple custom functions, which are similar to adding and initializing hardware. Compiling and installing the generated custom functions will get the QEMU executable program.

[0049] For the QEMU executable program, enter the qemu-img command to create a virtual machine image. The virtual machine image can be used to simulate the hard disk of the virtual machine. Before starting the virtual machine, it is generally necessary to create an image file, which can be achieved through the command, such as qemu-img create-f qcow2test-vm-1.qcow2 10G. Among them, the -f option is used to specify the image format. The qcow2 format is the most commonly used image format for QEMU, and the copy-on-write technology is used to optimize performance. test-vm-1.qcow2 is the name of the image file, and 10G is the size of the image file.

[0050] For the QEMU executable program, you can enter the executable command qemu-system-arm-m 256-M ast2500-evb-nographic-drive

[0051] file=tmp / deploy / images / evb-ast2500 / image-bmc,format=raw,if=mtd-netnic-net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu, start the BMC firmware image-bmc. You can log in to the BMC page by accessing 127.0.0.1. On the BMC page, use ipmitool to access bmc and call the redfish interface.

[0052] For the QEMU executable program, you can enter and execute qemu-system-x86_64–bios*** to specify the BIOS file.

[0053] In some embodiments, updating the second simulation server in the classified simulation server includes at least one of the following: modifying the hardware configuration file of the second simulation server according to the hardware parameters to update the hardware environment of the first simulation server; modifying the system configuration file of the second simulation server according to the server parameters to update the baseboard management controller and / or basic input and output system of the first simulation server.

[0054] In an actual application example, if you want to update the simulation server, you can extract the hardware parameters, update the hw / arm / aspeed.c file in the qemu root directory of QEMU, or modify the asset.json ( / usr / share / bmc-device / asset.json) file in the BMC, and restart the service.

[0055] See also Figure 5 , a server simulation method for a landing page provided in another embodiment of the present disclosure may include the following multiple steps.

[0056] S21: First, obtain the parameters of the server to be simulated: server model, server BMC platform, server BMC version, server BIOS version, and official configuration document of the server.

[0057] S22: Based on the document, the official hardware configuration parameters are extracted through pattern matching. According to the extracted hardware parameters: CPU model, CPU configuration, hard disk model, hard disk configuration, RAID card model, network card, PCIE and other information, they are exported as json files and stored in the library to facilitate hardware information comparison and QEMU loading to form hardware information.

[0058] S23: Determine the classified simulation servers and whether to create a new simulation server (see step S24) or to update the simulation servers therein (see step S25).

[0059] S24: If you want to create a new simulation server, you need to install QEMU software on the Linux environment, and then generate a startup script based on the hardware parameters obtained in step S22 to perform hardware simulation, and configure the startup BMC and BIOS firmware, as well as configure the network, and then you can access the BMC page. This is equivalent to generating a simulation server, and you can call the BMC interface and actually access the BMC page.

[0060] S25: If the simulated server needs to be updated, compare whether the hardware parameters need to be updated, and whether the target BMC and BIOS firmware versions have changed compared with the current versions. If so, update them synchronously. If the changes are minor, no update is required.

[0061] In this implementation, the parameters of the server to be simulated are first confirmed: server model, server BMC platform, version, BIOS version, and official configuration documents of the corresponding server, and the configured CPU, hard disk, RAID card and other hardware parameters are exported based on the documents. Then, according to the information of the simulated server, the simulated servers are classified and managed; finally, according to the new simulated server parameters, it is determined whether a new virtual machine needs to be created to simulate the server, or the original simulated server needs to be updated to reduce costs and facilitate maintenance.

[0062] The technical solution provided by this embodiment can perform server simulation according to the hardware configuration requirements, as well as the firmware of BMC and BIOS. The simulated server BMC can be directly accessed, and the hardware configuration, such as hard disk, CPU model, PCIE card, etc., can be modified and updated at any time, reducing the time for replacing hardware during compatibility testing, and avoiding the problem of hardware not existing. And when the BMC version changes, there is no need to borrow the machine again for testing and development, nor is there any need to manually create various files, only the corresponding firmware needs to be replaced. At the same time, the simulation servers can be classified and unified based on parameters such as the adapted firmware platform, which can reduce the simulation process and reduce the workload. The present invention can quickly and stably perform server simulation, and then perform server compatibility management, reducing the situation of compatibility testing due to lack of hardware or no server available. Reduce server management costs and improve efficiency.

[0063] The technical solution provided by one or more embodiments of the present disclosure can confirm the server system features of the server to be simulated, such as the server model, the baseboard management controller of the server, the basic input and output system of the server, etc.; it can also use the configuration document of the server to be simulated to confirm the hardware device features of the server to be simulated, such as the central processing unit, hard disk, disk array, etc. Then, according to the information of the required simulated server, it is matched with the simulated and classified maintained servers to determine whether it is necessary to create a new virtual machine to simulate the server, or to update the original simulated server.

[0064] The technical solution provided by one or more embodiments of the present disclosure can simulate a server according to the hardware configuration requirements, the baseboard management controller requirements of the server and the basic input and output system requirements of the server. In the absence of a certain model of server, the simulated server can meet the requirements for compatible adaptation of the server.

[0065] The technical solution provided by one or more embodiments of the present disclosure can classify and unify simulated servers based on server parameters and hardware parameters. In this way, server management costs can be reduced and management efficiency can be improved. In some cases, for example, only the hardware configurations such as the hard disk, central processing unit model, and disk array card model are modified, or only the baseboard management controller version number is changed, the pre-stored classified simulated servers can be updated by replacing the corresponding firmware. In this way, the simulation process of the server can be reduced and the workload can be reduced.

[0066] See also Figure 6 The present disclosure also provides a server simulation device, the device comprising:

[0067] The first acquisition unit 100 is used to acquire server parameters of the server to be simulated, wherein the server parameters include server model, baseboard management controller parameters, and basic input and output system parameters;

[0068] The second acquisition unit 200 is used to acquire the configuration document of the server to be simulated, and extract the hardware parameters contained in the configuration document, wherein the hardware parameters include CPU parameters, hard disk parameters, and disk array parameters;

[0069] A matching unit 300, used to match the server parameters and the hardware parameters with the pre-stored attribute information of the classified simulation server;

[0070] The simulation unit 400 is used to add a first simulation server to the classified simulation server or update a second simulation server in the classified simulation server according to the matching result and using the hardware parameters and the server parameters.

[0071] In one embodiment, the simulation unit 400 includes a newly added sub-unit 401, which is used to install source software on a target operating system; adjust the source software based on the hardware parameters to obtain target software; use the target software to configure a first hardware environment of the first simulation server; input the server parameters into the target software to configure a first baseboard management controller of the first simulation server, and a first basic input / output system of the first simulation server.

[0072] In one embodiment, the simulation unit 400 includes a newly added sub-unit 401, which is specifically used to prepare a target operating system and download the target source code to the target operating system; use the hardware parameters to modify the target source code and determine the hardware code, which corresponds to the hardware function of the first simulation server; compile the hardware code to obtain the target software; input the first control instruction into the target software so that the target software creates the hardware image of the first simulation server; input the second control instruction containing the baseboard management controller parameters into the target software so that the target software creates the baseboard management controller image of the first simulation server; input the third control instruction containing the basic input and output system parameters into the target software so that the target software creates the basic input and output system image of the first simulation server.

[0073] In one embodiment, the simulation unit 400 includes an update subunit 402, which is used to implement at least one of the following functions: modifying the hardware configuration file of the second simulation server according to the hardware parameters to update the hardware environment of the first simulation server; modifying the system configuration file of the second simulation server according to the server parameters to update the baseboard management controller and / or basic input and output system of the first simulation server.

[0074] In one embodiment, the device also includes a classification unit 500, which is used to classify the classified simulation server, and the classification process includes: according to the server model, the classified simulation server is classified into a primary level, and a primary classification identifier is marked; according to the baseboard management controller parameters, the classified simulation server is classified into a secondary level, and a secondary classification identifier is marked; according to the hardware parameters, the classified simulation server is classified into a tertiary level, and a tertiary classification identifier is marked.

[0075] In one embodiment, the matching unit 300 is specifically used to perform a first-level matching on the server model of the server to be simulated and the server characteristic attributes of the classified simulation server; if the first-level matching fails, a first matching result is generated, and the first matching result is used to indicate that the first simulation server is added to the classified simulation server; if the first-level matching is successful, the baseboard management controller parameters of the server to be simulated and the baseboard management controller characteristic attributes of the classified simulation server are second-level matched; if the second-level matching fails, a second matching result is generated, and the second matching result is used to indicate that the first simulation server is added to the classified simulation server; if the second-level matching is successful, the hardware parameters of the server to be simulated and the hardware characteristic attributes of the classified simulation server are third-level matched; if the third-level matching fails, a third matching result is generated, and the third matching result is used to indicate that the first simulation server is added to the classified simulation server; if the third-level matching is successful, a fourth matching result is generated, and the fourth matching result is used to indicate that the second simulation server in the classified simulation server is updated.

[0076] In one embodiment, the matching unit 300 includes a three-level matching sub-unit 303, which is specifically used to obtain the target hardware parameter string of the server to be simulated; obtain the reference hardware parameter string of each reference simulation server in the classified simulation servers; calculate the longest common subsequence between the target hardware parameter string and the reference hardware parameter string, and the length of the longest common subsequence; calculate the cosine similarity between the target hardware parameter string and the reference hardware parameter string; based on the longest common subsequence and the cosine similarity, determine the matching degree between the reference simulation server and the server to be simulated.

[0077] Each unit described in the above embodiments may be implemented by a computer chip or a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0078] For the convenience of description, the above devices are described in terms of functions and are described separately in various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0079] See also Figure 7The present disclosure also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned server simulation method is implemented.

[0080] The present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the above-mentioned server simulation method is implemented.

[0081] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0082] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.

[0083] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0084] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0085] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, equipment, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0086] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

[0087] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A server simulation method, characterized in that: The method comprises: Obtaining server parameters of the server to be simulated, wherein the server parameters include server model, baseboard management controller parameters, and basic input and output system parameters; Obtaining the configuration document of the server to be simulated, and extracting the hardware parameters contained in the configuration document, wherein the hardware parameters include central processing unit parameters, hard disk parameters, and disk array parameters; Matching the server parameters and the hardware parameters with the pre-stored attribute information of the classified simulation server; According to the matching result, the hardware parameters and the server parameters are used to add a first simulation server to the classified simulation server, or to update a second simulation server in the classified simulation server.

2. The method according to claim 1, characterized in that The adding of a first simulation server in the classification simulation server comprises: Install the source software on the target operating system; Based on the hardware parameters, adjusting the source software to obtain target software; Using the target software, configuring a first hardware environment of the first simulation server; The server parameters are input into the target software to configure a first baseboard management controller of the first simulation server and a first basic input and output system of the first simulation server.

3. The method according to claim 1 or 2, characterized in that: The adding of a first simulation server in the classification simulation server comprises: Preparing a target operating system and downloading the target source code to the target operating system; Using the hardware parameters, modifying the target source code to determine a hardware code, wherein the hardware code corresponds to a hardware function of the first simulation server; Compiling the hardware code to obtain target software; Inputting a first control instruction into the target software so that the target software creates a hardware image of the first simulation server; Inputting a second control instruction including the baseboard management controller parameters into the target software, so that the target software creates a baseboard management controller image of the first simulation server; A third control instruction including the basic input / output system parameters is input into the target software, so that the target software creates a basic input / output system image of the first simulation server.

4. The method according to claim 1, characterized in that: The updating of the second simulation server in the classification simulation server includes at least one of the following: According to the hardware parameters, modify the hardware configuration file of the second simulation server to update the hardware environment of the first simulation server; According to the server parameters, the system configuration file of the second simulation server is modified to update the baseboard management controller and / or basic input and output system of the first simulation server.

5. The method according to claim 1, characterized in that The method further comprises classifying the classification simulation server, wherein the classification process comprises: According to the server model, the classified simulation server is classified into a primary category and marked with a primary category identifier; According to the baseboard management controller parameters, the classified simulation server is secondary classified and marked with a secondary classification identifier; According to the hardware parameters, the classification simulation server is classified into three levels and marked with three-level classification identifiers.

6. The method according to claim 1 or 5, characterized in that: The matching with the pre-stored attribute information of the classification simulation server includes: Performing a primary match between the server model of the server to be simulated and the server characteristic attributes of the classified simulated server; If the first-level matching fails, a first matching result is generated, wherein the first matching result is used to indicate that the first simulation server is added to the classified simulation server; If the first-level matching is successful, the baseboard management controller parameters of the server to be simulated are matched with the baseboard management controller characteristic attributes of the classified simulated server at the second level; If the secondary matching fails, generating a second matching result, wherein the second matching result is used to indicate that the first simulation server is added to the classified simulation server; If the secondary matching is successful, the hardware parameters of the server to be simulated are matched with the hardware characteristic attributes of the classified simulation server at the tertiary level; If the third-level matching fails, a third matching result is generated, wherein the third matching result is used to indicate that the first simulation server is added to the classified simulation server; If the third-level matching is successful, a fourth matching result is generated, and the fourth matching result is used to indicate the update of the second simulation server in the classification simulation server.

7. The method according to claim 6, characterized in that The three-level matching of the hardware parameters of the server to be simulated with the hardware characteristic attributes of the classified simulation server includes: Obtain a target hardware parameter string of the server to be simulated; Obtaining a reference hardware parameter character string of each reference simulation server in the classified simulation servers; Calculate the longest common subsequence between the target hardware parameter string and the reference hardware parameter string, and the length of the longest common subsequence; Calculating the cosine similarity between the target hardware parameter string and the reference hardware parameter string; Based on the longest common subsequence and the cosine similarity, a matching degree between the reference simulation server and the server to be simulated is determined.

8. A server simulation device, characterized in that: The device comprises: A first acquisition unit, used to acquire server parameters of the server to be simulated, wherein the server parameters include server model, baseboard management controller parameters, and basic input and output system parameters; A second acquisition unit is used to acquire the configuration document of the server to be simulated, and extract the hardware parameters contained in the configuration document, wherein the hardware parameters include central processing unit parameters, hard disk parameters, and disk array parameters; A matching unit, used for matching the server parameters and the hardware parameters with the pre-stored attribute information of the classified simulation server; The simulation unit is used to add a first simulation server to the classified simulation server or update a second simulation server in the classified simulation server according to the matching result and using the hardware parameters and the server parameters.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Script test verification method and electronic equipment

    CN122220199A