Hardware resource simulation verification method, device, network equipment and storage medium

By building a simulation space inside the network equipment and utilizing the detection function of the hardware chip, the problem of inaccurate simulation of hardware resource allocation is solved, accurate simulation results are achieved without affecting real business, and the success rate and efficiency of business deployment are improved.

CN119072908BActive Publication Date: 2025-09-19NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202380008526.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2025-09-19
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately simulate hardware resource allocation in emulated networks, resulting in inaccurate simulation results, affecting service deployment efficiency and user experience.

Method used

Build a simulation space inside the network device, obtain the hardware resource amount through the detection function of the hardware chip, judge the success or failure of the simulation, and ensure the accuracy of the simulation results.

Benefits of technology

Accurately simulate hardware resource allocation without affecting real business, improve the success rate and efficiency of business deployment, and ensure the accuracy of simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119072908B_ABST
    Figure CN119072908B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a hardware resource simulation verification method, device, network device and storage medium, which relates to the field of network communication technology. The method includes: when entering the simulation mode, synchronizing the real configuration data of the network device to the simulation space, and using the real configuration data as the simulation benchmark configuration data; in the simulation mode, sending the simulation configuration data to the simulation space, and the simulation space occupies the memory resources of the network device; sending the simulation benchmark configuration data, simulation configuration data and preset type data to the detection interface of the hardware chip, and obtaining the hardware resource amount occupied by the simulation benchmark configuration data, simulation configuration data and preset type data calculated by the hardware chip; if the total resource amount of the hardware chip is greater than the hardware resource amount, then the simulation is determined to be successful. Accurate hardware resource simulation results can be obtained without affecting real business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a hardware resource simulation verification method, apparatus, network equipment, and storage medium. Background Art

[0002] With the large-scale deployment and use of SDN (Software Defined Network) networks, automated deployment technologies and multi-dimensional operation and maintenance technologies have brought significant convenience to network deployment, modification, and maintenance. As business volume grows, simulation verification technology can be used to verify each deployed service to ensure sufficient equipment resources are consumed and that existing services are not impacted.

[0003] After users enable the simulation verification function, the simulation system automatically generates a simulated network based on the actual deployment of the production network and synchronizes the production network's configuration data to the simulated network. Then, when users need to deploy new services, they can first orchestrate the service on the simulated network, start simulation verification, and perform connectivity testing, overlay impact assessment, and capacity assessment on the entire network. Once the simulation verification passes, the newly orchestrated service is delivered to the real network.

[0004] The simulated network and the real network are separate. Generating the simulated network requires simulating the hardware resources of each device. However, it's currently difficult to obtain chip manufacturers' hardware resource allocation algorithms, making it difficult to replicate the exact hardware resource allocation in the simulated network as in the production network. Furthermore, it's impossible to synchronize the massive amounts of real-time data generated in the production network with the simulated network in real time. Consequently, the simulation results obtained using current simulation verification capabilities are inaccurate. Summary of the Invention

[0005] The embodiments of the present application provide a hardware resource simulation verification method, apparatus, network equipment and storage medium, which can obtain accurate hardware resource simulation results without affecting real business.

[0006] In a first aspect, an embodiment of the present application provides a hardware resource simulation verification method, which is applied to a network device and includes:

[0007] When entering the simulation mode, synchronizing the real configuration data of the network device to the simulation space, and using the real configuration data as the simulation reference configuration data;

[0008] In simulation mode, simulation configuration data is sent to the simulation space, and the simulation space occupies memory resources of the network device;

[0009] Sending the simulation benchmark configuration data, the simulation configuration data, and the preset type data to the detection interface of the hardware chip, and obtaining the amount of hardware resources occupied by the simulation benchmark configuration data, the simulation configuration data, and the preset type data calculated by the hardware chip, where the preset type data is data that has occupied resources of the hardware chip in addition to the real configuration data;

[0010] If the total resource amount of the hardware chip is greater than the hardware resource amount, it is determined that the simulation is successful.

[0011] In a possible implementation, the method further includes:

[0012] Feedback the successful simulation results to the control device;

[0013] If the simulation validation instruction sent by the control device is received, the simulation configuration data is sent to the real space of the network device.

[0014] In a possible implementation, the method further includes:

[0015] If the simulation configuration data is successfully sent to the real space of the network device, the simulation benchmark configuration data is updated based on the simulation configuration data.

[0016] In a possible implementation, the method further includes:

[0017] If an instruction to abandon the simulation configuration data is received from the control device, the simulation configuration data in the simulation space is deleted.

[0018] In a possible implementation, the method further includes:

[0019] Receiving immediately effective data sent by the control device, where the immediately effective data is simulation configuration data that is specified by the user to be forcibly effective or configuration data that does not support the simulation function;

[0020] The immediately effective data is sent to the real space of the network device.

[0021] In a possible implementation, the method further includes:

[0022] If a simulation end instruction sent by the control device is received, or if no operation of the user on the simulation space is received within a specified time period, the simulation mode is exited and the simulation benchmark configuration data and the simulation configuration data in the simulation space are deleted.

[0023] In a possible implementation, the method further includes:

[0024] Each time simulation configuration data is received, the simulation configuration data is sent to the simulation space; or,

[0025] Each time simulation configuration data is received, the received simulation configuration data is cached;

[0026] When receiving the simulation submission instruction sent by the control device, the cached simulation configuration data is sent to the simulation space.

[0027] In a possible implementation, the method further includes:

[0028] If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or,

[0029] If the total resource amount of the hardware chip is less than the hardware resource amount, and the reason for the simulation failure is a specified reason, the specified reason is fed back to the control device so that the control device displays a prompt message including the specified reason to the user; the specified reason includes at least one of the following: simulation configuration data of a specified type is re-issued, the hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, the hardware resources of the hardware chip are preempted by dynamic data generated by the network device, the hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and the hardware resources of the hardware chip are preempted by configuration data that does not support the simulation function;

[0030] If an instruction to abandon the simulation configuration data is received from the control device, the simulation configuration data is deleted.

[0031] In a second aspect, an embodiment of the present application provides a hardware resource simulation and verification device, which is applied to a network device, and the device includes:

[0032] A synchronization module, configured to synchronize the real configuration data of the network device to the simulation space when entering the simulation mode, and use the real configuration data as the simulation reference configuration data;

[0033] a sending module, configured to send simulation configuration data to the simulation space in simulation mode, wherein the simulation space occupies memory resources of the network device;

[0034] an acquisition module, configured to send the simulation benchmark configuration data, the simulation configuration data, and preset type data to the detection interface of the hardware chip, and obtain the amount of hardware resources occupied by the simulation benchmark configuration data, the simulation configuration data, and the preset type data calculated by the hardware chip, where the preset type data is data that has occupied resources of the hardware chip in addition to the actual configuration data;

[0035] The determination module is configured to determine that the simulation is successful if the total resource amount of the hardware chip is greater than the hardware resource amount.

[0036] In a possible implementation, the apparatus further includes:

[0037] A feedback module, used to feed back the successful simulation result to the control device;

[0038] The sending module is further configured to send the simulation configuration data to the real space of the network device upon receiving a simulation validation instruction sent by the control device.

[0039] In a possible implementation, the apparatus further includes:

[0040] An updating module is configured to update the simulation benchmark configuration data based on the simulation configuration data if the simulation configuration data is successfully sent to the real space of the network device.

[0041] In a possible implementation, the apparatus further includes:

[0042] The deleting module is configured to delete the simulation configuration data in the simulation space upon receiving an instruction from the control device to abandon the simulation configuration data.

[0043] In a possible implementation, the apparatus further includes:

[0044] A receiving module, configured to receive immediately effective data sent by the control device, wherein the immediately effective data is simulation configuration data specified by the user to be forcibly effective or configuration data that does not support the simulation function;

[0045] The sending module is further configured to send the immediately effective data to the real space of the network device.

[0046] In a possible implementation, the apparatus further includes:

[0047] An exit module is used to exit the simulation mode and delete the simulation benchmark configuration data and the simulation configuration data in the simulation space if a simulation end instruction sent by the control device is received or no operation of the user on the simulation space is received within a specified time period.

[0048] In a possible implementation, the sending module is specifically configured to:

[0049] Each time simulation configuration data is received, the simulation configuration data is sent to the simulation space; or,

[0050] Each time simulation configuration data is received, the received simulation configuration data is cached;

[0051] When receiving the simulation submission instruction sent by the control device, the cached simulation configuration data is sent to the simulation space.

[0052] In a possible implementation, the apparatus further includes:

[0053] Simulation failure processing module, used to:

[0054] If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or,

[0055] If the total resource amount of the hardware chip is less than the hardware resource amount, and the reason for the simulation failure is a specified reason, the specified reason is fed back to the control device so that the control device displays a prompt message including the specified reason to the user; the specified reason includes at least one of the following: simulation configuration data of a specified type is re-issued, the hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, the hardware resources of the hardware chip are preempted by dynamic data generated by the network device, the hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and the hardware resources of the hardware chip are preempted by configuration data that does not support the simulation function;

[0056] If an instruction to abandon the simulation configuration data is received from the control device, the simulation configuration data is deleted.

[0057] In a third aspect, an embodiment of the present application provides a network device, the network device comprising:

[0058] processor;

[0059] transceiver;

[0060] A machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; the machine-executable instructions prompting the processor to perform the following steps:

[0061] When entering the simulation mode, synchronizing the real configuration data of the network device to the simulation space, and using the real configuration data as the simulation reference configuration data;

