Configuration method and device of simulation hardware, storage medium and computer program product
Through the virtual platform, different models are simulated, target element data is loaded and configured in the visual interface, hardware adaptation development and testing is realized without real physical equipment, and the problem of low testing and development efficiency and high cost caused by switching between different models is solved. Improve development efficiency and save costs.
Patent Information
- Application Number
- CN202411216524.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
AI Technical Summary
Due to the low efficiency of the test and development process and excessive testing cost due to the switching of different models, the existing technology has not yet proposed an effective solution.
Simulate the target model through the virtual platform, determine the current requirements of the configuration files in the virtual platform, call the command to load the target element data, select the hardware information of different elements in the model from the hardware element database, and configure it in the visual interface to obtain Simulation hardware simulation results of the target model.
It realizes the development, testing and maintenance of hardware adaptation without real physical equipment, improves development efficiency, saves R&D costs, and solves the problems of low efficiency and high cost in the test and development process.
Smart Images

Figure CN119105919A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of distributed storage system management software, and more specifically, to a configuration method and device for simulating hardware, a storage medium, and a computer program product. Background Art
[0002] In the context of digital transformation, massive data continues to grow, and storage servers are constantly updated and evolved. In order to meet various usage scenarios, the hardware equipment on the server is constantly updated, the topology of the storage server is constantly changing, and the storage software must also be constantly adapted to new models. As the models continue to increase, the subsequent maintenance work also increases. Since the hardware adaptation work is for specific models, real physical machines must be used for adaptation during adaptation. Specifically, the hardware adaptation work in current technology will encounter the following scenarios: the original adaptation process includes physical machine borrowing, hardware modification, software solution formulation and hardware adaptation development. The process is long, the modules cannot be carried out at the same time, and the efficiency is low; customer-customized models or provided hardware machines require R&D personnel to debug at the customer site. If the customer's intranet cannot be connected, the R&D personnel need to go to the customer site, which increases the difficulty and cost of development; regression testing requires enough specific model servers, but the cost is too high to be fully covered, which increases code risks and testing costs.
[0003] In view of the problems in related technologies of low efficiency of test development process and excessive test cost due to switching between different models, no effective solution has been proposed so far. Summary of the invention
[0004] The embodiments of the present application provide a method and device for configuring simulation hardware to at least solve the problem of low test development process efficiency and excessive test costs due to switching between different models in the existing approach.
[0005] According to one embodiment of the present application, a method for configuring simulated hardware is provided, comprising: determining the current requirements of a configuration file in a virtual platform when simulating a target model through a virtual platform; determining real-time call content corresponding to a call command according to the current requirements, and executing the call command to load target element data, wherein the call command is used to select hardware information corresponding to different elements in a model from a hardware element database; and using the target element data to perform configuration on a target visualization interface to obtain a simulated hardware emulation result corresponding to the target model.
[0006] In an exemplary embodiment, before determining the real-time call content corresponding to the call command according to the current demand, the method also includes: collecting target hardware information corresponding to different elements on multiple real physical devices that establish communication connections with the virtual platform; determining version parameters corresponding to the target hardware information; and establishing a hardware element database corresponding to the multiple real physical devices based on the version parameters and the target hardware information.
[0007] In an exemplary embodiment, collecting target hardware information corresponding to different elements on multiple real physical devices that establish communication connections with the virtual platform includes: obtaining a collection sub-application associated with the virtual platform; configuring multiple collection commands in the collection sub-application to obtain a collection script; when it is determined that the virtual platform needs to obtain hardware information of the target real physical device, sending the collection script to the target real physical device; receiving real-time collection information fed back by the target real physical device according to the collection script; adjusting the real-time collection information to the same data format as the device element sample preset in the hardware element database to obtain first collection information; when it is determined that the target real physical device for which the virtual platform needs to obtain hardware information is a new model, identifying the target output result corresponding to the target real physical device; adjusting the target output result to obtain second collection information; synchronizing the first collection information and the second collection information to the hardware element database for data storage to obtain target hardware information corresponding to different elements.
[0008] In an exemplary embodiment, the target element data is used to perform configuration in the target visualization interface to obtain a simulated hardware emulation result corresponding to the target model, including: identifying the added information corresponding to the target model, wherein the added information at least includes: model name information of the target model, version information of the baseboard management controller corresponding to the target model, and version information of the basic input and output system corresponding to the target model; inputting the added information into the configuration area of the target visualization interface; if the added information exists in the configuration area, adding the target element data to the view area of the target visualization interface, wherein the view area is used to configure basic information for different target element data; and summarizing the output data corresponding to the configuration area and the view area to obtain the simulated hardware emulation result corresponding to the target model.
[0009] In an exemplary embodiment, when there is addition information in the configuration area, after adding the target element data to the view area of the target visualization interface, the method further includes: assigning different address information to each element corresponding to the target element data; establishing an association relationship between different elements based on the address information; and constructing a hardware architecture diagram of the target model containing different elements in the target visualization interface based on the association relationship.
[0010] In an exemplary embodiment, the real-time call content corresponding to the call command is determined according to the current demand, including: when the current demand includes allowing the target model to be simulated through the virtual platform, determining that the real-time call content is to identify whether the verification exception function corresponding to the virtual platform is turned on, and determining the data source of the target element data according to the turned-on status; when the current demand is to prohibit the simulation of the target model through the virtual platform, determining that the real-time call content is to send a data acquisition request to the real physical device through the call command.
[0011] In an exemplary embodiment, the real-time call content is determined to identify whether the verification exception function corresponding to the virtual platform is turned on, and the data source of the target element data is determined according to the turned-on status, including: when the verification exception function is not turned on, determining that the data source is loaded from the hardware element database to meet the current requirements of the target element data; when the verification exception function is turned on, determining that the data source is loaded from the abnormal output database associated with the virtual platform to meet the current requirements of the target element data.
[0012] According to another embodiment of the present application, a configuration device for simulated hardware is also provided, including: a determination module, used to determine the current requirements of the configuration file in the virtual platform when simulating the target model through the virtual platform; a loading module, used to determine the real-time call content corresponding to the call command according to the current requirements, and execute the call command to load the target element data, wherein the call command is used to select hardware information corresponding to different elements in the model from the hardware element database; a configuration module, used to use the target element data to configure in the target visual interface to obtain the simulated hardware simulation result corresponding to the target model.
[0013] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0014] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0015] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0016] Through this application, when simulating the target model through a virtual platform, the current demand for the configuration file in the virtual platform is determined; the real-time call content corresponding to the call command is determined according to the current demand, and the call command is executed to load the target element data, wherein the call command is used to select the hardware information corresponding to different elements in the model from the hardware element database; the target element data is used to configure in the target visual interface to obtain the simulated hardware simulation result corresponding to the target model. By adopting the above technical solution, by means of simulating the model, it is possible to complete the development, testing, maintenance and other work of hardware adaptation without the real physical equipment, thereby improving development efficiency and saving R&D costs. It solves the problem of low efficiency of the test development process and excessive testing costs due to the switching of different models in the existing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 It is a hardware structure block diagram of a computer terminal according to a method for configuring a simulated hardware according to an embodiment of the present application;
[0019] Figure 2 is a flowchart of a method for configuring simulation hardware according to an embodiment of the present application;
[0020] Figure 3 is a structural diagram of a simulation hardware adaptation system in a storage system according to an embodiment of the present application;
[0021] Figure 4 is a schematic diagram of a simulation platform in a storage system according to an embodiment of the present application;
[0022] Figure 5 It is a schematic diagram of the effect of adding a simulation platform in a storage system according to an embodiment of the present application;
[0023] Figure 6is a flow chart of a method for simulating hardware adaptation in a storage system according to an embodiment of the present application;
[0024] Figure 7 is a structural block diagram of a configuration device for simulating hardware according to an embodiment of the present application;
[0025] Figure 8 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0028] The configuration method of the simulation hardware provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal for simulating a hardware configuration method according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the task configuration method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 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.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In this embodiment, a configuration method for simulating hardware is provided, including but not limited to being applied in a computer terminal. Figure 2 is a flowchart of a configuration method of simulation hardware according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0032] Step S202: when simulating the target machine model through the virtual platform, determining the current demand for the configuration file in the virtual platform;
[0033] Step S204: determining the real-time calling content corresponding to the calling command according to the current demand, and executing the calling command to load the target element data, wherein the calling command is used to select hardware information corresponding to different elements in the model from the hardware element database;
[0034] Step S206: Use the target element data to configure in the target visualization interface to obtain the simulation hardware emulation result corresponding to the target model.
[0035] Through the above method, when simulating the target model through the virtual platform, the current demand of the configuration file in the virtual platform is determined; the real-time call content corresponding to the call command is determined according to the current demand, and the call command is executed to load the target element data, wherein the call command is used to select the hardware information corresponding to different elements in the model from the hardware element database; the target element data is used to configure in the target visual interface to obtain the simulated hardware simulation result corresponding to the target model. By adopting the above technical solution, by means of simulating the model, it is possible to complete the development, testing, maintenance and other work of hardware adaptation without the real physical equipment, thereby improving the development efficiency and saving the R&D cost. It solves the problem of low efficiency of the test development process and excessive testing cost due to the switching of different models in the existing method.
[0036] In an exemplary embodiment, before determining the real-time call content corresponding to the call command according to the current demand, the method also includes: collecting target hardware information corresponding to different elements on multiple real physical devices that establish communication connections with the virtual platform; determining version parameters corresponding to the target hardware information; and establishing a hardware element database corresponding to the multiple real physical devices based on the version parameters and the target hardware information.
[0037] In summary, the target hardware information corresponding to different elements on multiple real physical devices, such as CPU model, memory size, hard disk capacity, etc., is collected through the above implementation. Based on this information, the version parameters of each hardware device are determined, such as the supported operating system version, driver version, etc. A hardware element database is established based on these version parameters and target hardware information, recording the detailed information and characteristics of each hardware device. By establishing a hardware element database, users can query and manage the hardware information of the device at any time, improving management efficiency and convenience.
[0038] In an exemplary embodiment, collecting target hardware information corresponding to different elements on multiple real physical devices that establish communication connections with the virtual platform includes: obtaining a collection sub-application associated with the virtual platform; configuring multiple collection commands in the collection sub-application to obtain a collection script; when it is determined that the virtual platform needs to obtain hardware information of the target real physical device, sending the collection script to the target real physical device; receiving real-time collection information fed back by the target real physical device according to the collection script; adjusting the real-time collection information to the same data format as the device element sample preset in the hardware element database to obtain first collection information; when it is determined that the target real physical device for which the virtual platform needs to obtain hardware information is a new model, identifying the target output result corresponding to the target real physical device; adjusting the target output result to obtain second collection information; synchronizing the first collection information and the second collection information to the hardware element database for data storage to obtain target hardware information corresponding to different elements.
[0039] Optionally, establish multiple real physical devices with communication connections on a virtual platform, including mobile phones, tablets, and laptops. Send collection scripts to these devices through collection sub-applications and collection commands, and receive real-time collection information. Adjust the real-time collection information into data format and store it in the hardware element database to achieve the acquisition and storage of target hardware information corresponding to different elements. For new models of devices, identify the target output results and make adjustments to ensure that the data in the database is synchronized with the hardware information of the latest devices.
[0040] In summary, through the above implementation method, data information of real physical devices can be flexibly collected through collection scripts. At the same time, when new devices appear, the agreed output results of the hardware devices can be entered into the total database of device elements in a simulated manner, thereby ensuring the effective correspondence between the data in the database and different devices, and improving the accuracy of the simulation results.
[0041] In an exemplary embodiment, the target element data is used to perform configuration in the target visualization interface to obtain a simulated hardware emulation result corresponding to the target model, including: identifying the added information corresponding to the target model, wherein the added information at least includes: model name information of the target model, version information of the baseboard management controller corresponding to the target model, and version information of the basic input and output system corresponding to the target model; inputting the added information into the configuration area of the target visualization interface; if the added information exists in the configuration area, adding the target element data to the view area of the target visualization interface, wherein the view area is used to configure basic information for different target element data; and summarizing the output data corresponding to the configuration area and the view area to obtain the simulated hardware emulation result corresponding to the target model.
[0042] Optionally, according to the above implementation, the target model is identified as "ABC-123", the baseboard management controller version is 2.0, and the basic input and output system version is 1.5; the above added information is input into the configuration area of the target visualization interface; if there is added information in the configuration area, the target element data is added to the view area, such as adding a target element named "CPU". Configure basic information for the "CPU" in the view area, such as setting its frequency to 2.5GHz, cache size to 8MB, etc.; summarize the output data corresponding to the configuration area and the view area to obtain the simulated hardware simulation results corresponding to the "ABC-123" model, including the performance and configuration information of the CPU, etc.
[0043] Through the above steps, users can clearly configure the target model information and obtain the corresponding hardware simulation results, which helps users understand the model characteristics and performance and improves work efficiency and accuracy.
[0044] In an exemplary embodiment, when there is addition information in the configuration area, after adding the target element data to the view area of the target visualization interface, the method further includes: assigning different address information to each element corresponding to the target element data; establishing an association relationship between different elements based on the address information; and constructing a hardware architecture diagram of the target model containing different elements in the target visualization interface based on the association relationship.
[0045] Optionally, construct a hardware architecture diagram of a server, including elements such as CPU, memory, hard disk, and motherboard. First, assign different address information to each element, such as CPU address A1, memory address B1, hard disk address C1, and motherboard address D1. Then, establish the association relationship between each element based on these address information, such as CPU connected to the motherboard, memory connected to the CPU, hard disk connected to the motherboard, etc. Finally, construct a hardware architecture diagram on the visual interface, layout the CPU, memory, hard disk, motherboard and other elements in the diagram according to their address information, and use lines to represent the connection relationship between them, showing the hardware composition and architecture of the entire server.
[0046] In summary, through the above method, users can intuitively understand the hardware structure of the server and the relationship between various elements through this schematic diagram, thereby improving the operability of the simulation process and the accuracy of the simulation results.
[0047] In an exemplary embodiment, the real-time call content corresponding to the call command is determined according to the current demand, including: when the current demand includes allowing the target model to be simulated through the virtual platform, determining that the real-time call content is to identify whether the verification exception function corresponding to the virtual platform is turned on, and determining the data source of the target element data according to the turned-on status; when the current demand is to prohibit the simulation of the target model through the virtual platform, determining that the real-time call content is to send a data acquisition request to the real physical device through the call command.
[0048] It is understandable that the current demand is to monitor and control a certain device in real time, and the system needs to perform corresponding operations according to the actual status of the device. In this case, if the target model is allowed to be simulated through a virtual platform, you can first identify whether the verification exception function corresponding to the virtual platform is turned on, and then determine the data source of the target element data based on the on status to ensure that the acquired data is real data that has been verified and simulated. If simulation through a virtual platform is prohibited, you can directly send a data acquisition request to the real physical device through a call command to obtain real-time data of the real device for monitoring and control. In this way, you can choose the appropriate calling method according to the specific situation.
[0049] In summary, through the above implementation, it is determined whether to allow the simulation of the target model through the virtual platform, and the appropriate calling method can be selected to improve the efficiency and performance of the system. When simulation is allowed, identifying whether the check exception function is turned on can help test the stability of the system and determine the source of data to ensure data accuracy. When simulation is prohibited, real-time data is obtained by sending data requests through real devices, avoiding possible errors in the virtual environment and improving system accuracy and reliability.
[0050] In an exemplary embodiment, the real-time call content is determined to identify whether the verification exception function corresponding to the virtual platform is turned on, and the data source of the target element data is determined according to the turned-on status, including: when the verification exception function is not turned on, determining that the data source is loaded from the hardware element database to meet the current requirements of the target element data; when the verification exception function is turned on, determining that the data source is loaded from the abnormal output database associated with the virtual platform to meet the current requirements of the target element data.
[0051] Optionally, in a virtual platform, there is a check exception function for detecting abnormal conditions of the target element data. The system determines the activation status of the check exception function through the real-time call function, and determines the data source of the target element data accordingly. At a certain moment, the system calls the real-time call function and finds that the check exception function is not enabled. Based on this information, the system loads the target element data that meets the current requirements from the hardware element database, and then performs subsequent processing and analysis. At another moment, the system calls the real-time call function again and finds that the check exception function is enabled. Based on this information, the system loads the target element data that meets the current requirements from the abnormal output database associated with the virtual platform, and then performs subsequent processing and analysis.
[0052] In summary, through the above implementation, the system can automatically determine the data source of the target element data according to the activation state of the abnormality verification function, thereby improving the efficiency and accuracy of the system.
[0053] Obviously, the above-described embodiments are only embodiments of a part of the present invention, rather than all embodiments. In order to better understand the above method, the above process is described below in conjunction with embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention, specifically:
[0054] In actual applications, since hardware adaptation is for specific models, real physical machines must be used for adaptation. Specifically, hardware adaptation in current technology will encounter the following scenarios: the original adaptation process includes borrowing physical machines, hardware modification, software solution formulation and hardware adaptation development. The process is long and the modules cannot be carried out at the same time, which is inefficient; customized models or provided hardware machines require R&D personnel to debug at the customer site. If the customer's intranet cannot be connected, R&D personnel need to go to the customer site, which increases the difficulty and cost of development; regression testing requires enough specific model servers, but the cost is too high to fully cover it, which increases code risks and testing costs.
[0055] In order to avoid the above-mentioned problems, in an exemplary embodiment, a simulation hardware adaptation method in a storage system is proposed. The method associates the output results of a certain device element under different models, different BMC versions, and different BIOS versions by constructing elements in the simulation device. When a certain element is placed in the simulation platform, the output result corresponding to the element will be maintained in the total database according to the current model or BMC. When the program is running, the simulation result is output through simulation call. Through the simulation mode adaptation framework, a real physical machine environment can be constructed, and development, testing, maintenance and other work can be carried out without the real physical machine. When the hardware of a new model is adapted, it can be developed in parallel with the hardware to improve the overall development efficiency. For the regression test of the original model, the software code can be maintained without the real physical machine, which saves the cost of developing prototypes and improves the maintainability of software products. For customized models, there is no need to develop on-site at the customer site. The real physical device of the customer can be simulated based on the simulation platform. After the customer's physical machine device information is collected back through the collection script, it is entered into the device element database, and the software level development work is carried out on this basis, saving the R&D funds for business trips to the customer site for development.
[0056] Optionally, the Baseboard Manager Controller (BMC) is the core component of the server's out-of-band management, and uses the IPMI protocol to provide an access interface to the outside. Among them, the Intelligent Platform Management Interface (IPMI) was originally an industrial standard adopted by peripheral devices of an Intel-based enterprise system. IPMI is also an open and free standard that users can use without paying extra fees. IPMI can span different operating systems, firmware, and hardware platforms, and can intelligently monitor, control, and automatically report the operating status of a large number of servers to reduce server system costs.
[0057] Optionally, BIOS (Basic Input Output System, referred to as BIOS) is an industry-standard firmware interface. Its main function is to provide the lowest-level and most direct hardware settings and controls for the computer.
[0058] As an optional implementation, Figure 3 It is a structural diagram of a simulation hardware adaptation system in a storage system according to an embodiment of the present application, which at least includes: construction of hardware elements 32, a simulation platform 34, and software simulation operation 36.
[0059] Optionally, hardware element construction 32. Add the hardware devices existing in the actual physical machine to the simulation platform, mainly to maintain the device elements and their total output information under different conditions (different models, different BMC versions, different BIOS versions) in the database. The output information of the device element is collected on the real physical machine through the collection script and then maintained in the database. For the newly adapted model, the output results can be simulated, and the set hardware information can be manually maintained in the database, and developed in parallel with the hardware.
[0060] Optionally, the hardware device elements of the storage system usually include hard disks, disk array cards, expansion cards, fans, memory, CPUs, power supplies, etc. The collection method of these device information is related to the model of the model, different BMC versions, and different BIOS versions.
[0061] Optional. Since many array cards only have 8 hard disk interfaces, sometimes you may need to connect more hard disks. Then the expansion card is a better choice. You can use the original array card to connect more hard disks, and it does not occupy the limited PCIE channel, which is economical and flexible. Among them, PCIE is a high-speed serial computer expansion bus standard. Its original name is "3GIO", which is designed to replace the old PCI, PCI-X and AGP bus standards.
[0062] Optionally, all hardware elements can obtain real device data in the following two ways:
[0063] 1) Through the acquisition script, the commands collected by the hardware are maintained in a script. Each time the adaptation is performed, the acquisition script is run on the real physical device, and the collected data information is entered into the total database of the device elements.
[0064] 2) For the newly adapted model, the agreed output results of the hardware device are entered into the total database of the device elements in a simulated manner.
[0065] Optionally, the sample information of the device element to be entered is as follows:
[0066] 1) Hard disk, disk array card, and expansion card: Disk information is obtained through these three device elements. Among them, the disk array card is used to manage the disk. The expansion card is connected to the disk array card to expand the number of managed disks. The expansion cards can also be connected together in a cascade manner. The disk is connected to the expansion card, which forms different hardware topologies. Different hardware topologies are used to meet different usage scenarios. The sample information of the device element is shown in Table 1.
[0067] Table 1
[0068]
[0069] Optionally, SAS (Serial Attached SCSI, SAS for short) is a high-speed interconnect technology that uses a serial bus. By physically using a serial bus connection to transmit SCSI protocol standard commands on the link, SAS is widely used in servers and storage arrays, mainly for connecting hard disks and hard disk enclosures. SAS address is a 64-bit identifier. A SAS address is configured for each device element in the device.
[0070] 2) Fan: Collect fan device information and fan status information. The output format of hardware information corresponding to different models is different. The fan sample information is shown in Table 2.
[0071] Table 2
[0072] Equipment elements BMC version BIOS version Output information fan 1.1.1.1 1.1.1.1 FAN_SPEED_01|5760.000|RPM|ok fan 1.1.1.2 1.1.1.2 FAN_SPEED_R_01|5860.000|RPM|ok
[0073] 3) Memory: Collect memory device information and memory status information. The output format of hardware information for different models is different. The memory sample information is shown in Table 3.
[0074] Table 3
[0075]
[0076] 4) CPU: Collect CPU device information. The output format of hardware information corresponding to different models is different. CPU sample information is shown in Table 4.
[0077] Table 4
[0078]
[0079] 5) Power supply: Collect power supply equipment information. Different models have different corresponding collection commands. Different models have different corresponding hardware information output formats. The power supply sample information is shown in Table 5:
[0080] Table 5
[0081] Equipment elements BMC version BlOS version Output information PSU 1.1.1.1 1.1.1.1 PSU_STATUS_01|0x0|discrete|0x0980 PSU 1.1.1.2 1.1.1.2 PSU1_STATUS|0x0|discrete|0x0980
[0082] Optionally, a simulation platform 34 is used. First, the model, BMC version, and BIOS version are selected. On this basis, when a device element is added to the view, the information of the device element under the specific model, specific BMC version, and specific BIOS version is filtered out from the total database and stored in the running database. By using different device element components, a rendering simulation of a real device is constructed. Figure 4 As shown, Figure 4The following is a schematic diagram of a simulation platform in a storage system according to an embodiment of the present application. The simulation platform includes a front view area, a rear view area, an internal area of the chassis, and a list of device elements at the bottom. Device elements can be added to the device area at the top by dragging and dropping. The final added effect is as follows: Figure 5 As shown, Figure 5 This is a schematic diagram of the effect of adding a simulation platform to a storage system according to an embodiment of the present application. The specific process is as follows:
[0083] First, build the disk topology: First, add the RAID card to the view, randomly simulate and assign a unique SAS address to this RAID card, and record the RAID card information in the data. Then, add the expansion card to the view, connect it to the RAID card, and assign it a SAS address. Similarly, add the other two expansion cards and assign them a SAS address respectively. Next, add the expansion card information and the SAS address of the device mounted on it (i.e., the RAID card above) to the database. Finally, add the disk to the view, mount it under different expansion cards, and automatically generate disk information, including: the slot information of the disk on the expansion card, the assigned SAS address information, and the SAS address of the mounted device (expansion card). Under the topological conditions of the example, the disk is mounted under the expansion card. The information of the disk under the expansion card is obtained by calling the command of the RAID card. Different models of expansion cards are associated with different hardware commands. Specifically, the hardware commands associated with different models of expansion cards are shown in Table 6.
[0084] Table 6
[0085] Broadcom RAID Card storcli64 / call / eall / sall show all Broadcom SAS Card sas3ircu display PMC Card sg_ses -p 0x0a
[0086] Optionally, the final disk output looks like this:
[0087] Device slot number: 2
[0088] attached SAS address: 0x56c92bf003edf71f
[0089] SAS address: 0x5000c500d73cb889
[0090] Device slot number: 3
[0091] attached SAS address: 0x56c92bf003edf71f
[0092] SAS address: 0x5000c500d7310415″.
[0093] The above disk information is recorded in the database. When the software is running and a command is called to obtain disk information, the corresponding disk information data is directly returned from the database.
[0094] Optional, RAID card is a system that combines several hard disk drives into a whole according to certain requirements, and the entire disk array is managed by an array controller. Redundant Array of Independent Disks (RAID) technology was proposed by the University of California, Berkeley. The original purpose of development was to combine small cheap disks to replace large expensive disks to reduce the cost of large-scale data storage (RAID was called Redundant Array of lnexpensive Disks at the time). At the same time, it was also hoped that redundant information would be used to prevent data access from being lost when a disk fails, thereby developing a certain level of data protection technology.
[0095] Second, manage the disk positioning light: After adding the disk, the status information of the disk positioning light will be recorded in the database according to different BMC versions and BIOS versions. When the software is running, the device view interface will call the query disk light status command to obtain the disk light status in real time. Change the real-time call command mode to obtain the disk light status from the database. When the interface clicks the positioning light or cancels the positioning light operation, the value of the positioning light status of the corresponding disk in the database will be dynamically adjusted to complete the simulation of disk light management.
[0096] Third, determine other elements: such as power supply, memory, fan, CPU and other information. After selecting the model, BMC version, and BIOS version, each time a device element is added, the device information that meets the conditions will be filtered out from the total device element database according to the set value and stored in the simulation database. For example, in the CPU device element in the table below, when a CPU element is added, a row of data will be added to the output information column. When a device element is added to the real device, an additional piece of device information will be generated.
[0097] Optional, the final database sample information is shown in Table 7.
[0098] Table 7
[0099]
[0100]
[0101] Optionally, the software simulates running 36. After the software is running, when the hardware command of a device element is called to obtain the static data of the hardware information, the information stored in the running database is directly returned to achieve the purpose of simulating a real physical machine. When simulating the dynamic data of the device, such as the lighting of the disk, the status data of the disk light in the database will be dynamically updated according to the lighting and extinguishing commands issued. Figure 6 As shown, Figure 6 This is a flow chart of a simulation hardware adaptation method in a storage system according to an embodiment of the present application. The specific implementation process includes: 1: Run the software. When the software is running, add a configuration file to store whether the current environment is a real physical machine environment or a simulated environment. 2: Determine the state of the simulation switch. When the simulation switch is closed, call the command to obtain hardware information from the real physical device; when the simulation switch is turned on, call the hardware command to obtain hardware information, and further verify whether the abnormal switch is turned on. 3: Determine the state of the abnormal switch. When the abnormal switch is closed, the corresponding data is directly read from the database to simulate the hardware output; when the abnormal switch is turned on, the output result is read from the database storing the abnormal data to simulate the processing of the abnormal output to achieve full scene coverage.
[0102] It should be noted that when the data obtained is static device data, it is directly read from the database; when the executed hardware command will change the value of the static data, such as the disk positioning light command, it will change the disk light status data. In this case, when the positioning light command is issued, the corresponding disk positioning light data in the database will be modified synchronously. After the light command is executed, the interface will obtain the latest disk positioning light status data from the database.
[0103] In summary, by constructing elements in simulated devices, the simulation platform can be made more flexible and scalable. The output results under different models, different BMC versions, and different BIOS versions can be accurately maintained in the total database, realizing the association and mapping of elements and device attributes. In this way, when it is necessary to simulate devices of different models or versions, you only need to simply call the corresponding elements and attributes without rewriting the code or performing tedious configuration. In addition, by constructing elements in simulated devices, the simulation platform can be made more maintainable and scalable. With the development of technology and the upgrading of hardware, the properties and output results of the device may change. By maintaining the total database, the output results can be updated and adjusted at any time to ensure the accuracy and fidelity of the simulation platform. This flexibility and maintainability enable the simulation platform to respond to new needs and changes in a timely manner and maintain consistency with the actual device. In general, by constructing elements in simulated devices, the accuracy, fidelity and maintainability of the simulation platform can be improved, making the simulation results more reliable and effective. At the same time, it also provides convenience and support for subsequent expansion and updating.
[0104] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0105] In the present embodiment, a configuration device for simulating hardware is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0106] Figure 7 is a structural block diagram of a configuration device for simulating hardware according to an embodiment of the present application, such as Figure 7 As shown, the device comprises:
[0107] A determination module 702 is used to determine the current demand for the configuration file in the virtual platform when simulating the target machine model through the virtual platform;
[0108] The loading module 704 is used to determine the real-time calling content corresponding to the calling command according to the current demand, and execute the calling command to load the target element data, wherein the calling command is used to select the hardware information corresponding to different elements in the model from the hardware element database;
[0109] The configuration module 706 is used to use the target element data to configure in the target visualization interface to obtain the simulation hardware emulation result corresponding to the target model.
[0110] The above-mentioned device, when simulating the target model through the virtual platform, determines the current demand of the configuration file in the virtual platform; determines the real-time call content corresponding to the call command according to the current demand, and executes the call command to load the target element data, wherein the call command is used to select the hardware information corresponding to different elements in the model from the hardware element database; uses the target element data to configure in the target visual interface to obtain the simulated hardware simulation result corresponding to the target model. By adopting the above-mentioned technical scheme, by means of simulating the model, it is possible to complete the development, testing, maintenance and other work of hardware adaptation without the real physical equipment, thereby improving the development efficiency and saving the R&D cost. It solves the problem of low efficiency of the test development process and excessive testing cost due to the switching of different models in the existing method.
[0111] In an exemplary embodiment, the above-mentioned device also includes: a collection module, which is used to collect target hardware information corresponding to different elements on multiple real physical devices that establish communication connections with the virtual platform before determining the real-time call content corresponding to the call command according to the current demand; determine the version parameters corresponding to the target hardware information; and establish a hardware element database corresponding to the multiple real physical devices based on the version parameters and the target hardware information.
[0112] In an exemplary embodiment, the above-mentioned acquisition module is also used to obtain an acquisition sub-application associated with the virtual platform; configure multiple acquisition commands in the acquisition sub-application to obtain an acquisition script; when it is determined that the virtual platform needs to obtain hardware information of the target real physical device, send the acquisition script to the target real physical device; receive real-time acquisition information fed back by the target real physical device according to the acquisition script; adjust the real-time acquisition information to the same data format as the device element sample preset in the hardware element database to obtain first acquisition information; when it is determined that the target real physical device for which the virtual platform needs to obtain hardware information is a new model, identify the target output result corresponding to the target real physical device; adjust the target output result to obtain second acquisition information; synchronize the first acquisition information and the second acquisition information to the hardware element database for data storage to obtain target hardware information corresponding to different elements.
[0113] In an exemplary embodiment, the above-mentioned configuration module is also used to identify the added information corresponding to the target model, wherein the added information at least includes: model name information of the target model, version information of the baseboard management controller corresponding to the target model, and version information of the basic input and output system corresponding to the target model; input the added information into the configuration area of the target visualization interface; if there is added information in the configuration area, add the target element data to the view area of the target visualization interface, wherein the view area is used to configure basic information for different target element data; summarize the output data corresponding to the configuration area and the view area to obtain the simulation hardware simulation result corresponding to the target model.
[0114] In an exemplary embodiment, the above-mentioned configuration module also includes: an allocation unit, which is used to allocate different address information to each element corresponding to the target element data after adding the target element data to the view area of the target visualization interface when there is addition information in the configuration area; establish an association relationship between different elements according to the address information; and construct a hardware architecture diagram of the target model containing different elements in the target visualization interface based on the association relationship.
[0115] In an exemplary embodiment, the above-mentioned loading module is used to determine that the real-time call content is to identify whether the verification exception function corresponding to the virtual platform is turned on when the current requirement includes allowing the target model to be simulated through the virtual platform, and determine the data source of the target element data according to the turned-on status; when the current requirement is to prohibit the simulation of the target model through the virtual platform, determine that the real-time call content is to send a data acquisition request to the real physical device through the call command.
[0116] In an exemplary embodiment, the above-mentioned loading module is also used to determine that the data source is to load the target element data that meets the current requirements from the hardware element database when the verification exception function is not enabled; and to determine that the data source is to load the target element data that meets the current requirements from the exception output database associated with the virtual platform when the verification exception function is enabled.
[0117] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0118] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0119] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0120] S1, when simulating a target machine model through a virtual platform, determining a current demand for a configuration file in the virtual platform;
[0121] S2, determining the real-time calling content corresponding to the calling command according to the current demand, and executing the calling command to load the target element data, wherein the calling command is used to select the hardware information corresponding to different elements in the model from the hardware element database;
[0122] S3, using the target element data to configure in the target visualization interface to obtain the simulation hardware emulation result corresponding to the target model.
[0123] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0124] The embodiment of the present application also provides an electronic device, such as Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
[0125] Optionally, in this embodiment, the processor 804 may be configured to perform the following steps through a computer program:
[0126] S1, when simulating a target machine model through a virtual platform, determining a current demand for a configuration file in the virtual platform;
[0127] S2, determining the real-time calling content corresponding to the calling command according to the current demand, and executing the calling command to load the target element data, wherein the calling command is used to select the hardware information corresponding to different elements in the model from the hardware element database;
[0128] S3, using the target element data to configure in the target visualization interface to obtain the simulation hardware emulation result corresponding to the target model.
[0129] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0130] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only. Figure 8 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations are shown.
[0131] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the configuration method and device of the simulated hardware in the embodiment of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, realizing the above-mentioned configuration method of the simulated hardware. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely located relative to the processor 804, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 can be specifically, but not limited to, used to store information such as system configuration files. As an example, such as Figure 8 As shown, the memory 802 may include but is not limited to all modules in the above-mentioned configuration device for simulating hardware. In addition, it may also include but is not limited to other module units in the above-mentioned configuration device for simulating hardware, which will not be described in detail in this example.
[0132] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0133] In addition, the electronic device mentioned above further includes: a display 808; and a connection bus 810, which is used to connect various module components in the electronic device mentioned above.
[0134] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0135] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0136] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0137] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0138] The above description is only the preferred 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 modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for configuring simulation hardware, characterized in that: include: In the case of simulating the target machine model through the virtual platform, determining the current demand for the configuration file in the virtual platform; Determine the real-time calling content corresponding to the calling command according to the current demand, and execute the calling command to load the target element data, wherein the calling command is used to select the hardware information corresponding to different elements in the model from the hardware element database; The target element data is used to configure in the target visualization interface to obtain the simulation hardware simulation result corresponding to the target model.
2. The method according to claim 1, characterized in that Before determining the real-time calling content corresponding to the calling command according to the current demand, the method further includes: Collecting target hardware information corresponding to different elements on a plurality of real physical devices that establish communication connection with the virtual platform; Determine the version parameter corresponding to the target hardware information; A hardware element database corresponding to the multiple real physical devices is established based on the version parameters and the target hardware information.
3. The method according to claim 2, characterized in that Collecting target hardware information corresponding to different elements on multiple real physical devices that establish communication connections with the virtual platform, including: Obtaining a collection sub-application associated with the virtual platform; Configure multiple acquisition commands in the acquisition sub-application to obtain an acquisition script; In the case where it is determined that the virtual platform needs to obtain hardware information of the target real physical device, sending the acquisition script to the target real physical device; Receiving real-time collection information fed back by the target real physical device according to the collection script; The real-time collected information is adjusted to a data format identical to a device element sample preset in the hardware element database to obtain first collected information; In the case where it is determined that the target real physical device for which the virtual platform needs to obtain hardware information is a new model, identifying a target output result corresponding to the target real physical device; Adjusting the target output result to obtain second collection information; The first collected information and the second collected information are synchronized to the hardware element database for data storage to obtain target hardware information corresponding to different elements.
4. The method according to claim 1, characterized in that: The target element data is used to configure in the target visualization interface to obtain the simulation hardware simulation results corresponding to the target model, including: Identify the added information corresponding to the target model, wherein the added information at least includes: model name information of the target model, version information of the baseboard management controller corresponding to the target model, and version information of the basic input and output system corresponding to the target model; Inputting the added information into the configuration area of the target visualization interface; In the case where there is added information in the configuration area, adding the target element data to the view area of the target visualization interface, wherein the view area is used to configure basic information for different target element data; The output data corresponding to the configuration area and the view area are summarized to obtain the simulation hardware emulation result corresponding to the target model.
5. The method according to claim 4, characterized in that In the case where there is addition information in the configuration area, after adding the target element data to the view area of the target visualization interface, the method further includes: Allocating different address information to the element corresponding to each type of the target element data; Establishing association relationships between different elements according to the address information; A hardware architecture diagram of a target machine model including different elements is constructed on the target visualization interface based on the association relationship.
6. The method according to claim 1, characterized in that Determining the real-time calling content corresponding to the calling command according to the current demand includes: In the case where the current requirement includes allowing the target model to be simulated through the virtual platform, determining that the real-time call content is to identify whether a verification exception function corresponding to the virtual platform is enabled, and determining a data source of the target element data according to the enabled state; In the case that the current requirement is to prohibit simulating the target machine model through the virtual platform, the real-time calling content is determined to be sending a data acquisition request to the real physical device through the calling command.
7. The method according to claim 6, characterized in that Determining the real-time call content is to identify whether a check exception function corresponding to the virtual platform is turned on, and determining the data source of the target element data according to the turned-on state, including: In the case where the check exception function is not enabled, determining that the data source is to load target element data that meets the current requirements from the hardware element database; When the abnormality checking function is turned on, the data source is determined to be target element data that meets the current requirement loaded from an abnormal output database associated with the virtual platform.
8. A configuration device for simulating hardware, characterized in that: include: A determination module, used to determine the current demand for the configuration file in the virtual platform when simulating the target model through the virtual platform; A loading module, used to determine the real-time calling content corresponding to the calling command according to the current demand, and execute the calling command to load the target element data, wherein the calling command is used to select the hardware information corresponding to different elements in the model from the hardware element database; The configuration module is used to use the target element data to configure in the target visualization interface to obtain the simulation hardware simulation result corresponding to the target model.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
