Disclosure of Invention
An object of the embodiments of the present application is to provide a device simulation method, apparatus, storage medium and simulation terminal, so as to improve the above technical problems.
In order to achieve the above purpose, the present application provides the following technical solutions:
in a first aspect, an embodiment of the present application provides an apparatus simulation method, configured to simulate an apparatus to be simulated, where a plurality of functional boards are inserted into a card slot of the apparatus to be simulated, and the method includes: acquiring equipment information of equipment to be simulated and board card information of each functional board card, wherein the board card information comprises the type and the position of each interface on the functional board card; acquiring a static background file corresponding to the equipment to be simulated from a resource library according to the equipment information; acquiring a plurality of interface icons corresponding to each functional board card from a resource library according to the type of each interface; and rendering the corresponding interface icon on the card slot area on the static background file according to the position of each interface.
In the above scheme, the deployment information of each functional board card on the device to be simulated can be obtained through analysis by opening a communication link with the device to be simulated, the purpose of simulating the backplane interface of the device to be simulated is achieved through rendering a pre-designed static background file and a single interface icon, and meanwhile, the simulation result can be dynamically updated along with the change of the board card on the device. Therefore, operation and maintenance personnel do not need to go to a machine room to observe actual equipment, and only need to remotely monitor through the simulation terminal.
In an optional implementation manner, the device information includes a device type and a device specification of a device to be simulated, the repository is stored in a target device providing a Web service, the target device is the device to be simulated or a server communicating with the device to be simulated, and acquiring a static background file corresponding to the device to be simulated from the repository according to the device information includes: initiating a file query request to target equipment according to the equipment type so that the target equipment queries a corresponding static background file from a resource library; and acquiring a static background file returned by the target equipment, and determining a card slot area for rendering an interface icon on the static background file according to the equipment specification.
In an optional embodiment, the device information further includes a type of each card slot, and after determining a card slot region for rendering an interface icon on the static background file according to the device specification, the method further includes: acquiring a card slot icon corresponding to each card slot according to the type of each card slot; calculating rendering position coordinates of each card slot icon in the card slot area according to the pixel size of each card slot icon; the rendering of the corresponding interface icon on the card slot area on the static background file according to the position of each interface comprises: and rendering each card slot icon on the card slot area according to the rendering position coordinates, and rendering each interface icon on the corresponding card slot icon.
In order to realize simulation to a greater extent and achieve a more vivid simulation effect, before rendering the interface icons, the method further comprises a rendering step of the card slot icons, namely, the card slot icons and the interface icons are overlapped in sequence according to the static background files, so that the obtained simulation result can truly reflect the card slot types on the physical equipment.
In an optional implementation manner, the board information further includes states of interfaces on the functional boards, and the obtaining, from the resource library according to the types of the interfaces, a plurality of interface icons corresponding to each functional board includes: and acquiring a plurality of interface icons corresponding to each functional board card from the resource library according to the type and the state of each interface.
In an optional implementation manner, the storing the resource library in local client software of the simulation terminal, acquiring the static background file corresponding to the device to be simulated from the resource library according to the device information, and acquiring a plurality of interface icons corresponding to each functional board card from the resource library according to the type of each interface includes: calling a static background file corresponding to the equipment to be simulated from a local resource library according to the equipment information; and calling a plurality of interface icons corresponding to each functional board card from a local resource library according to the type of each interface.
In an optional implementation manner, after rendering the corresponding interface icon on the card slot area on the static background file according to the position of each interface, the method further includes: receiving a first operation made by a user on an interface on the card slot area, and initiating a data synchronization request to target equipment according to the first operation so as to request to acquire target data currently transmitted by a corresponding interface on the equipment to be simulated; and receiving and displaying target data returned by the target equipment on an interface.
In the above scheme, based on the first operation of the user, the data currently transmitted by the corresponding interface is requested from the target device, the device to be simulated intercepts and captures the data stream currently transmitted by the interface, and the data stream is returned in real time, so that remote synchronization of data information is realized.
In an optional implementation manner, after rendering the corresponding interface icon on the card slot area on the static background file according to the position of each interface, the method further includes: receiving a second operation made by a user on an interface on the card slot area; and generating a corresponding control instruction according to the second operation, and sending the control instruction to the equipment to be simulated so as to enable the equipment to be simulated to execute the corresponding operation according to the control instruction.
In the scheme, the remote operation control of the device to be simulated can be realized based on the communication link between the device to be simulated and the device to be simulated. For example, the control instruction may include an instruction to deactivate a certain card slot, turn off a power supply of the device, and the device to be simulated executes a corresponding operation after receiving the control instruction, thereby implementing remote control.
In a second aspect, an embodiment of the present application provides an apparatus simulation apparatus, configured to simulate an apparatus to be simulated, where a plurality of functional boards are inserted into a card slot of the apparatus to be simulated, and the apparatus includes: the system comprises a data acquisition module, a function board card and a simulation module, wherein the data acquisition module is used for acquiring equipment information of equipment to be simulated and board card information of each function board card, and the board card information comprises the type and the position of each interface on the function board card; the background file acquisition module is used for acquiring a static background file corresponding to the equipment to be simulated from a resource library according to the equipment information; the interface icon acquisition module is used for acquiring a plurality of interface icons corresponding to each functional board card from the resource library according to the type of each interface; and the rendering simulation module is used for rendering the corresponding interface icon in the card slot area on the static background file according to the position of each interface.
In a third aspect, an embodiment of the present application provides a storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method according to any one of the first aspect and the optional implementation manner of the first aspect is performed.
In a fourth aspect, an embodiment of the present application provides an emulation terminal, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the emulation terminal is running, the machine-readable instructions when executed by the processor performing the method according to any one of the first aspect and the optional implementation manner of the first aspect.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
In order to solve the technical problems in the prior art, the embodiment of the application firstly provides a simpler solution.
In the solution, the back panel diagram of the equipment is designed on the client to show the interface information of the equipment, the user installs the client on the used terminal, and can very conveniently check information such as interface running state and the like through the back panel diagram, wherein the back panel diagram can be mapped one to one according to the actual back panel of a fixed model, and different pictures are designed by the art designer to be distinguished, so that the operation and maintenance personnel do not need to go to a machine room to check the equipment, and only the terminal is needed to be used for remote monitoring.
The solution can be applied to equipment with fixed models and fixed mounting of the board cards, and when the equipment is replaced by single or multiple board cards with different types or the card slots are expanded, the pictures with the design are not applicable. Therefore, in the actual use process, the change of the board card is unavoidable due to various reasons such as fault maintenance and function upgrade, and thus, the embodiment of the present application further provides an apparatus simulation method.
Fig. 1 shows a flowchart of a device simulation method in this embodiment, which can be executed by a simulation terminal. The scheme is used for simulating the equipment to be simulated, a plurality of clamping grooves are formed in the equipment to be simulated, corresponding function board cards are inserted into the clamping grooves, the function board cards can be inserted into all the clamping grooves in the plurality of clamping grooves, and the function board cards can also be inserted into only part of the clamping grooves. In an embodiment, the device to be simulated may be a hybrid matrix, where the hybrid matrix is a device capable of switching any signal source to any target terminal, and is a device that is commonly used and is a core device in an audio/video processing control system, and an audio input board card, an audio output board card, a video input board card, a video output board card, and the like may be arranged on the hybrid matrix.
Specifically, as shown in fig. 1, the method includes the following steps:
step 110: and acquiring equipment information of the equipment to be simulated and board card information of each functional board card, wherein the board card information comprises the type and the position of each interface on the functional board card.
Step 120: and acquiring a static background file corresponding to the equipment to be simulated from the resource library according to the equipment information.
Step 130: and acquiring a plurality of interface icons corresponding to each functional board card from the resource library according to the type of each interface.
Step 140: and rendering the corresponding interface icon on the card slot area on the static background file according to the position of each interface.
Specifically, instep 110, the device to be simulated records its own device information and board information of each functional board plugged thereon, and the recorded information may be stored in a memory, a disk file, or a database. The device to be simulated is provided with a control device, the control device is used for controlling and managing the device to be simulated, the simulation terminal can be directly or indirectly communicated with the device to be simulated through the installed client software to obtain the information recorded by the device to be simulated, and can also be communicated with the device to be simulated through Web service. The simulation terminal can obtain the device information and the board card information through a browser of a computer, a desktop client, a client on a mobile terminal (such as a mobile phone or a tablet computer), an applet and the like.
In the two implementation modes, the simulation terminal can indirectly communicate with the device to be simulated, a server is arranged between the simulation terminal and the device to be simulated, and the server is used for providing service for the simulation terminal and returning information obtained from the device to be simulated to the simulation terminal. Specifically, the device to be simulated transmits information to the simulation terminal through a proxy service deployed on the server, the proxy service communicates with the device to be simulated (for example, communicates in a SOCKET manner) and provides HTTP service to the outside, the proxy service acquires device information recorded by the device to be simulated and board information of each functional board, and the simulation terminal initiates a request to the proxy service through a URL address of the proxy service to acquire the device information and the board information.
The simulation terminal can also be in direct communication with the device to be simulated, and the device to be simulated can realize the function of the server and is used for directly providing the recorded information to the simulation terminal. The equipment to be simulated can provide HTTP service to the outside through an IP port of the control device, and the simulation terminal obtains the equipment information and the board card information through the URL address of the equipment to be simulated.
Before the device simulation method is executed, static background files corresponding to different types of devices to be simulated, different types of interface icons (which may also include interface icons in different states), and different types of card slot icons (which may also include card slot icons in different states) are designed in a resource library. If the device to be simulated communicates with the simulation terminal through the Web service, the resource library is stored in a server providing the Web service (the server can be a server arranged between the device to be simulated and the simulation terminal, and can also be the device to be simulated which realizes the function of the server); and if the equipment to be simulated is communicated with the simulation terminal through the client software, the resource library is stored in the client software.
The following description takes an example that the simulation terminal uses a browser mode to pass through the server and the device to be simulated, and other implementation manners in the foregoing can be implemented by referring to the following embodiment.
Instep 120, the device information includes a device type and a device specification of the device to be simulated, where the device type refers to which type of device the device to be simulated belongs to, static background files corresponding to different types of devices are different, and the mixing matrix in this embodiment is one of the types.
As shown in fig. 2, one specific implementation ofstep 120 includes:
step 121: and initiating a file query request to the target equipment according to the equipment type so that the target equipment queries the corresponding static background file from the resource library.
If the device to be simulated is in communication with the simulation terminal through the server, the target device is the server, and if the device to be simulated is in direct communication with the simulation terminal, the target device is the device to be simulated.
In this document, the simulation of the device to be simulated may be two-dimensional, and then the static background file is a two-dimensional device base map, the device base map is used to show the information of the housing back plate of the device, and the interface icons of the functional board cards may be rendered on the device base map, so that the operation and maintenance personnel can master the access conditions of the board cards in the device and the interfaces on the board cards; of course, the simulation of the device to be simulated may also be three-dimensional, and then the static background file is a three-dimensional device model, and if the simulation result is desired to be sufficiently real, the device model is designed with reference to the device real object as much as possible, and the material and size (i.e., the length, width, and height parameters) of the model are similar to the real object.
Step 122: and obtaining a static background file returned by the target equipment, and determining a card slot area for rendering the interface icon on the static background file according to the equipment specification.
Among other things, equipment specifications may include: the device physical parameters (such as length, width and height parameters) and the maximum supportable number of boards, and if the device to be simulated can only plug in 10 functional boards at most, the maximum supportable number of boards is 10. After the simulation terminal obtains the static background file, the card slot area is determined on the static background file so as to be used for rendering each interface icon.
Instep 130, each function board card inserted into the card slot of the device to be simulated is provided with at least one interface, and the types of the interfaces on the same function board card may be the same or different, for example, each interface may include DVI, HDMI, DP, VGA, and the like. In a specific implementation manner, the simulation terminal initiates a file query request to the target device according to the type of each interface on each function board, and the target device queries a corresponding interface icon from the resource library according to the type of each interface and returns the queried interface icon to the simulation terminal.
In theabove steps 120 and 130, the emulation terminal can obtain the corresponding static background file and interface icon by initiating a request to the target device. If the simulation terminal realizes simulation through the client software, because the resource library is stored in the client software, the simulation terminal directly calls the static background file corresponding to the equipment to be simulated from the local resource library according to the equipment information, and directly calls a plurality of interface icons corresponding to each functional board card from the local resource library according to the type of each interface.
Optionally, in the resource library, each resource file is named according to a preset specification, so as to facilitate invoking, for example, according to: type-state-format naming of the specification. Taking a target device as an example, the simulation terminal requests a static background file with a device type of A from the target device through the browser, the target device queries in the resource library, locates the static background file with the name including "A" according to the name of each file and returns the static background file, for example, the simulation terminal requests an interface icon with an interface type of B and an interface state of C from the target device through the browser, and the target device locates the interface icon with the name including "B-C" according to the file name of each interface icon and returns the interface icon. And calling the static background file and the interface icon for the local resource library stored in the client software in a file name mode.
It should be noted that, the present embodiment does not limit the execution sequence ofstep 120 and step 130, and step 120 may be executed first, and then step 130 may be executed;step 130 may be performed first, and then step 120 may be performed;steps 120 and 130 may also be performed simultaneously, i.e., the static background file and the interface icon are requested from the target device at the same time.
In an embodiment, the board information further includes states of each interface on the functional board, and the device to be simulated records the states of each interface through a logic channel of each functional board, where the states include two states, one is a use state and the other is an unused state. Step 130 specifically includes: and acquiring a plurality of interface icons corresponding to each functional board card according to the type and the state of each interface. Therefore, the types and the states of the interfaces can be intuitively displayed on the simulation picture (or the three-dimensional simulation model) obtained by final rendering, and operation and maintenance personnel can conveniently master the real situation of the equipment to be simulated.
Instep 140, the emulation terminal renders the obtained interface icon on the card slot region of the static background file according to the obtained static background file and the interface icon corresponding to each interface on each functional board card and according to the position of each interface on each functional board card.
Illustratively, the board information further includes a position of each functional board, specifically, a slot number of a slot to which each functional board is connected, the simulation terminal determines a sub-rendering area of the plurality of interface icons corresponding to each functional board on the slot area according to the slot number corresponding to each functional board, and renders the corresponding plurality of interface icons on the corresponding sub-rendering area according to the positions of the plurality of interfaces on each functional board.
For example, if the maximum supportable number of boards of the device to be simulated is five, the static background file may be divided into at least five sub-rendering areas for rendering the interfaces on the five functional boards, where it is assumed that the device to be simulated is currently plugged with only three functional boards, the board 1 is plugged in the card slot 1, and the board 1 is provided with the interfaces a1 and B1; the board card 2 is inserted into the card slot 2, and the board card 2 is provided with interfaces A2 and B2; the board card 3 is inserted into the board card 5, and the board card 3 is provided with interfaces A3 and B3. After the simulation terminal obtains the static background file, a card slot area is determined on the static background file, and a position area to be rendered by interface icons on each function board is determined according to the slot number of each function board, so that it can be determined that the interface icons of the interfaces a1 and B1 are rendered in the sub-rendering area 1, the interface icons of the interfaces a2 and B2 are rendered in the sub-rendering area 2, the interface icons of the interfaces A3 and B3 are rendered in the sub-rendering area 5, then rendering position coordinates of two interface icons in the sub-rendering area 1 are determined according to the position information between the interfaces a1 and B1 on the board 1, and so on, the rendering position coordinates of the interface icons corresponding to the interfaces a2 and B2 and the interfaces A3 and B3 are determined and rendered.
In an optional embodiment, to realize a greater degree of simulation and achieve a more realistic simulation effect, a rendering step of the card slot icon is further included before the interface icon is rendered. As shown in fig. 3, afterstep 120, i.e., after obtaining the static background file, or further, afterstep 122, i.e., after determining the slot area for rendering the interface icon on the static background file, the method further includes the following steps:
step 210: and obtaining a card slot icon corresponding to each card slot according to the type of each card slot.
The device information of this embodiment further includes a type of each card slot, a board card with a corresponding function is plugged into each type of card slot, and the type of the card slot includes, for example: the device to be simulated may further include more card slot types, and the types of the device to be simulated are not comprehensive and are only an example. Specifically, the emulation terminal sends a request to the target device according to the type of each card slot, and the target device sends the card slot icon of the corresponding type to the emulation terminal. Or the simulation terminal inquires the corresponding card slot icon from the client software according to the type of each card slot.
Before the equipment simulation method is executed, card slot icons corresponding to different types of card slots are designed in a resource library, and card slot icons in different states under the same type can be designed aiming at the same type of card slots. Instep 210, the emulation terminal may obtain a corresponding card slot icon according to the type and state of each card slot, for example, if the card slot is currently connected with a function board, the color of the card slot icon in this state may be designed to be bright, and if the card slot is currently not connected with a function board, the color of the card slot icon in this state may be designed to be gray.
Step 220: and calculating rendering position coordinates of each card slot icon in a card slot area of the static background file according to the pixel size of each card slot icon.
And after the simulation terminal obtains each card slot icon, calculating rendering position coordinates according to the pixel size of each card slot icon. One specific way of calculation is as follows: determining rendering position coordinates of a first card slot icon at the left end by taking the top point of the upper left corner of the card slot area as an original point according to the slot number of each card slot; adding the rendering position coordinate of the first card slot icon and the transverse pixel size of the first card slot icon to determine the rendering position coordinate of a second card slot icon at the left end; and adding the rendering position coordinate of the second card slot icon and the transverse pixel size of the second card slot icon to determine the rendering position coordinate of the third card slot icon at the left end, and repeating the steps to determine the rendering position coordinate of each card slot icon from the left end to the right end on the card slot area step by step. For some complex devices to be simulated, if the back of the device is provided with an upper row of slots and a lower row of slots which are inserted with the functional board card, the rendering position coordinates of the first row of slot icons in the slot area are determined through the calculation mode, further, the vertex coordinates of the upper left corner and the longitudinal pixel size of the first slot icon are added, the obtained coordinates are used as the calculation origin of the next row of slot icons, and the rendering position coordinates of the next row of slot icons are calculated according to the calculation origin. Since the calculation method of the second row of card slot icons is the same as that of the first row of card slot icons, the description is omitted here. And if the back of the device to be simulated is also provided with a third row of card slots inserted with the functional board card, calculating according to the mode.
After the rendering position coordinates of each card slot icon are determined, the card slot area is divided into sub-rendering areas determined by different card slot icons, each functional board card corresponds to one card slot icon, and the interface icon corresponding to each interface on the functional board card is rendered on the corresponding card slot icon. In this embodiment, step 140 specifically includes: and rendering each card slot icon on the card slot area of the static background file according to the rendering position coordinate of each card slot icon, and rendering each interface icon on the corresponding card slot icon.
The step of rendering each interface icon on the corresponding card slot icon may specifically include: calculating rendering position coordinates of each interface icon on the corresponding card slot icon according to the number and the positions of the plurality of interfaces on each functional board card; and rendering each interface icon on the corresponding card slot icon according to the rendering position coordinate of each interface icon.
Taking one of the slot icons as an example, a specific calculation method of the rendering position coordinates of each interface icon on the slot icon is as follows: determining the rendering position coordinate of the first interface icon on the card slot icon by taking the top left corner vertex of the card slot icon as an origin; adding the rendering position coordinate of the first interface icon and the longitudinal pixel size of the first interface icon to determine the rendering position coordinate of the second interface icon; and adding the rendering position coordinate of the second interface icon and the longitudinal pixel size of the second interface icon to determine the rendering position coordinate of the third interface icon, and repeating the steps to gradually determine the rendering position coordinate of each interface icon from top to bottom on the slot icon. In another embodiment, if the interfaces on the function boards on the device to be simulated are arranged horizontally, in the above calculation manner, the rendering position coordinate of the previous interface icon is added to the horizontal pixel size of the previous interface icon, and the rendering position coordinate of the next interface icon is determined.
In the above embodiment, the simulation is performed according to the actual type (and actual state) of each card slot on the device to be simulated, and the simulation effect is good. In addition to the above embodiments, the slot icons may also be generic slot icons, that is, the slot icons corresponding to each slot are the same, so that the amount of calculation of the rendering position coordinates of each slot icon can be greatly reduced. The universal card slot icon is designed to be a gray icon, for example, and the material, color, length, width and height of the universal card slot icon can also be designed according to requirements.
Optionally, the static background file, the card slot icon and the interface icon may also be designed according to different styles, all files in each style are stored in the same style folder, the simulation terminal may designate a certain style to initiate a style switching request to the target device, the target device may be positioned to the style folder corresponding to the style switching request according to the style switching request, and the static background file and the icon file in the style folder are used for simulation.
The complexity of the back interface of the equipment mainly lies in the flexibility of the combination of the board cards of different types of interfaces, the embodiment of the application designs the icons of a single interface and a single card slot, and gets through the communication link between the equipment to be simulated and the simulation terminal, so that the simulation terminal can analyze the deployment information of each functional board card on the equipment to be simulated, the purpose of simulating the back board interface of the equipment is achieved, and meanwhile, the simulation result can be dynamically updated along with the change of the board card on the equipment. The embodiment decouples the change of the board card, increases the fine granularity of the design and the utilization rate and reusability of the icon assembly, facilitates the expansion of subsequent functions, reduces the workload of the design, realizes the real-time performance and the programmability of the back panel, and provides a technical basis for the subsequent expansion of other functions.
Further, as shown in fig. 4, afterstep 140, that is, after completing the simulation of the device back panel, the device simulation method in this embodiment further includes:
step 310: a first operation made by a user to an interface on the card slot region is received.
And the simulation terminal displays the simulation result on the interface, and the user can operate the interface on the card slot area based on the simulation result. The emulation terminal receives a first operation made by a user on the interface on the card slot area, and the first operation can be a click operation of the user on the interface.
Step 320: and initiating a data synchronization request to the target equipment according to the first operation so as to request to acquire target data currently transmitted by a corresponding interface on the equipment to be simulated.
Step 330: and receiving and displaying target data returned by the target equipment on the interface.
The simulation terminal requests the current transmitted data of the corresponding interface from the target equipment based on the first operation of the user, the equipment to be simulated intercepts the current transmitted data stream of the interface and transmits the data stream to the simulation terminal in real time, and synchronization of data information is achieved. By the device simulation method, a user can click the corresponding interface based on the simulation result, and the information such as video or audio currently transmitted by the interface is synchronously displayed on the simulation terminal.
Furthermore, the simulation terminal realizes graphical display of the equipment to be simulated based on the icon file designed in advance in the resource library according to the equipment information of the equipment to be simulated and the board card information of each functional board card, the simulation result can be displayed in a two-dimensional mode or in a three-dimensional mode, the three-dimensional display can restore the physical equipment with high simulation degree, and thus operation and maintenance personnel do not need to go to a machine room to observe actual equipment. The simulation result obtained by the simulation terminal can be configured with the same function as the physical equipment, so that some inconvenient operations in a physical environment can be conveniently operated on the simulation terminal.
Specifically, as shown in fig. 5, afterstep 140, that is, after completing the simulation of the device back panel, the device simulation method in this embodiment further includes:
step 410: and receiving a second operation made by the user on the interface on the card slot area.
Step 420: and generating a corresponding control instruction according to the second operation.
Step 430: and sending the control instruction to the equipment to be simulated so that the equipment to be simulated executes corresponding operation according to the control instruction.
In the embodiments provided in the foregoing, the most critical step has been completed, that is, the communication link between the device to be simulated and the simulation terminal is opened, so that the remote operation control of the device to be simulated on the simulation terminal can be realized based on the communication link. For example, the control instruction may include an instruction to deactivate a certain card slot, turn off a power supply of the device, and the device to be simulated executes a corresponding operation after receiving the control instruction, thereby implementing remote control.
Based on the same inventive concept, an apparatus simulation device is provided in the embodiments of the present application, please refer to fig. 6, the apparatus includes: adata acquisition module 510, a backgroundfile acquisition module 520, an interfaceicon acquisition module 530, and arendering simulation module 540.
Thedata obtaining module 510 is configured to obtain device information of a device to be simulated and board information of each functional board, where the board information includes a type and a position of each interface on the functional board;
a backgroundfile obtaining module 520, configured to obtain, according to the device information, a static background file corresponding to the device to be simulated from a resource library;
an interfaceicon obtaining module 530, configured to obtain, from the resource library, a plurality of interface icons corresponding to each function board according to the type of each interface;
and therendering simulation module 540 is configured to render the corresponding interface icon on the card slot area on the static background file according to the position of each interface.
The implementation principle and the generated technical effect of the device simulation apparatus provided in the embodiment of the present application have been introduced in the foregoing method embodiment, and for brief description, no mention is made in part of the embodiment of the apparatus, and reference may be made to the corresponding contents in the method embodiment.
Optionally, an embodiment of the present application further provides a storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program executes the device simulation method provided by the present application.
Optionally, an embodiment of the present application further provides a simulation terminal, including: the device comprises a processor, a memory and a bus, wherein the memory stores machine readable instructions executable by the processor, when the simulation terminal runs, the processor and the memory are communicated through the bus, and the machine readable instructions are executed by the processor to execute the device simulation method provided by the application.
It is understood that the simulation terminal may be a physical device, such as a PC, a notebook, a tablet, a mobile phone, a server, an embedded device, etc., or may be a virtual device, such as a virtual machine, a virtualized container, etc.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the unit is only a logical division, and other divisions may be realized in practice. Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.