[0062] In simulation mode, simulation configuration data is sent to the simulation space, and the simulation space occupies memory resources of the network device;

[0063] Sending the simulation benchmark configuration data, the simulation configuration data, and the preset type data to the detection interface of the hardware chip, and obtaining the amount of hardware resources occupied by the simulation benchmark configuration data, the simulation configuration data, and the preset type data calculated by the hardware chip, where the preset type data is data that has occupied resources of the hardware chip in addition to the real configuration data;

[0064] If the total resource amount of the hardware chip is greater than the hardware resource amount, it is determined that the simulation is successful.

[0065] In one possible implementation, the machine executable instructions further cause the processor to execute the following steps:

[0066] Feedback the successful simulation result to the control device via the transceiver;

[0067] If the simulation validation instruction sent by the control device is received through the transceiver, the simulation configuration data is sent to the real space of the network device.

[0068] In one possible implementation, the machine executable instructions further cause the processor to execute the following steps:

[0069] If the simulation configuration data is successfully sent to the real space of the network device, the simulation benchmark configuration data is updated based on the simulation configuration data.

[0070] In one possible implementation, the machine executable instructions further cause the processor to execute the following steps:

[0071] If an instruction to abandon the simulation configuration data is received from the control device through the transceiver, the simulation configuration data in the simulation space is deleted.

[0072] In one possible implementation, the machine executable instructions further cause the processor to execute the following steps:

[0073] Receiving, through the transceiver, immediately effective data sent by the control device, wherein the immediately effective data is simulation configuration data specified by the user to be forcibly effective or configuration data that does not support the simulation function;

[0074] The immediately effective data is sent to the real space of the network device.

[0075] In a possible implementation, the machine executable instructions further cause the processor to execute the following steps:

[0076] If the simulation end instruction sent by the control device is received through the transceiver, or if no operation of the user on the simulation space is received within a specified time period, the simulation mode is exited and the simulation benchmark configuration data and the simulation configuration data in the simulation space are deleted.

[0077] In one possible implementation, the machine executable instructions further cause the processor to execute the following steps:

[0078] Each time the transceiver receives simulation configuration data, the simulation configuration data is sent to the simulation space; or,

[0079] Each time simulation configuration data is received through the transceiver, the received simulation configuration data is cached;

[0080] When the simulation submission instruction sent by the control device is received through the transceiver, the cached simulation configuration data is sent to the simulation space.

[0081] In one possible implementation, the machine executable instructions further cause the processor to execute the following steps:

[0082] If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or,

[0083] If the total resource amount of the hardware chip is less than the hardware resource amount, and the reason for the simulation failure is a specified reason, the specified reason is fed back to the control device so that the control device displays a prompt message including the specified reason to the user; the specified reason includes at least one of the following: simulation configuration data of a specified type is re-issued, the hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, the hardware resources of the hardware chip are preempted by dynamic data generated by the network device, the hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and the hardware resources of the hardware chip are preempted by configuration data that does not support the simulation function;

[0084] If an instruction to abandon the simulation configuration data is received from the control device through the transceiver, the simulation configuration data is deleted.

[0085] In a fourth aspect, an embodiment of the present application provides a machine-readable storage medium storing machine-executable instructions. When called and executed by a processor, the machine-executable instructions prompt the processor to implement any of the method steps described in the first aspect above.

[0086] In a fifth aspect, an embodiment of the present application provides a computer program product, which prompts the processor to implement any method step described in the first aspect.

[0087] Using the above technical solution, in simulation mode, simulation configuration data can be sent to the simulation space. Since the simulation space occupies the memory resources of the network device, that is, the simulation space is located inside the network device. Therefore, the simulation configuration data is sent to the simulation space, not to the real space, and will not affect the services in the real space. Furthermore, the network device can utilize the detection function of the hardware chip to obtain the simulation benchmark configuration data, simulation configuration data, and the hardware resource amount occupied by the preset type data calculated by the hardware chip, and then determine whether the total resource amount of the hardware chip is greater than the hardware resource amount. It can be seen that the network device can obtain the required hardware resource amount by utilizing its own hardware chip detection capability, without the need for the hardware chip manufacturer to provide the hardware chip's resource allocation algorithm. The calculated hardware resource amount is the sum of the hardware resource amount required by the real configuration data, simulation configuration data, and preset type data, which is consistent with the actual resource occupancy of the hardware chip. In this way, accurate hardware resource simulation results can be obtained without affecting real services. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] The drawings described herein are used to provide 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 improper limitations on the present application.

[0089] Figure 1 is an exemplary schematic diagram of a simulation network architecture in the related art;

[0090] Figure 2 A simulation network architecture diagram provided in an embodiment of the present application;

[0091] Figure 3 A flowchart of a hardware resource simulation verification method provided in an embodiment of the present application;

[0092] Figure 4 A schematic diagram of the data flow after various types of data provided in the embodiment of the present application are sent to the network device;

[0093] Figure 5 A flowchart of another hardware resource simulation verification method provided in an embodiment of the present application;

[0094] Figure 6 A schematic diagram of a single device simulation process provided in an embodiment of the present application;

[0095] Figure 7 A schematic diagram of another single-device simulation process provided in an embodiment of the present application;

[0096] Figure 8 A schematic diagram of a flow chart of a whole network simulation provided in an embodiment of the present application;

[0097] Figure 9 A schematic diagram of the structure of a hardware resource simulation and verification device provided in an embodiment of the present application;

[0098] Figure 10 A schematic diagram of the structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0099] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention is further described below with reference to the accompanying drawings and examples. It should be understood that the described examples are only some examples of the present invention, not all examples. All other examples derived by persons of ordinary skill in the art based on the examples of the present invention fall within the scope of protection of the present invention.

[0100] Simulation verification technology is a typical application of digital twin technology. It can divide the network world into production and design. The production state is the real physical network world, a collection of network devices actually used and operated by users; the design state is the virtual physical network world, a digital mapping of the real physical network world.

[0101] like Figure 1 As shown, Figure 1 The right side is the production network in production state, that is, the real physical network. Figure 1 The left side is the simulated network in the design state, that is, the virtual network simulated based on the production network.

[0102] For example, the production network topology includes Border nodes, Spine nodes, and Leaf nodes. Each node in the production network is a physically deployed network device. The emulated network topology is identical to the production network topology, but each node in the emulated network is a virtual node. The emulated network topology includes vBorder (virtually Border) nodes, vSpine (virtually Spine) nodes, and vLeaf (virtually Leaf) nodes. vBorder nodes are virtual devices emulated based on Border nodes in the production network, vSpine nodes are virtual devices emulated based on Spine nodes in the production network, and vLeaf nodes are virtual devices emulated based on Leaf nodes in the production network.

[0103] The design state also includes a design state DB (Database), and the production state also includes a production state DB. The production state DB can synchronize the configuration data of the real space with the design state DB, and the design state DB can send the configuration data after the simulation is successful to the production state DB.

[0104] When building a simulated network, it's important to ensure that the virtual nodes in the simulated network use the same hardware resource allocation method as the corresponding network devices in the production network. However, hardware vendors may not provide hardware resource allocation algorithms. Consequently, during the simulation process, there's no guarantee that the hardware resource allocation for each virtual node in the simulated network will be identical to the hardware resource allocation for the corresponding network devices in the production network. This can lead to inaccurate simulation results for the hardware resources of network devices. For example, the simulation may succeed, but deployment of new services to the production network may fail. This can affect deployment efficiency, the services running on the production network, and the user experience.

[0105] In order to solve the above problems, the embodiment of the present application provides a hardware resource simulation verification method, in which the simulation verification of hardware resources can be completed inside the network device. For ease of understanding, the simulation architecture provided by the embodiment of the present application is first introduced. Figure 2 As shown, the simulation network architecture includes: a network management platform, system software and hardware drivers, and the system software and hardware drivers are deployed in network devices.

[0106] The network management platform includes control devices, through which users can configure and manage various network devices in the simulated network architecture. The simulated network architecture can include multiple network devices. Figure 2 A network device is shown as an example in FIG.

[0107] The system software includes a configuration management module and multiple business modules. Figure 2 Only service module 1, service module 2 and service module 3 are shown as examples. In actual implementation, the number of service modules is not limited thereto.

[0108] At the data level, network devices can be divided into real space and simulated space.

[0109] The real space is the space where network devices actually operate. All configuration data in the real space takes effect immediately. The real space is usually in a stable state and does not change easily.

[0110] The simulation space uses real-world configuration data as its foundation, allowing users to orchestrate and deploy new services at any time. The simulation space can be used to integrate existing real-world configuration data with the simulated configuration data to be deployed, verifying the adequacy of network device hardware resources.

[0111] Each service module includes both real and simulated space. The real space is used to store real configuration data, while the simulated space is used to store simulated configuration data. This means that each service module can process both real and simulated configuration data. However, the results of the service module's processing of real and simulated configuration data are stored separately and independently. Therefore, processing of simulated configuration data does not affect processing of real configuration data.

[0112] Hardware drivers include driver programs, which are used to drive hardware chips. Hardware drivers can process both real data from network devices and simulated data in the simulation space. For example, a hardware driver can send real configuration data to a hardware chip, so that the real configuration data occupies the hardware chip's hardware resources and takes effect within the hardware chip. In other words, the hardware driver can manipulate hardware resources. Furthermore, the hardware driver can call upon the hardware chip to perform hardware resource calculations.

[0113] exist Figure 2 In the , users can issue various management instructions to the configuration management module through the control device, and users can also configure management instructions directly in the configuration management module. The configuration management module can issue data that needs to take effect immediately to the real space of each business module, and can issue simulation configuration data to the simulation space of each business module.

[0114] Each business module's real configuration data in the real space can be synchronized with its own simulation space. Each business module can send data in the real space that needs to take effect immediately to the hardware driver, which in turn sends the data that needs to take effect immediately to the hardware chip. Each business module can also send simulated configuration data in the simulation space to the hardware driver, which then stores the simulated configuration data in the simulation space and calls the hardware chip to perform hardware resource calculations based on the simulated configuration data.

[0115] In addition, when the hardware driver and simulation module determine that the simulation verification results have changed, they can both feedback notification messages to the configuration management module, so that the configuration management module can feedback the notification message to the control device, and the control device will push the notification message to the user, so that the user can perceive the simulation verification results in a timely manner.

[0116] In combination with the above-mentioned simulation network architecture, the embodiment of the present application provides a hardware resource simulation verification method, which is applied to network devices, such as Figure 3 As shown, the method includes:

[0117] S301. When entering the simulation mode, synchronize the real configuration data of the network device to the simulation space, and use the real configuration data as the simulation reference configuration data.

[0118] Before sending simulation configuration data to the simulation space, the network device must ensure that simulation baseline configuration data already exists in the simulation space. Upon receiving a command to enter simulation mode from a user-triggered control device, the network device's configuration management module can set the network device's simulation state to the simulation start state and generate simulation baseline configuration data based on the real configuration data in the real space.

[0119] S302: In simulation mode, send simulation configuration data to the simulation space.

[0120] Among them, the simulation space occupies the memory resources of the network device, that is, in the embodiment of the present application, the simulation space can be constructed inside the network device.

[0121] The simulation configuration data in the embodiment of the present application may be service configuration data issued for a new service when a new service is deployed, or may be modified service configuration data issued for an existing service when an existing service needs to be modified.

[0122] S303: Send simulation benchmark configuration data, simulation configuration data, and preset type data to the detection interface of the hardware chip to obtain the amount of hardware resources occupied by the simulation benchmark configuration data, simulation configuration data, and preset type data calculated by the hardware chip.

[0123] The preset type data is data that occupies resources of the hardware chip, except for the actual configuration data.

[0124] Among them, the hardware chips currently used in network devices all have detection capabilities. After the hardware driver of the network device receives the simulation configuration data, it can send the simulation configuration data, simulation benchmark configuration data and preset type data to the detection interface of the hardware chip without actually applying for hardware resources. The hardware chip then calculates the amount of hardware resources occupied by the simulation benchmark configuration data, simulation configuration data and preset type data based on its own detection capabilities.

[0125] S304: If the total resource amount of the hardware chip is greater than the hardware resource amount, it is determined that the simulation is successful.

[0126] Using this method, in simulation mode, simulation configuration data can be sent to the simulation space. Since the simulation space occupies the memory resources of the network device, that is, the simulation space is located within the network device. Therefore, the simulation configuration data is sent to the simulation space, not to the real space, and will not affect the services in the real space. Furthermore, the network device can utilize the detection function of the hardware chip to obtain the hardware resource amount occupied by the simulation benchmark configuration data, simulation configuration data, and preset type data calculated by the hardware chip, and then determine whether the total resource amount of the hardware chip is greater than the hardware resource amount. Therefore, the network device can obtain the required hardware resource amount by utilizing its own hardware chip detection capability, without requiring the hardware chip manufacturer to provide the hardware chip's resource allocation algorithm. Furthermore, the calculated hardware resource amount is the sum of the hardware resource amounts required by the real configuration data, simulation configuration data, and preset type data, which is consistent with the actual resource occupancy of the hardware chip. This allows accurate hardware resource simulation results to be obtained without affecting real services.

[0127] In some embodiments of the present application, after the network device determines that the simulation is successful, it can provide feedback to the control device regarding the successful simulation result. The user can view the successful simulation result through the control device and, if it is determined that the network device needs to be instructed to validate the simulation configuration data, trigger the simulation validation instruction through the control device.

[0128] Furthermore, if the network device receives the simulation validation instruction sent by the control device, the simulation configuration data is sent to the real space of the network device.

[0129] Among them, the hardware chip of the network device is located in the real space. After the configuration management module of the network device receives the simulation effectiveness instruction, it can send the simulation configuration data to the real space of the business module and to the real space of the hardware driver. Then the hardware driver can send the simulation configuration data to the hardware chip.

[0130] It is understandable that when the network device receives the simulation validation instruction, the simulation configuration data has already been stored in the simulation space of the network device, that is, it has already been stored in the network device. Therefore, the control device only needs to issue a simulation validation instruction to notify the network device to validate the simulation configuration data, without having to issue the simulation configuration data again. This can improve the efficiency of simulation validation and make business deployment more efficient. In addition, on the basis of improving deployment efficiency, it can also avoid the problem of failure of simulation configuration data to take effect due to changes in the hardware resource usage of the network device after the simulation verification is completed and before the simulation configuration data takes effect, thereby improving the success rate of business deployment.

[0131] In some embodiments of the present application, if the network device successfully sends the simulation configuration data to the real space of the network device, the simulation benchmark configuration data is updated based on the simulation configuration data.

[0132] For example, the original simulation benchmark configuration data includes configuration data 1, configuration data 2 and configuration data 3. If after completing the simulation of simulation configuration data 4, simulation configuration data 4 is successfully sent to the real space, the updated simulation benchmark configuration data includes configuration data 1, configuration data 2, configuration data 3 and the newly added simulation configuration data 4.

[0133] It is understandable that if the user sends new simulation configuration data again, the network device performs hardware resource simulation verification based on the new simulation configuration data and the updated simulation benchmark configuration data.

[0134] Using this method, when a network device enters simulation mode, existing real-world configuration data can be used as simulation configuration baseline data, effectively backing up the real-world configuration data before simulation. After the network device successfully sends the simulated configuration data to the real world, meaning the simulated configuration data takes effect in the real world, the simulation baseline configuration data in the simulation space is also updated, ensuring consistency between the simulated baseline configuration data in the simulation space and the real-world configuration data in the real world. This improves the real-time performance and accuracy of subsequent simulation verification.

[0135] In some embodiments of the present application, the user may abandon the simulation verification operation after sending the simulation configuration data. After the network device sends the simulation configuration data to the simulation space, if it receives an instruction from the control device to abandon the simulation configuration data, the simulation configuration data in the simulation space is deleted.

[0136] If the user wants to abandon the simulation verification operation, the control device can send an instruction to abandon the simulation configuration data to the network device. After receiving the instruction to abandon the simulation configuration data, the network device can delete the simulation configuration data indicated by the instruction from the simulation space.

[0137] By adopting this method, the network device will promptly delete the abandoned simulation configuration data from the simulation space to ensure the accuracy of the data in the simulation space and improve the accuracy of subsequent simulation verification results.

[0138] In some embodiments of the present application, based on the above embodiments, when there is no simulation requirement, the network device can exit the simulation mode.

[0139] In a first implementation manner, if the network device receives a simulation end instruction sent by the control device, it exits the simulation mode and deletes the simulation benchmark configuration data and the simulation configuration data in the simulation space.

[0140] In a second implementation manner, if the network device does not receive any user operation on the simulation space within a specified time period, the network device exits the simulation mode and deletes the simulation benchmark configuration data and the simulation configuration data in the simulation space.

[0141] When the network device exits the simulation mode, the simulation state can be set to the simulation end state, and the memory resources occupied by the simulation space can be released.

[0142] In addition, in the second embodiment described above, if no user operation on the simulation space is received within the specified time period, there may still be simulation configuration data in the simulation space that has been successfully simulated and verified but has not yet taken effect. In response to this situation, the network device can process these simulation configuration data based on a pre-set default policy. For example, if the default policy is to abandon the simulation configuration data, the network device can directly abandon the simulation configuration data and exit the simulation mode. Or if the default policy is to submit the simulation configuration data, the network device automatically triggers the simulation validation process, that is, the network device can update the real configuration data in the real space based on the simulation configuration data, and send the simulation configuration data to the hardware chip. After the simulation configuration data takes effect in the real space, the simulation mode is exited.

[0143] By adopting the above two implementation methods, the simulation mode can be exited in time when there is no simulation demand, so as to release the memory resources occupied by the simulation space and avoid occupying the memory resources for a long time.

[0144] In the embodiment of the present application, in the operating system of the network device, the data involved can be divided into two categories:

[0145] The first category is configuration data, which can be the real configuration data and simulated configuration data in the above-mentioned embodiments. Configuration data is manually issued by the user and requires persistence. Configuration data can only be modified and deleted by the user and does not change as the network device operates. Configuration data is considered static data.

[0146] The second category is operational data, which is generated during network device operation as it processes received messages or over time. This data does not require persistence and changes with changes in the external network environment, making it dynamic data.

[0147] Both types of data may occupy network device hardware resources. When a network device is in simulation mode, data with immediate effect may also appear. This data requires no simulation verification and must take effect immediately in real-world environments. This data can be either configuration data or operational data.

[0148] The user can send the immediately effective data to the network device through the control device. Correspondingly, the network device receives the immediately effective data sent by the control device and sends the immediately effective data to the real space of the network device.

[0149] Among them, the data status carried by the immediately effective data is the immediately effective status. After the network device receives and identifies the immediately effective data based on the data status, it directly sends the immediately effective data to the real space.

[0150] It should be noted that the network device may receive immediately effective data at any stage of the simulation mode. The network device can continue to operate the simulation configuration data in the simulation space simultaneously and process the immediately effective data in the real space.

[0151] The immediately effective data sent by the user through the control device can specify the simulation configuration data that is mandatory for the user or the configuration data that does not support the simulation function.

[0152] Among them, the simulation configuration data that the user specifies to be enforced is: during the simulation, due to special circumstances, the user requires the simulation configuration data to be enforced. The network device can directly send this type of simulation configuration data to the real space of the network device, and then synchronize it to the simulation space, so as to update the simulation baseline configuration data of the simulation space based on this type of simulation configuration data.

[0153] The configuration data that does not support the simulation function is: the configuration data sent down considering the evolution requirements of the network device. The network device does not currently support processing of the configuration data, but this part of the configuration data will occupy the hardware resources of the hardware chip.

[0154] In addition, dynamic data generated during the operation of network equipment also belongs to immediately effective data. When dynamic data that requires hardware resources is generated in network equipment, it can be directly sent to the hardware chip. The various types of immediately effective data described above are all preset types of data.

[0155] In the embodiment of the present application, the network device sends simulation configuration data to the simulation space, which can include the following two implementation methods:

[0156] Method 1: Each time simulation configuration data is received, the simulation configuration data is sent to the simulation space.

[0157] It is understandable that after sending the simulation configuration data to the simulation space, the network device may continue to execute the above S303 - S304 to determine whether the simulation of the simulation configuration data is successful.

[0158] That is, each time the configuration management module of the network device receives one or a batch of simulation configuration data, it sends these simulation configuration data to the simulation space and returns the result of this hardware simulation verification to the control device in real time.

[0159] If the simulation verification fails, the simulation configuration data for this time will be rolled back, that is, the simulation configuration data issued this time will be deleted; if the simulation verification succeeds, the simulation configuration data issued this time will be saved. Then, after receiving the simulation validation instruction, each simulation configuration data will be sent to the real space.

[0160] In this way, hardware resource detection is dispersed in the process of each simulation configuration data delivery. Users can promptly obtain the results of each hardware resource detection and adjust subsequent business scheduling in a timely manner.

[0161] Method 2: Each time simulation configuration data is received, the received simulation configuration data is cached. When a simulation submission instruction sent by the control device is received, the cached simulation configuration data is sent to the simulation space.

[0162] This approach allows for faster batch delivery of simulation configuration data, and only requires a single hardware resource probe for each batch of simulation configuration data, shortening hardware resource simulation verification time. The probability of dynamic hardware resource changes during the hardware resource simulation verification process is reduced, resulting in more accurate simulation results.

[0163] In the embodiment of the present application, simulation failure may also occur. If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted.

[0164] Alternatively, if the total resource amount of the hardware chip is less than the hardware resource amount and the reason for the simulation failure is a specified reason, the specified reason is fed back to the control device, so that the control device displays a prompt message including the specified reason to the user. If an instruction to abandon the simulation configuration data is subsequently received from the control device, the simulation configuration data is deleted.

[0165] After the specified reason is displayed to the user, the user can determine whether to release some of the resources occupied by the hardware chip based on the specified reason, thereby deciding subsequent operations on this part of the simulation configuration data. If the user determines that there are no resources to be released, the control device can be triggered to send an instruction to the network device to abandon the simulation configuration data.

[0166] The specified reason includes at least one of the following:

[0167] 1. The specified type of simulation configuration data is re-issued.

[0168] As an example, the specified type of simulation configuration data can be ACL configuration data. For example, if the matching dimension in the ACL currently stored in the hardware chip does not include the source IP address, the specified type of simulation configuration data is to add the matching dimension of the source IP address to the ACL. If this specified type of simulation configuration data is sent to the hardware chip, it will cause each rule in the ACL to increase the bit width occupied by the IP address dimension, resulting in the bit width length of the ACL and the occupied hardware resources to increase exponentially, which may cause the simulation to fail.

[0169] 2. The hardware resources of the virtual space to which the simulation space belongs are occupied by other virtual spaces.

[0170] Among them, the network device in the embodiment of the present application may include multiple virtual spaces, each virtual space includes real space and simulation space, and multiple virtual spaces share the hardware resources of the hardware chip. If the resources of this virtual space are preempted by other virtual spaces, it may cause simulation failure.

[0171] In addition, if the resources of the required space are occupied by other virtual spaces, the control device can display the reason, and the user can negotiate with the users operating other virtual spaces to allow other virtual spaces to release some hardware resources.

[0172] 3. The hardware resources of the hardware chip are preempted by the dynamic data generated by the network equipment.

[0173] Among them, the network equipment may generate dynamic data during the simulation process, and the dynamic data will occupy the hardware resources of the hardware chip, which may cause insufficient hardware resources of the hardware chip and thus simulation failure.

[0174] 4. The hardware resources of the hardware chip are preempted by the forced simulation configuration data.

[0175] Among them, the network device will first send the mandatory configuration data to the real space, and then synchronize it to the simulation space. That is, when the network device is simulating, the mandatory configuration data has occupied the hardware resources of the hardware chip, which may cause insufficient hardware resources of the hardware chip and then simulation failure.

[0176] 5. The hardware resources of the hardware chip are occupied by configuration data that does not support the simulation function.

[0177] Among them, the network device will directly send the configuration data that does not support the simulation function to the real space, that is, the configuration data that does not support the simulation function will also occupy the hardware resources of the hardware chip, which may cause insufficient hardware resources of the hardware chip and then the simulation fails.

[0178] For ease of understanding, the impact of various data involved in the embodiments of this application on the real space and the simulated space is introduced. Figure 4 As shown, the configuration data involved in the embodiment of the present application includes: configuration data that does not support simulation function, simulation configuration data that is forced to take effect, simulation configuration data and real configuration data.

[0179] in, Figure 4 The configuration data, operation data, and forced simulation configuration data that do not support simulation functions will be directly sent to the real space of the business module. The business module will further send this data to the hardware driver, and then the hardware driver will send it to the hardware chip.

[0180] Figure 4 The simulation configuration data and real configuration data shown in the figure will both be sent to the simulation space of the business module, wherein the simulation configuration data is sent by the control device, and the real configuration data is synchronized from the real space to the simulation space by the business module.

[0181] Configuration data that does not support simulation functions, operation data, and forced simulation configuration data are all real data and will be sent to the real space of the business module and also to the hardware driver. The hardware driver will further send these real data to the hardware chip, causing these real data to occupy hardware resources.

[0182] In addition, the simulation configuration data and the real configuration data in the simulation space of the business module will be sent to the simulation space of the hardware driver. The simulation configuration data and the real configuration data are both simulation data in the simulation space.

[0183] The hardware driver can use real configuration data, running data, forced simulation configuration data, and configuration data that does not support simulation functions as simulation baseline configuration data, and perform hardware resource calculation after receiving the simulation configuration data. Hardware resource calculation refers to calling the detection capability of the hardware chip to detect the hardware resources occupied by simulation baseline configuration data, simulation configuration data, and preset type data. Preset type data includes Figure 4 Configuration data that does not support simulation function, running data and simulation configuration data that is forced to take effect.

[0184] Using this method, during the simulation process, it is also supported to allow immediately effective data to skip the simulation stage and take effect immediately in the real space. This can reduce the impact of the simulation process on real business, and enable hardware resources to be updated in a timely manner, thereby improving the accuracy of subsequent simulation verification.

[0185] It should be noted that the embodiments of the present application can support single-user simulation and multi-user simulation. In the embodiments of the present application, single-user simulation is used as an example. Single-user simulation refers to building a simulation space in a network device to perform hardware resource simulation verification.

[0186] Multi-user simulation involves building multiple simulation spaces within a single network device. For example, user 1 can build simulation space 1 within the network device and perform hardware resource simulation verification on the desired simulation configuration data. User 2 can build simulation space 2 within the network device and perform hardware resource verification on the desired simulation configuration data. It should be noted that the simulation baseline configuration data within each simulation space always remains consistent with the actual configuration data in effect within the real space.

[0187] In the embodiments of the present application, the network device has an emulation mode and an immediate-effect mode. In emulation mode, the emulation states include the following six: emulation start state, emulation commit state, emulation effective state, emulation effective fallback state, emulation abandon state, and emulation end state. When the network device exits emulation mode, it automatically enters immediate-effect mode.

[0188] The switching between the above simulation states can be triggered by the user through the control device, as an example, Figure 5 As shown in the figure, the switching process between simulation states includes the following steps:

[0189] Step 1: The control device sends a command to enter the simulation mode to the configuration management module.

[0190] The user can trigger the control device to send an instruction to enter the simulation mode to the configuration management module of the network device.

[0191] Upon receiving the instruction to enter simulation mode, the configuration management module sets the simulation state to the simulation start state and generates simulation baseline configuration data based on the real configuration data in the current real space. Furthermore, the configuration management module can send the real configuration data to the business module. Alternatively, the configuration management module can directly transmit the real configuration data to the business module, or the configuration management module can trigger the business module to actively obtain the real configuration data.

[0192] The business module can use the real configuration data as the simulation benchmark configuration data and transmit the real configuration data to the hardware driver, or trigger the hardware driver to actively obtain the real configuration data.

[0193] The hardware driver may use the real configuration data as the simulation benchmark configuration data, and store the simulation benchmark configuration data in the simulation space.

[0194] Step 2: The control device sends the simulation configuration data to the configuration management module. The data status of the simulation configuration data is the simulation submission status.

[0195] The user can trigger the control device to send simulation configuration data to the configuration management module of the network device.

[0196] After receiving the simulation configuration data, the configuration management module sets the simulation state of the network device to the simulation submission state, and then sends the simulation configuration data to the business module.

[0197] The business module can operate the simulation configuration data and send the simulation configuration data to the hardware driver.

[0198] The hardware driver can perform hardware resource calculations. After completing the hardware resource calculations, it can feed back the hardware resource calculation results to the configuration management module. The configuration management module can feed back the hardware resource calculation results to the control device, and then the user can view the hardware resource calculation results through the control device.

[0199] The hardware resource calculation result may include the result of simulation success or simulation failure, and optionally, may also include simulation benchmark configuration data, simulation configuration data, and the amount of hardware resources occupied by preset type data calculated by the hardware chip.

[0200] Step 3: The control device sends a simulation validation instruction to the configuration management module.

[0201] Among them, after the user knows through the control device that the resources of the hardware chip are sufficient, the user can trigger the control device to send a simulation validation instruction to the configuration management module.

[0202] After receiving the simulation validation instruction, the configuration management module sets the simulation state to the simulation validation state and sends the simulation configuration data to the real space.

[0203] In addition, both the business module and the hardware driver need to operate the simulation configuration data in the real space. The hardware driver needs to convert the simulation configuration data into a format that can be recognized by the hardware chip and send it to the hardware chip.

[0204] In addition, after the simulation is successful, the business module and hardware driver will send a notification message indicating that the simulation is successful to the configuration management module, and then the configuration management module will send a notification message indicating that the simulation is successful to the control device, and the user will know that the simulation is successful through the control device.

[0205] The configuration management module will update the simulation benchmark configuration data. The updated simulation benchmark configuration data includes the original simulation benchmark configuration data and the simulation configuration data effective for this simulation. Similarly, the business module and hardware driver also update the simulation benchmark configuration data in their own simulation space.

[0206] Step 4: The control device sends an exit simulation mode instruction to the configuration management module.

[0207] The user can trigger the control device to send an exit simulation mode instruction to the configuration management module.

[0208] After receiving the instruction to exit the simulation mode, the configuration management module sets the simulation state to the simulation end state and then deletes all data in the simulation space.

[0209] The configuration management module can also notify the business module and the hardware driver to delete all data in the simulation space. Optionally, the configuration management module can notify the business module and the hardware driver to delete all simulation benchmark configuration data and simulation configuration data, or can issue deletion instructions one by one, each deletion instruction being used to instruct the deletion of one simulation benchmark configuration data or simulation configuration data.

[0210] Step 5: The control device continues to send simulation configuration data to the configuration management module.

[0211] Step 5 can be executed after step 3, that is, after the user knows that the simulation has taken effect successfully, the user can continue to trigger the control device to send new simulation configuration data to the configuration management module, that is, the network device continues to perform simulation verification operations on the new simulation configuration data. The process of simulation verification of the new simulation configuration data is the same as step 2 and will not be repeated here.

[0212] Step 6: If the simulation fails to take effect, the network device performs simulation rollback.

[0213] Step 6 can be executed when the simulation state is the simulation effective state. When the network device simulation fails to take effect, the simulation effectiveness rollback can be actively performed.

[0214] After receiving the notification of the failure of the simulation to take effect, the configuration management module sets the simulation state to the simulation to take effect rollback state.

[0215] The business module can restore the real configuration data in the real space to the state before the simulation takes effect, and roll back the simulation configuration data in the simulation space to the state before the simulation configuration data is issued.

[0216] The hardware driver also needs to restore the real configuration data in the real space to the state before the simulation takes effect, and roll back the simulation configuration data in the simulation space to the state before the simulation configuration data is sent.

[0217] Step 7: The control device sends the simulation configuration data to the configuration management module.

[0218] After the simulation rollback in step 6 is completed, the user can continue to trigger the control device to send new simulation configuration data to the configuration management module. The process of simulation verification of the new simulation configuration data is the same as step 2 and will not be repeated here.

[0219] Step 8: The control device sends an exit simulation instruction to the configuration management module.

[0220] After the simulation rollback in step 6 is completed, the user may also trigger the control device to send an exit simulation mode instruction to the configuration management module.

[0221] The processing method of the configuration management module after receiving the exit simulation instruction can be referred to step 4 and will not be repeated here.

[0222] Step 9: The control device sends a simulation abandonment instruction to the configuration management module.

[0223] When the simulation state is the simulation submission state, the control device may send a simulation abandonment instruction to the configuration management module.

[0224] After receiving the simulation abandonment instruction, the configuration management module sets the simulation state to the simulation abandonment state.

[0225] The business module and hardware driver can roll back the simulation configuration data in the simulation space to the state before the simulation configuration data of this batch is issued.

[0226] Step 10: The control device sends simulation configuration data to the configuration management module.

[0227] After the network device executes step 9, the user can continue to trigger the control device to send simulation configuration data to the configuration management module. The process of simulation verification of the new simulation configuration data is the same as step 2 and will not be repeated here.

[0228] Step 11: The control device sends an instruction to exit the simulation mode to the configuration management module.

[0229] After the network device executes step 9, the user can trigger the control device to send an exit simulation mode instruction to the configuration management module. The processing method of the exit simulation mode instruction can refer to step 4 and will not be repeated here.

[0230] Step 12: The control device sends an instruction to exit the simulation mode to the configuration management module.

[0231] When the simulation state of the network device is in the simulation start state, the user can also trigger the control device to send an exit simulation mode instruction to the configuration management module. The processing method for the exit simulation mode instruction can refer to step 4 and will not be repeated here.

[0232] Step 13: The network device enters the immediate effect mode.

[0233] After the network device exits the emulation mode, all emulation states are cleared and the device automatically enters the immediate effect mode.

[0234] In addition, the business module and hardware driver can send the immediately effective data received subsequently to the real space.

[0235] Step 14: The network device fails to enter the emulation mode.

[0236] After step 2, the network device may fail to enter simulation mode due to insufficient memory resources or other reasons. In this case, the configuration management module can delete the real configuration data synchronized to the simulation space. Accordingly, the business module deletes the simulation baseline configuration data in the simulation space. The hardware driver also deletes the simulation baseline configuration data in the simulation space.

[0237] Step 15: The control device sends an instruction to exit the simulation mode to the configuration management module.

[0238] Among them, when the user is performing simulation verification, he can actively trigger the control device to send an exit simulation mode instruction to the configuration management module, or the configuration management module can also exit the simulation mode if no user operation on the simulation space is received within a specified time.

[0239] For the method of exiting the simulation mode, please refer to step 4 above, which will not be repeated here.

[0240] The following uses an example to illustrate data changes in various simulation states. Before the network device enters the simulation start state, the configuration data in the real space of the network device includes: real configuration data A, real configuration data B, and real configuration data C.

[0241] The simulation start state is triggered by the user. When the network device is in the simulation start state, it backs up the real configuration data A, real configuration data B, and real configuration data C, generates simulation baseline configuration data A1, simulation baseline configuration data B1, and simulation baseline configuration data C1, and stores simulation baseline configuration data A1, simulation baseline configuration data B1, and simulation baseline configuration data C1 in its own simulation space. While in the simulation start state, the network device is in a blocked state, and no other user operations are allowed.

[0242] The user can send simulation configuration data D1, simulation configuration data E1 and simulation configuration data F1 to the network device through the control device. At this time, the simulation state of the network device changes to the simulation submission state, and the network device can store the simulation configuration data D1, simulation configuration data E1 and simulation configuration data F1 in its own simulation space.

[0243] In addition, the user can also trigger the control device to send an instruction to delete the simulation benchmark configuration data C1 to the network device, and then the network device deletes the benchmark configuration data C1 in the simulation space. Then, the network device can perform hardware resource simulation verification on the received simulation configuration data.

[0244] If the hardware resource simulation verification succeeds, the user can trigger the control device to send a simulation validation command to the network device, causing the network device to enter the simulation validation state. The network device then sends the simulation configuration data D1, E1, and F1 to the real space as the real configuration data D, E, and F in the real space, and deletes the real configuration data C in the real space. While the network device is in the simulation validation state, it is blocked, and the user is not allowed to perform other operations.

[0245] If the simulation fails, the network device can automatically enter the simulation fallback state, restoring the real configuration data in the real space to the state before the simulation took effect. While in the simulation fallback state, the network device is blocked, and no other operations are allowed.

[0246] If the user actively abandons the current simulation operation but does not exit the simulation mode, the network device switches back to the simulation start state, deletes the simulation benchmark configuration data A1, simulation benchmark configuration data B1, simulation configuration data D1, simulation configuration data E1, and simulation configuration data F1 in its own simulation space, and regenerates simulation benchmark configuration data A1, simulation benchmark configuration data B1, and simulation benchmark configuration data C1 in the simulation space. At this point, the network device is in a blocked state, and the user is not allowed to perform other operations.

[0247] In addition, if the network device receives the immediately effective data, it will send the immediately effective data to the real space.

[0248] For example, if the network device receives immediately effective data X, which is simulation configuration data that needs to take effect immediately, the network device can send X to the real space and send X to the hardware-driven simulation space to obtain X1.

[0249] If dynamic data Y is generated in the network device and configuration data Z that does not support the simulation function is received from the control device, Y and Z are sent to the real space, and Y and Z are sent to the simulation space driven by the hardware to obtain Y1 and Z1.

[0250] The simulation end state can be triggered by the user, or the network device can exit simulation mode after receiving no user operations within the simulation space for a specified period of time. When the network device is in the simulation end state, it deletes all data in the simulation space, namely, simulation baseline configuration data A1, simulation baseline configuration data B1, simulation baseline configuration data C1, simulation configuration data D1, simulation configuration data E1, simulation configuration data F1, as well as X1, Y1, and Z1. When the network device is in the simulation end state, it is blocked and does not allow other user operations.

[0251] In the above example, the configuration data in the real space includes A, B, and C. The simulation configuration data subsequently issued includes D, E, F, and C is deleted. The immediately effective data issued during the simulation includes X, Y, and Z, where X is the simulation data that is forced to take effect.

[0252] In the simulation stage,

[0253] The business module simulation space includes: A1, B1, D1, E1, F1, X1

[0254] The real space of the business module includes: A, B, C, X, Y, Z

[0255] The hardware-driven simulation space includes: A1, B1, D1, E1, F1, X1, Y1, Z1

[0256] The hardware-driven real space includes: A, B, C, X, Y, Z.

[0257] In addition, for different application scenarios, the present application embodiment provides different simulation processes. Figure 6 As shown, Figure 6 A schematic diagram of a single device simulation process provided in an embodiment of the present application may include the following steps:

[0258] S601: Control a device to cache simulation configuration data.

[0259] The control device can cache the simulation configuration data newly arranged by the user.

[0260] S602: The network device enters the simulation start state.

[0261] After the network device enters the simulation start state, the real configuration data in the real space is synchronized to the simulation space as the simulation benchmark configuration data.

[0262] S603: The network device performs simulation submission.

[0263] Among them, the user can trigger the control device to send simulation configuration data to the network device. After receiving the simulation configuration data, the network device enters the simulation submission state and then sends the simulation configuration data to the simulation space of the network device.

[0264] S604: The network device determines whether the simulation is successful.

[0265] The network device obtains the simulation benchmark configuration data and the hardware resource amount occupied by the simulation configuration data calculated by the hardware chip. If the hardware resource amount is less than the total resource amount of the hardware chip, the simulation is determined to be successful and S605 is executed. Otherwise, S606 is executed.

[0266] S605: The network device is submitted for validation. After S605, S607 is executed.

[0267] The control device sends a simulation validation instruction to the network device, and then the network device sends the simulation configuration data to the real space.

[0268] S606: The network device performs simulation rollback.

[0269] If, in S604, the network device determines that the simulation is unsuccessful, the simulation configuration data in the simulation space is deleted and the simulation mode is exited.

[0270] S607: The network device determines whether the simulation is successful.

[0271] If unsuccessful, execute S608; if successful, the network device exits the simulation mode.

[0272] S608: The network device performs rollback.

[0273] If the network device determines that the simulation is unsuccessful, the network device enters the simulation rollback state, restores the real configuration data in the real space to the state before the simulation takes effect, and exits the simulation mode.

[0274] In the above process, the embodiment of the present application packages S602-S608 within the box into a transaction operation. The result of this transaction operation is either a simulation success or a simulation failure, with no intermediate state. In addition, the user is not aware of the entire simulation process. The network device only notifies the user of the success or failure of the simulation through the control device. If the simulation fails, the network device also notifies the user of the reason for the failure. Then, when the user triggers the control device to send the next batch of simulation configuration data, the network device re-executes the above process.

[0275] By adopting this method, the simulation mode can be exited in time after the simulation is completed, thus preventing the simulation space from occupying memory resources for a long time.

[0276] However, when the amount of real configuration data in the real space is large, if the simulation is performed through the above simulation process, the network device will take a long time to generate the simulation benchmark configuration data and send the simulation benchmark configuration data to the simulation space, and the user will noticeably feel the lag. Therefore, in order to solve this problem, Figure 7 As shown, Figure 7 Another flow chart of single-device simulation provided in an embodiment of the present application may include the following steps: S701-S709.

[0277] S701: The network device enters the simulation start state.

[0278] S702: Control the device to cache simulation configuration data.

[0279] S703: The network device performs simulation submission.

[0280] S704: The network device determines whether the simulation is successful.

[0281] If the network device determines that the simulation is successful, S705 is executed; otherwise, S706 is executed.

[0282] S705: Network equipment is submitted for validation.

[0283] S706: The network device performs simulation rollback.

[0284] S707: The network device determines whether the simulation is successful.

[0285] If the network device determines that the simulation is successful, step S709 is executed; otherwise, step S708 is executed.

[0286] S708: The network device performs rollback.

[0287] The implementation of the above S701-S708 can refer to Figure 6 S601-S608 in the description will not be described here.

[0288] S709: The network device ends this transaction.

[0289] In this embodiment, steps S703-S709 are packaged as a transaction. Regardless of whether the transaction is successful, the network device can choose to exit the simulation mode or return to S702 to perform the next simulation. Therefore, through this simulation process, the network device can perform multiple simulation operations between the simulation start state and the simulation exit state.

[0290] In addition, with Figure 6 Compared with the embodiment shown, the simulation process provided in the embodiment of the present application removes the process of the network device entering the simulation start state from the transaction operation as the first step of the entire simulation process, that is, the network device does not need to generate simulation benchmark configuration data in the simulation process of the transaction operation and send the simulation benchmark configuration data to the simulation space, so the user will not obviously feel the lag.

[0291] like Figure 8 As shown, Figure 8 A schematic diagram of a whole network simulation process provided in an embodiment of the present application can divide the whole network into a design state network and a production state network. Figure 8 , a production network is shown in FIG. 8 , and the process may include the following steps: S801 - S808 .

[0292] S801. Control a device to cache simulation configuration data.

[0293] The user can cache the simulation configuration data in the control device.

[0294] S802: The entire network simulation starts.

[0295] When the user triggers the entire network to enter the simulation mode, all network devices in the entire network enter the simulation mode.

[0296] S803: The network device performs simulation submission.

[0297] in, Figure 8 The network device 1, the network device 2 and the network device 3 are shown as examples. In actual implementation, the number of network devices in the entire network is not limited to this. The network device 1, the network device 2 and the network device 3 are all subjected to simulation submission.

[0298] The control device can simulate the configuration of each network device in the design network, sending the simulated configuration data to the design network and then synchronizing the simulated configuration data to the production network in real time. However, the simulated configuration data can only be synchronized to the simulation space of each network device in the production network and is temporarily inactive in the production network.

[0299] S804: The network device determines whether the simulation is successful.

[0300] Among them, each network device determines whether the simulation is successful. The network devices in the design state network simulate the connectivity test and superposition impact of the design state network. The network devices in the production state network are used to verify whether the hardware resources of the network devices are sufficient, that is, hardware resource simulation verification is performed according to the method provided in the above embodiment.

[0301] If the simulation of each network device is successful, execute S805; otherwise, execute S806.

[0302] S805: Submit for network-wide effectiveness.

[0303] If the user knows that the simulation of each network device in the entire network is successful, the user triggers the instruction of the entire network to take effect through the control device. After S805, S808 is executed.

[0304] S806: The network device performs simulation rollback.

[0305] If a network device fails in simulation in the entire network, the network device that fails in simulation will perform simulation rollback. The simulation rollback method can refer to the processing method of the network device after the simulation failure introduced in the above embodiment.

[0306] S807: The entire network performs simulation cancellation.

[0307] If the user triggers the instruction to cancel the simulation of the entire network through the control device, all network devices in the entire network will delete the simulation configuration data and simulation baseline configuration data in their own simulation space and exit the simulation mode.

[0308] S808. Submit the network device to take effect.

[0309] Among them, each network device in the entire network performs effective submission, that is, each network device sends the simulation configuration data to its own real space.

[0310] S809: The network device determines whether the validation submission is successful.

[0311] Among them, the network devices in the design state network and the network devices in the production state both determine whether the simulation is successful. If the simulation is successful for each network device, it means that the simulation is successful, and all network devices in the entire network exit the simulation mode. Otherwise, execute S810.

[0312] S810: The network device performs rollback.

[0313] Among them, if a network device in the entire network fails to take effect in the simulation, the network device will restore the real configuration data in the real space to the state before the simulation takes effect, and restore the simulation configuration data in the simulation space to the state before the batch of simulation configuration data is issued.

[0314] S811: Roll back the configuration of the entire network.

[0315] If the user triggers a network-wide configuration rollback command through the control device, all network devices in the entire network will restore the real configuration data in the real space to the state before the simulation takes effect, delete all data in the simulation space, and then all network devices in the entire network will exit the simulation mode.

[0316] From the above process, it can be seen that only when all network devices in the entire network are successfully simulated can the validation be submitted. When all network devices in the entire network are successfully simulated and validated, the simulation is successful, thus improving the accuracy of the simulation verification.

[0317] In addition, during the simulation process, when the simulation of some network devices in the entire network fails, the simulation failure result can be notified to the user, and then the user can decide whether to roll back the simulation configuration of the entire network or accept the simulation failure of some network devices and continue to take effect and submit.

[0318] It should be noted that some network devices may contain data that is not suitable for simulation verification. For this type of data, simulation verification is not required. The following describes each of these data types:

[0319] (1) A small number of key business data that occupy a fixed amount of resources

[0320] For example, ACL and redirection resources, which match and forward packets based on protocol numbers, occupy a fixed and relatively small amount of resources, and different service modules can share this type of data. Hardware chip resources can be pre-occupied after network device startup, directly deducted from the total hardware chip resources and excluded from subsequent resource comparisons.

[0321] (2) Resources that change frequently

[0322] For example, memory resources change frequently, and the simulation space itself occupies a large amount of memory. If the occupied memory resources are verified, it is easy for the simulation verification result to be successful, but when it actually takes effect, there is a high probability of failure, resulting in the failure of the simulation verification function.

[0323] For this type of resources, a macro-evaluation can be conducted from an empirical perspective, but it is not suitable for simulation verification.

[0324] (3) Business data generated by message triggering

[0325] For example, when migrating a virtual machine, the network device automatically generates a filtering ACL after receiving the user's message to allow subsequent messages from the user to pass.

[0326] If this type of filtering ACL is simulated and verified instead of being directly effective, the migrated virtual machines will be unable to go online and access the network normally, resulting in a poor user experience.

[0327] Therefore, for this type of resources, no simulation verification is required and they can be directly sent to the real space for immediate effect.

[0328] (4) In the scenario where multiple devices are simulated simultaneously, the business configuration of multiple devices needs to cooperate with each other to determine the resource usage.

[0329] For example, the next hop of PBR (Policy Based Route) occupies corresponding device resources if the route is reachable; if the route is unreachable, no device resources are required.

[0330] However, if the PBR next hop is an emulated configuration on the peer device, the route will be unreachable for the PBR-configured network device. If PBR is not included in resource calculations during the emulation process, PBR may fail to allocate resources when both network devices are enabled. This can lead to a failure in PBR-based routing and service interruption. If the peer device advertises the emulated PBR next hop route, it will impact service traffic across the entire network.

[0331] Therefore, this type of service configuration occupies device resources by default during simulation, that is, the simulation is successful by default. Generally, this type of service configuration occupies fewer resources, and the simulation data may be inaccurate due to the device resources occupied by this type of service configuration.

[0332] Based on the same inventive concept, the embodiment of the present application also provides a hardware resource simulation verification device, which is applied to network equipment, such as Figure 9 As shown, the device includes:

[0333] Synchronization module 901, used to synchronize the real configuration data of the network device to the simulation space when entering the simulation mode, and use the real configuration data as the simulation reference configuration data;

[0334] The sending module 902 is used to send simulation configuration data to the simulation space in the simulation mode, and the simulation space occupies the memory resources of the network device;

[0335] An acquisition module 903 is configured to send simulation benchmark configuration data, simulation configuration data, and preset type data to the detection interface of the hardware chip, and obtain the amount of hardware resources occupied by the simulation benchmark configuration data, simulation configuration data, and preset type data calculated by the hardware chip, where the preset type data is data that has occupied the resources of the hardware chip in addition to the actual configuration data;

[0336] The determination module 904 is configured to determine that the simulation is successful if the total resource amount of the hardware chip is greater than the hardware resource amount.

[0337] Optionally, the device further includes:

[0338] A feedback module, used to feed back the successful simulation result to the control device;

[0339] The sending module 902 is further configured to send the simulation configuration data to the real space of the network device upon receiving a simulation validation instruction sent by the control device.

[0340] Optionally, the device further includes:

[0341] The updating module is configured to update the simulation benchmark configuration data based on the simulation configuration data if the simulation configuration data is successfully sent to the real space of the network device.

[0342] Optionally, the device further includes:

[0343] The deleting module is configured to delete the simulation configuration data in the simulation space if an instruction to abandon the simulation configuration data is received from the control device.

[0344] Optionally, the device further includes:

[0345] A receiving module, configured to receive immediately effective data sent by a control device, wherein the immediately effective data is simulation configuration data that is mandatory and specified by the user or configuration data that does not support the simulation function;

[0346] The sending module 902 is further configured to send the immediately effective data to the real space of the network device.

[0347] Optionally, the device further includes:

[0348] The exit module is used to exit the simulation mode and delete the simulation benchmark configuration data and simulation configuration data in the simulation space if a simulation end instruction sent by the control device is received or no user operation on the simulation space is received within a specified time.

[0349] Optionally, the sending module 902 is specifically configured to:

[0350] Each time simulation configuration data is received, the simulation configuration data is sent to the simulation space; or,

[0351] Each time simulation configuration data is received, the received simulation configuration data is cached;

[0352] When receiving the simulation submission instruction sent by the control device, the cached simulation configuration data is sent to the simulation space.

[0353] Optionally, the device further includes:

[0354] Simulation failure processing module, used to:

[0355] If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or,

[0356] If the total amount of resources of the hardware chip is less than the amount of hardware resources, and the reason for the simulation failure is a specified reason, the specified reason is fed back to the control device so that the control device displays a prompt message including the specified reason to the user; the specified reason includes at least one of the following: the specified type of simulation configuration data is re-issued, the hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, the hardware resources of the hardware chip are preempted by dynamic data generated by the network device, the hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and the hardware resources of the hardware chip are preempted by configuration data that does not support the simulation function;

[0357] If an instruction to abandon the simulation configuration data is received from the control device, the simulation configuration data is deleted.

[0358] The embodiment of the present application also provides a network device, such as Figure 10 As shown, the network device includes:

[0359] Processor 1001;

[0360] transceiver 1004;

[0361] A machine-readable storage medium 1002 stores machine-executable instructions that can be executed by the processor 1001; the machine-executable instructions prompt the processor 1001 to perform the following steps:

[0362] When entering the simulation mode, the real configuration data of the network device is synchronized to the simulation space and the real configuration data is used as the simulation benchmark configuration data;

[0363] In simulation mode, simulation configuration data is sent to the simulation space, and the simulation space occupies the memory resources of the network device;

[0364] Sending simulation benchmark configuration data, simulation configuration data, and preset type data to the detection interface of the hardware chip to obtain the amount of hardware resources occupied by the simulation benchmark configuration data, simulation configuration data, and preset type data calculated by the hardware chip, where the preset type data is data that has occupied the resources of the hardware chip in addition to the actual configuration data;

[0365] If the total resource amount of the hardware chip is greater than the hardware resource amount, the simulation is determined to be successful.

[0366] Optionally, the machine executable instructions further cause the processor 1001 to perform the following steps:

[0367] Feedback of the simulation success result to the control device via the transceiver 1004;

[0368] If the simulation validation instruction sent by the control device is received through the transceiver 1004, the simulation configuration data is sent to the real space of the network device.

[0369] Optionally, the machine executable instructions further cause the processor 1001 to perform the following steps:

[0370] If the simulation configuration data is successfully sent to the real space of the network device, the simulation baseline configuration data is updated based on the simulation configuration data.

[0371] Optionally, the machine executable instructions further cause the processor 1001 to perform the following steps:

[0372] If the instruction to abandon the simulation configuration data sent by the control device is received through the transceiver 1004, the simulation configuration data in the simulation space is deleted.

[0373] Optionally, the machine executable instructions further cause the processor 1001 to perform the following steps:

[0374] Receiving immediately effective data sent by the control device through the transceiver 1004, the immediately effective data being simulation configuration data specified by the user to be forcibly effective or configuration data that does not support the simulation function;

[0375] Send the immediately effective data to the real space of the network device.

[0376] Optionally, the machine executable instructions further cause the processor 1001 to perform the following steps:

[0377] If a simulation end instruction is received from the control device through the transceiver 1004, or if no user operation on the simulation space is received within a specified time period, the simulation mode is exited and the simulation benchmark configuration data and simulation configuration data in the simulation space are deleted.

[0378] Optionally, the machine executable instructions further cause the processor 1001 to perform the following steps:

[0379] Each time the transceiver 1004 receives simulation configuration data, the simulation configuration data is sent to the simulation space; or,

[0380] Each time simulation configuration data is received through the transceiver 1004, the received simulation configuration data is cached;

[0381] When the simulation submission instruction sent by the control device is received through the transceiver 1004, the cached simulation configuration data is sent to the simulation space.

[0382] Optionally, the machine executable instructions further cause the processor 1001 to perform the following steps:

[0383] If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or,

[0384] If the total amount of resources of the hardware chip is less than the amount of hardware resources, and the reason for the simulation failure is a specified reason, the specified reason is fed back to the control device so that the control device displays a prompt message including the specified reason to the user; the specified reason includes at least one of the following: the specified type of simulation configuration data is re-issued, the hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, the hardware resources of the hardware chip are preempted by dynamic data generated by the network device, the hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and the hardware resources of the hardware chip are preempted by configuration data that does not support the simulation function;

[0385] If the instruction to abandon the simulation configuration data sent by the control device is received through the transceiver 1004, the simulation configuration data is deleted.

[0386] like Figure 10As shown, the network device may further include a communication bus 1003. The processor 1001, the machine-readable storage medium 1002, and the transceiver 1004 communicate with each other via the communication bus 1003. The communication bus 1003 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1003 may be divided into an address bus, a data bus, a control bus, and the like.

[0387] The transceiver 1004 may be a wireless communication module. Under the control of the processor 1001 , the transceiver 1004 exchanges data with other devices.

[0388] The machine-readable storage medium 1002 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the machine-readable storage medium 1002 may be at least one storage device located remote from the processor.

[0389] Processor 1001 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0390] Based on the same inventive concept, in accordance with the hardware resource simulation and verification method provided in the above embodiments of the present application, the present embodiment further provides a machine-readable storage medium storing machine-executable instructions that can be executed by a processor. The processor is prompted by the machine-executable instructions to implement any of the steps of the above hardware resource simulation and verification method.

[0391] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any one of the hardware resource simulation verification methods in the above embodiments.

[0392] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0393] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A hardware resource simulation verification method, characterized in that: Applied to a network device, the method includes: When entering the simulation mode, synchronizing the real configuration data of the network device to the simulation space, and using the real configuration data as the simulation reference configuration data; In simulation mode, simulation configuration data is sent to the simulation space, and the simulation space occupies memory resources of the network device; Sending the simulation benchmark configuration data, the simulation configuration data, and the preset type data to the detection interface of the hardware chip, and obtaining the amount of hardware resources occupied by the simulation benchmark configuration data, the simulation configuration data, and the preset type data calculated by the hardware chip, where the preset type data is data that has occupied resources of the hardware chip in addition to the real configuration data; If the total resource amount of the hardware chip is greater than the hardware resource amount, it is determined that the simulation is successful.

2. The method according to claim 1, characterized in that After determining that the simulation is successful, the method further includes: Feedback the successful simulation results to the control device; If the simulation validation instruction sent by the control device is received, the simulation configuration data is sent to the real space of the network device.

3. The method according to claim 2, characterized in that After sending the simulation configuration data to the real space of the network device, the method further includes: If the simulation configuration data is successfully sent to the real space of the network device, the simulation benchmark configuration data is updated based on the simulation configuration data.

4. The method according to claim 1, wherein After sending the simulation configuration data to the simulation space, the method further includes: If an instruction to abandon the simulation configuration data is received from a control device, the simulation configuration data in the simulation space is deleted.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Receiving immediately effective data sent by the control device, wherein the immediately effective data is simulation configuration data specified by the user to be forcibly effective or configuration data that does not support the simulation function; The immediately effective data is sent to the real space of the network device.

6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: If a simulation end instruction sent by a control device is received, or if no user operation on the simulation space is received within a specified time period, the simulation mode is exited and the simulation benchmark configuration data and the simulation configuration data in the simulation space are deleted.

7. The method according to claim 1, characterized in that Sending simulation configuration data to the simulation space includes: Each time simulation configuration data is received, the simulation configuration data is sent to the simulation space; or, Each time simulation configuration data is received, the received simulation configuration data is cached; When a simulation submission instruction sent by a control device is received, the cached simulation configuration data is sent to the simulation space.

8. The method according to claim 1, characterized in that After obtaining the simulation benchmark configuration data, the simulation configuration data, and the amount of hardware resources occupied by the preset type data calculated by the hardware chip, the method further includes: If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or, If the total resource amount of the hardware chip is less than the hardware resource amount, and the reason for the simulation failure is a specified reason, feeding back the specified reason to the control device so that the control device displays a prompt message including the specified reason to the user; The specified reason includes at least one of the following: simulation configuration data of a specified type is re-issued, hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, hardware resources of the hardware chip are preempted by dynamic data generated by the network device, hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and hardware resources of the hardware chip are preempted by configuration data that does not support simulation functions; If an instruction to abandon the simulation configuration data is received from the control device, the simulation configuration data is deleted.

9. A hardware resource simulation verification device, characterized in that: Applied to network equipment, the device includes: A synchronization module, configured to synchronize the real configuration data of the network device to the simulation space when entering the simulation mode, and use the real configuration data as the simulation reference configuration data; a sending module, configured to send simulation configuration data to the simulation space in simulation mode, wherein the simulation space occupies memory resources of the network device; an acquisition module, configured to send the simulation benchmark configuration data, the simulation configuration data, and preset type data to the detection interface of the hardware chip, and obtain the amount of hardware resources occupied by the simulation benchmark configuration data, the simulation configuration data, and the preset type data calculated by the hardware chip, where the preset type data is data that has occupied resources of the hardware chip in addition to the actual configuration data; The determination module is configured to determine that the simulation is successful if the total resource amount of the hardware chip is greater than the hardware resource amount.

10. The device according to claim 9, characterized in that The device further comprises: A feedback module, used to feed back the successful simulation result to the control device; The sending module is further configured to send the simulation configuration data to the real space of the network device upon receiving a simulation validation instruction sent by the control device.

11. The device according to claim 10, characterized in that The device further comprises: An updating module is configured to update the simulation benchmark configuration data based on the simulation configuration data if the simulation configuration data is successfully sent to the real space of the network device.

12. The device according to claim 9, characterized in that The device further comprises: The deleting module is configured to delete the simulation configuration data in the simulation space if an instruction to abandon the simulation configuration data is received from a control device.

13. The device according to any one of claims 9 to 12, characterized in that The device further comprises: A receiving module, configured to receive immediately effective data sent by a control device, wherein the immediately effective data is simulation configuration data that is forcibly effective as specified by a user or configuration data that does not support the simulation function; The sending module is further configured to send the immediately effective data to the real space of the network device.

14. The device according to any one of claims 9 to 12, characterized in that The device further comprises: The exit module is used to exit the simulation mode and delete the simulation benchmark configuration data and the simulation configuration data in the simulation space if a simulation end instruction sent by the control device is received or no user operation on the simulation space is received within a specified time period.

15. The device according to claim 9, characterized in that The sending module is specifically used to: Each time simulation configuration data is received, the simulation configuration data is sent to the simulation space; or, Each time simulation configuration data is received, the received simulation configuration data is cached; When a simulation submission instruction sent by a control device is received, the cached simulation configuration data is sent to the simulation space.

16. The device according to claim 9, characterized in that The device further comprises: Simulation failure processing module, used to: If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or, If the total resource amount of the hardware chip is less than the hardware resource amount, and the reason for the simulation failure is a specified reason, feeding back the specified reason to the control device so that the control device displays a prompt message including the specified reason to the user; The specified reason includes at least one of the following: simulation configuration data of a specified type is re-issued, hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, hardware resources of the hardware chip are preempted by dynamic data generated by the network device, hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and hardware resources of the hardware chip are preempted by configuration data that does not support simulation functions; If an instruction to abandon the simulation configuration data is received from the control device, the simulation configuration data is deleted.

17. A network device, characterized in that: The network equipment includes: processor; transceiver; A machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; the machine-executable instructions prompting the processor to perform the following steps: When entering the simulation mode, synchronizing the real configuration data of the network device to the simulation space, and using the real configuration data as the simulation reference configuration data; In simulation mode, simulation configuration data is sent to the simulation space, and the simulation space occupies memory resources of the network device; Sending the simulation benchmark configuration data, the simulation configuration data, and the preset type data to the detection interface of the hardware chip, and obtaining the amount of hardware resources occupied by the simulation benchmark configuration data, the simulation configuration data, and the preset type data calculated by the hardware chip, where the preset type data is data that has occupied resources of the hardware chip in addition to the real configuration data; If the total resource amount of the hardware chip is greater than the hardware resource amount, it is determined that the simulation is successful.

18. The network device according to claim 17, wherein: The machine executable instructions further cause the processor to perform the following steps: Feedback the successful simulation result to the control device via the transceiver; If the simulation validation instruction sent by the control device is received through the transceiver, the simulation configuration data is sent to the real space of the network device.

19. The network device according to claim 18, wherein: The machine executable instructions further cause the processor to perform the following steps: If the simulation configuration data is successfully sent to the real space of the network device, the simulation benchmark configuration data is updated based on the simulation configuration data.

20. The network device according to claim 17, wherein: The machine executable instructions further cause the processor to perform the following steps: If an instruction to abandon the simulation configuration data is received from a control device through the transceiver, the simulation configuration data in the simulation space is deleted.

21. The network device according to any one of claims 17 to 20, characterized in that: The machine executable instructions further cause the processor to perform the following steps: Receiving, through the transceiver, immediately effective data sent by the control device, wherein the immediately effective data is simulation configuration data that is forcibly effective as specified by the user or configuration data that does not support the simulation function; The immediately effective data is sent to the real space of the network device.

22. The network device according to any one of claims 17 to 20, characterized in that: The machine executable instructions further cause the processor to perform the following steps: If a simulation end instruction sent by a control device is received through the transceiver, or if no user operation on the simulation space is received within a specified time period, the simulation mode is exited and the simulation benchmark configuration data and the simulation configuration data in the simulation space are deleted.

23. The network device according to claim 17, wherein: The machine executable instructions further cause the processor to perform the following steps: Each time the transceiver receives simulation configuration data, the simulation configuration data is sent to the simulation space; or, Each time simulation configuration data is received through the transceiver, the received simulation configuration data is cached; When a simulation submission instruction sent by a control device is received through the transceiver, the cached simulation configuration data is sent to the simulation space.

24. The network device according to claim 17, wherein: The machine executable instructions further cause the processor to perform the following steps: If the total resource amount of the hardware chip is less than the hardware resource amount, a simulation failure log is generated and the simulation configuration data is deleted; or, If the total resource amount of the hardware chip is less than the hardware resource amount, and the reason for the simulation failure is a specified reason, feeding back the specified reason to the control device so that the control device displays a prompt message including the specified reason to the user; The specified reason includes at least one of the following: simulation configuration data of a specified type is re-issued, hardware resources of the virtual space to which the simulation space belongs are preempted by other virtual spaces, hardware resources of the hardware chip are preempted by dynamic data generated by the network device, hardware resources of the hardware chip are preempted by simulation configuration data that is forcibly effective, and hardware resources of the hardware chip are preempted by configuration data that does not support simulation functions; If an instruction to abandon the simulation configuration data is received from the control device through the transceiver, the simulation configuration data is deleted.

25. A machine-readable storage medium, characterized in that The method stores machine executable instructions, which, when called and executed by a processor, prompt the processor to implement the method steps described in any one of claims 1 to 8.

26. A computer program product, characterized in that The computer program product prompts the processor to implement the method steps described in any one of claims 1-8.

Citation Information

Patent Citations

  • Construction method of polymorphic analog simulation verification environment

    CN110705191A

  • Resource capacity determination method and device

    CN114070731A