Resource release method and device of network equipment, computer equipment and storage medium
By obtaining and resetting the configuration information of the gateway device and deleting the corresponding configuration information from the backbone network equipment, the problem of low resource release efficiency in traditional technology is solved, and asynchronous resource release between the gateway device and the backbone network equipment is realized. Improve the overall resource release efficiency.
Patent Information
- Application Number
- CN202411750961.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-01-07
AI Technical Summary
In software-defined wide area networks, the resource release efficiency of intelligent gateway and backbone network equipment in traditional technology is low, resulting in a long time to delete data resources.
By obtaining the configuration information of the gateway device, resetting the interface resources of the gateway device, and determining the backbone network configuration information corresponding to the gateway configuration from the backbone network device, deleting the backbone network configuration information in first-in, first-out order to realize the gateway device and backbone network Resources between devices are released asynchronously.
Improve resource release efficiency, ensure that resources between gateway equipment and backbone network equipment can be released in a timely manner, and avoid resource waste.
Smart Images

Figure CN119277547A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a method, device, computer equipment, storage medium and computer program product for releasing resources of a network device. Background Art
[0002] In software-defined wide area networks, smart gateways are used on the user side. Smart gateways and backbone network devices establish tunnels to open up traffic from the user side to the backbone network. When user services expire, the corresponding smart gateways need to be recycled, that is, the resources configured in the smart gateways and backbone network devices are released.
[0003] In traditional technologies, the data resources in the intelligent gateway and backbone network equipment are deleted synchronously, which results in long deletion time and low resource release efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a resource release method, device, computer device, computer-readable storage medium and computer program product for a network device that can improve resource release efficiency in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for releasing resources of a network device. The method comprises:
[0006] In response to a device recycling event for a gateway device, gateway configuration information of the gateway device is obtained; when a configuration information reset operation for the gateway device is completed, a first interface resource in a configuration state in the gateway device is released according to the gateway configuration information; backbone network configuration information corresponding to the gateway configuration information is determined from a backbone network device to which the gateway device is communicatively connected; the backbone network configuration information is deleted, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released.
[0007] In one of the embodiments, releasing the first interface resource in the configuration state in the gateway device according to the gateway configuration information includes: determining the interface state of each of the multiple gateway interfaces included in the gateway device according to the gateway configuration information; screening the target interface whose interface state is in the configuration state among the gateway interfaces; and releasing the first interface resource of the target interface.
[0008] In one of the embodiments, the backbone network configuration information includes multiple sub-configuration information; deleting the backbone network configuration information includes: obtaining a scheduling queue containing the operation functions of each of the sub-configuration information; taking out a target operation function at the head of the queue from the scheduling queue in a first-in-first-out order; calling the taken out target operation function to delete the target sub-configuration information corresponding to the target operation function; if the target sub-configuration information is successfully deleted, returning to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order until all the sub-configuration information have been deleted.
[0009] In one of the embodiments, the method further includes: in the event that the target sub-configuration information fails to be deleted, placing the target operation function at the head of the queue of the scheduling queue and adding a retry flag for the target operation function; returning to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order.
[0010] In one of the embodiments, the calling of the retrieved target operation function and the deleting of the target sub-configuration information corresponding to the target operation function include: when the retrieved target operation function carries a retry flag, obtaining the retry interval of the target operation function; calling the retrieved target operation function according to the retry interval and deleting the target sub-configuration information corresponding to the target operation function.
[0011] In one of the embodiments, the method further includes: determining multiple candidate devices that have a network mapping relationship with the gateway device; for each of the candidate devices, performing a communication test between the gateway device and the candidate device to obtain a communication test result of the candidate device; and determining the candidate device whose communication test result is normal as a backbone network device that is communicatively connected to the gateway device.
[0012] In one of the embodiments, the communication test between the gateway device and the candidate device is performed to obtain the communication test result of the candidate device, including: obtaining multiple continuous test time periods configured for each of the candidate devices; determining a test order for each of the test time periods; the duration of the test time period is inversely correlated with the test order; and according to each of the test orders, the communication test is performed on the candidate devices in turn to obtain the communication test result of the candidate device.
[0013] In a second aspect, the present application also provides a resource release device for a network device. The device comprises:
[0014] An information acquisition module is used to obtain gateway configuration information of the gateway device in response to a device recycling event for the gateway device; a first resource release module is used to release a first interface resource in a configuration state in the gateway device according to the gateway configuration information when a configuration information reset operation for the gateway device is completed; an information determination module is used to determine backbone network configuration information corresponding to the gateway configuration information from a backbone network device to which the gateway device is communicatively connected; and a second resource release module is used to delete the backbone network configuration information and release the backbone network resources configured by the backbone network configuration information in the backbone network device.
[0015] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0016] In response to a device recycling event for a gateway device, gateway configuration information of the gateway device is obtained; when a configuration information reset operation for the gateway device is completed, a first interface resource in a configuration state in the gateway device is released according to the gateway configuration information; backbone network configuration information corresponding to the gateway configuration information is determined from a backbone network device to which the gateway device is communicatively connected; the backbone network configuration information is deleted, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0018] In response to a device recycling event for a gateway device, gateway configuration information of the gateway device is obtained; when a configuration information reset operation for the gateway device is completed, a first interface resource in a configuration state in the gateway device is released according to the gateway configuration information; backbone network configuration information corresponding to the gateway configuration information is determined from a backbone network device to which the gateway device is communicatively connected; the backbone network configuration information is deleted, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released.
[0019] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0020] In response to a device recycling event for a gateway device, gateway configuration information of the gateway device is obtained; when a configuration information reset operation for the gateway device is completed, a first interface resource in a configuration state in the gateway device is released according to the gateway configuration information; backbone network configuration information corresponding to the gateway configuration information is determined from a backbone network device to which the gateway device is communicatively connected; the backbone network configuration information is deleted, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released.
[0021] The resource release method, device, computer device, storage medium and computer program product of the above network device obtain the gateway configuration information of the gateway device in response to the device recycling event for the gateway device, and release the first interface resource in the configuration state in the gateway device according to the gateway configuration information when the configuration information reset operation for the gateway device is completed, and the first interface resource in the gateway device is released in time without waiting for the resource release process of the backbone network device, thereby improving the overall resource release efficiency. From the backbone network device to which the gateway device is communicatively connected, the backbone network configuration information corresponding to the gateway configuration information is determined, and the backbone network configuration information is deleted by the above method, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released, so as to realize the asynchronous release of resources between the gateway device and the backbone network device, thereby improving the overall resource release efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] FIG1 is an application environment diagram of a method for releasing resources of a network device in one embodiment;
[0023] FIG2 is a schematic diagram of a flow chart of a method for releasing resources of a network device in one embodiment;
[0024] FIG3 is a schematic diagram of a flow chart of a method for recycling an SDWAN network device in one embodiment;
[0025] FIG4 is a schematic diagram of a process flow of a device recycling method in one embodiment;
[0026] FIG5 is a schematic diagram of the interaction between the scheduling module and the equipment recovery module in one embodiment;
[0027] FIG6 is a schematic diagram of a complete CPE device recycling process in one embodiment;
[0028] FIG7 is a structural block diagram of a resource release device of a network device in one embodiment;
[0029] FIG8 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] The resource release method of the network device provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. The terminal 102 communicates with the gateway device 104 and the backbone network device 106 through the network.
[0032] The terminal 102 may obtain the gateway configuration information of the gateway device 104 in response to the device recycling event for the gateway device 104. The terminal 102 may release the first interface resource in the configuration state in the gateway device 104 according to the gateway configuration information when completing the configuration information reset operation for the gateway device 104. The terminal 102 may determine the backbone network configuration information corresponding to the gateway configuration information from the backbone network device 106 to which the gateway device 104 is communicatively connected. The terminal 102 may delete the backbone network configuration information and release the backbone network resources configured by the backbone network configuration information in the backbone network device 106.
[0033] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The gateway device 104 and the backbone network device 106 may be implemented using an independent server or a server cluster consisting of multiple servers.
[0034] In one embodiment, as shown in FIG. 2 , a method for releasing resources of a network device is provided, and the method is described by taking the method applied to the terminal in FIG. 1 as an example, including:
[0035] S202: In response to a device recycling event for a gateway device, obtain gateway configuration information of the gateway device.
[0036] Among them, the gateway device is a network device used to connect and manage different types of network devices. The gateway device can be one of the core components that connect the Internet of Things system or other network systems. The main functions of the gateway device include data forwarding and integration, security assurance, remote control and intelligent control, as well as protocol conversion and data processing.
[0037] Exemplarily, the gateway device may be a customer premises equipment (CPE) in a software-defined wide area network.
[0038] The device recycling event can be an event initiated when the gateway device expires and needs to be recycled or when the gateway device needs to be recycled due to an abnormality. The device recycling event can be an event that is automatically triggered or manually triggered. For example, the device recycling event can be automatically triggered when the gateway device meets the device recycling conditions.
[0039] The gateway configuration information may be configuration information in the gateway device, for example, the gateway configuration information may be service information, device information, interface configuration information, etc.
[0040] The service information may be information related to the services implemented by the gateway device in the backbone network. The device information may be basic information and connection information of the gateway device. The basic information may be the serial number and version number of the gateway device. The connection information may be identification information of the node connected to the gateway device. The interface configuration information may represent the configuration information required to call the gateway device.
[0041] The gateway configuration information may include service information, device information and interface configuration information. Specifically, the terminal may read the service information and device information from a database corresponding to the gateway device. The terminal may directly read the interface configuration information corresponding to the gateway device.
[0042] S204: When the configuration information reset operation for the gateway device is completed, a first interface resource in a configuration state in the gateway device is released according to the gateway configuration information.
[0043] Among them, the interface resource can be an entity that can represent a network interface, manage candidates, or an abstract resource interface. For example, in a business system, an interface resource can refer to an entity that manages backend interface resources, including information such as URL key fields and interface request methods. For another example, in a network environment, interface resources usually refer to network interfaces (such as Ethernet interfaces, Token Ring interfaces, etc.), which are uniquely identified by IP addresses and used to connect network devices. For another example, in a programming language, an interface resource can refer to an abstract resource interface, such as the Resource interface in Java, which is used to describe the basic properties and methods of resources.
[0044] Exemplarily, the first interface resource may be specific interface information of the gateway device, such as an interface ID resource and an interface IP resource.
[0045] The configuration information reset operation may represent deleting the gateway configuration information in the gateway device.
[0046] The configuration information reset operation may include deleting the service information, device information, and interface configuration information in the gateway device. Specifically, the terminal may delete the service information in the gateway device. The terminal may reset the interface configuration information in the gateway device. The terminal may delete the device information in the gateway device.
[0047] Specifically, the terminal can determine the interface status of each of the multiple gateway interfaces included in the gateway device according to the gateway configuration information. The terminal can filter the target interface whose interface status is in the configuration state among the gateway interfaces. The terminal can release the first interface resource of the target interface.
[0048] S206, determining backbone network configuration information corresponding to the gateway configuration information from the backbone network device to which the gateway device is communicatively connected.
[0049] Among them, backbone network equipment can be a backbone network device that is used to connect multiple local area networks (LANs) and wide area networks (WANs). Backbone networks usually use high-speed circuits to connect a series of LANs and provide connections to other backbone networks, multi-service access networks (MANs), WANs, and the Internet. Backbone network equipment can include routers, switches, and gateways, etc. These devices achieve efficient transmission and management of the network through different technical levels.
[0050] Exemplarily, the gateway device may be a network access point (Point of Presence, POP) in a software-defined wide area network.
[0051] The backbone network configuration information may be configuration information in the backbone network device. The backbone network configuration information may correspond to the gateway configuration information one by one. For example, the gateway configuration information may be service information, device information, and interface configuration information. The backbone network configuration information may be a plurality of configuration information stored by the gateway device in the backbone network device. The plurality of configuration information may include configuration corresponding to the service information, configuration corresponding to the device information, and configuration corresponding to the interface configuration information.
[0052] Specifically, the terminal can determine the backbone network configuration information corresponding to the gateway configuration information from the backbone network device to which the gateway device is connected in communication. The backbone network configuration information includes configuration corresponding to the service information, configuration corresponding to the device information, and configuration corresponding to the interface configuration information.
[0053] S208, deleting the backbone network configuration information, and releasing the backbone network resources configured by the backbone network configuration information in the backbone network device.
[0054] The backbone network resources may be specific interface information of the backbone network equipment, such as interface ID resources and interface IP resources. The backbone network resources may also be database resources corresponding to the business information of the backbone network, such as resources of a database for storing business information. The backbone network resources may also be database resources corresponding to the device information of the backbone network, such as resources of a database for storing device information.
[0055] The backbone network configuration information may include multiple sub-configuration information. Specifically, the terminal deletes each sub-configuration information.
[0056] In one embodiment, the terminal may filter specific configuration information that needs to be deleted from each sub-configuration information.
[0057] In one embodiment, the terminal may obtain the deletion order of each configuration information, and delete each sub-configuration information in sequence according to each deletion order.
[0058] In the resource release method of the above network device, in response to the device recycling event for the gateway device, the gateway configuration information of the gateway device is obtained, and when the configuration information reset operation for the gateway device is completed, the first interface resource in the gateway device that is in the configuration state is released according to the gateway configuration information, and the first interface resource in the gateway device is released in time without waiting for the resource release process of the backbone network device, thereby improving the overall resource release efficiency. From the backbone network device to which the gateway device is communicatively connected, the backbone network configuration information corresponding to the gateway configuration information is determined, and the above method is used to delete the backbone network configuration information, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released, so as to realize the asynchronous release of resources between the gateway device and the backbone network device, thereby improving the overall resource release efficiency.
[0059] In one embodiment, based on the gateway configuration information, the first interface resource in the configuration state in the gateway device is released, including: based on the gateway configuration information, determining the interface status of each of the multiple gateway interfaces included in the gateway device, and in each gateway interface, screening the target interface whose interface status is in the configuration state, and releasing the first interface resource of the target interface.
[0060] The gateway interface may be a specific interface for the gateway device to communicate with other network devices.
[0061] The interface status may indicate the status of the gateway interface supporting communication. The interface status may include physical status, management status, protocol status, etc. The physical status may indicate whether the physical link of the gateway device is normal. The management status may indicate whether the gateway device is enabled or disabled by the administrator. The protocol status may indicate whether the interface can communicate normally. It can be understood that when the physical status, management status, and protocol status are all normal, the status of the interface may be considered as a configuration status. When one of the physical status, management status, and protocol status is abnormal, the status of the interface may be considered as an unconfigured state or an abnormally configured state.
[0062] The target interface in the configuration state may represent a gateway interface in which the physical state, the management state, and the protocol state are normal.
[0063] Specifically, the terminal can traverse each gateway interface to obtain the interface status of each gateway interface. The interface status may include a physical status, a management status, and a protocol status. The terminal can determine the physical status, management status, and protocol status of each gateway interface in turn, and when the physical status, management status, and protocol status are all normal, determine that the interface status of the gateway interface is a configured status. The terminal can determine that the interface status of the gateway interface is an unconfigured status when any one of the physical status, management status, and protocol status is abnormal.
[0064] In one embodiment, the terminal may store the first interface resource of the target interface in an interface resource table for summary. The terminal may display the interface resource table so that the gateway device can be used in time, thereby improving the utilization rate of the gateway device.
[0065] In this embodiment, based on the gateway configuration information, the interface status of each of the multiple gateway interfaces included in the gateway device is determined. Among each gateway interface, the target interface whose interface status is in the configuration state is screened, the first interface resources of the target interface are released, the target interface is quickly determined, the speed of releasing the first interface resources of the target interface is increased, and the overall resource release efficiency is improved.
[0066] In one embodiment, the backbone network configuration information includes multiple sub-configuration information, and deleting the backbone network configuration information includes: obtaining a scheduling queue containing the operation functions of each sub-configuration information, taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order, calling the taken out target operation function, deleting the target sub-configuration information corresponding to the target operation function, and when the target sub-configuration information is successfully deleted, returning to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order until all sub-configuration information has been deleted.
[0067] The sub-configuration information represents a type of configuration information in the backbone network configuration information. For example, the plurality of sub-configuration information may be configuration corresponding to the service information, configuration corresponding to the device information, and configuration corresponding to the interface configuration information.
[0068] The operation function can be a scheduling function for sub-configuration information that is manually defined. For example, a deletion function for sub-configuration information. The operation function can be used to delete sub-configuration information.
[0069] The dispatch queue may be a specific data structure used to manage and organize processes. Specifically, the dispatch queue may store multiple operation functions in sequence.
[0070] The target operation function may be the operation function at the head of the queue in the scheduling queue.
[0071] Multiple operation functions may be pre-stored in the scheduling queue. Specifically, the terminal may obtain multiple preset functions, which include multiple operation functions. The terminal may store the multiple preset functions in the scheduling queue in sequence.
[0072] Specifically, the terminal may take out the target operation function at the head of the queue from the scheduling queue, and may call the taken out target operation function and delete the target sub-configuration information corresponding to the target operation function.
[0073] Specifically, if the target sub-configuration information is deleted successfully, the terminal may return to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order. If the target sub-configuration information is deleted unsuccessfully, the terminal may delete the target sub-configuration information again until the number of deletion failures reaches a preset number, or the target sub-configuration information is successfully deleted.
[0074] In this embodiment, a scheduling queue containing the operation functions of each sub-configuration information is obtained, and the target operation function at the head of the queue is taken out from the scheduling queue in a first-in-first-out order, the taken out target operation function is called, and the target sub-configuration information corresponding to the target operation function is deleted. When the target sub-configuration information is successfully deleted, the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order is returned until all sub-configuration information has been deleted. Each sub-configuration information is deleted in sequence, thereby ensuring the sequential deletion of each sub-configuration information and the complete deletion of each sub-configuration information.
[0075] In one embodiment, the resource release method of the network device also includes: in the event that the deletion of the target sub-configuration information fails, placing the target operation function at the head of the queue of the scheduling queue, adding a retry flag to the target operation function, and returning to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order.
[0076] The failure to delete the target sub-configuration information may indicate that the target sub-configuration information is not deleted or is not completely deleted. There are many reasons for the failure to delete the target sub-configuration information, such as network fluctuation or network interruption.
[0077] The retry flag may be a flag in the header of the operation function. The retry flag may be used to instruct the terminal to call the target operation function according to certain rules.
[0078] Specifically, the terminal may add a retry identifier to the header of the target operation function. The terminal may delete the target sub-configuration information according to the retry time interval corresponding to the retry identifier.
[0079] In one embodiment, before deleting the target sub-configuration information, the terminal may first determine the deletion status of the target sub-configuration information. If the deletion status is incomplete deletion, the terminal may roll back the target sub-configuration information. The terminal may return to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order.
[0080] When the deletion status is not deleted, the terminal can directly return to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order.
[0081] In this embodiment, if the deletion of the target sub-configuration information fails, the target operation function is placed at the head of the queue of the scheduling queue, and a retry flag is added to the target operation function. The step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order is returned, and a retry flag is added to the target operation function to ensure that the target sub-configuration information is completely deleted, avoid configuration residues, and improve the effect of resource release.
[0082] In one embodiment, the retrieved target operation function is called and the target sub-configuration information corresponding to the target operation function is deleted, including: when the retrieved target operation function carries a retry flag, obtaining the retry interval of the target operation function, calling the retrieved target operation function according to the retry interval, and deleting the target sub-configuration information corresponding to the target operation function.
[0083] The retry time interval may represent the time interval between two call times of the target operation function. The retry time interval may be a fixed value or a variable value associated with the number of calls.
[0084] When the retry time interval is a fixed value, specifically, the terminal can determine the last call time of the target operation function. The terminal determines the current call time based on the last call time and the retry time interval. The terminal can call the retrieved target operation function at the current call time and delete the target sub-configuration information corresponding to the target operation function.
[0085] In the case where the retry time interval is a changing value associated with the number of calls, specifically, the terminal can determine the last call time of the target operation function. The terminal can determine the current number of calls and the target time interval that matches the current number of calls, wherein the number of calls is positively correlated with the target time interval. The terminal can determine the current call time based on the last call time and the target time interval. The terminal can call the retrieved target operation function at the current call time and delete the target sub-configuration information corresponding to the target operation function.
[0086] In this embodiment, when the retrieved target operation function carries a retry flag, the retry interval of the target operation function is obtained, the retrieved target operation function is called according to the retry interval, the target sub-configuration information corresponding to the target operation function is deleted, and the target sub-configuration information is deleted according to the retry interval to ensure that the target sub-configuration information is completely deleted, avoid configuration residues, and improve the effect of resource release.
[0087] In one embodiment, the resource release method of the network device also includes: determining multiple candidate devices that have a network mapping relationship with the gateway device, and for each candidate device, performing a communication test between the gateway device and the candidate device to obtain a communication test result of the candidate device, and determining the candidate device with a normal communication test result as a backbone network device that is communicatively connected to the gateway device.
[0088] The candidate device may be a device corresponding to a node having a network mapping relationship with the gateway device.
[0089] Network mapping can be expressed in computer networks by creating a visual representation of the network structure in the virtual world corresponding to the entities in the real world. This mapping relationship includes not only the hardware facilities at the physical level (such as network equipment, servers, storage devices, etc.), but also the virtual resources at the logical level (such as data flow, service calls, applications, etc.).
[0090] The communication test result indicates the result of the communication test between the gateway device and the candidate device. The communication test result may include normal and abnormal.
[0091] A normal communication test result may indicate that the gateway device and the candidate device can communicate normally, or that the candidate device is online. An abnormal communication test result may indicate that the gateway device and the candidate device can communicate normally, or that the candidate device is offline.
[0092] Specifically, the communication test may include a communication connection test, a data transmission test, a protocol compatibility test, a device status test, and a fault detection and recovery test. A normal communication test result may indicate that the communication connection between the gateway device and the candidate device is stable, data transmission is accurate, protocol compatibility is good, the device status is normal, and the fault detection and recovery capabilities meet the standards.
[0093] A stable communication connection indicates that the gateway device can normally establish and maintain a communication connection with the backbone network device, ensuring that data can be transmitted smoothly.
[0094] Accurate data transmission means that during the communication process, the sending and receiving of data packets are in line with expectations, and there is no data loss or error.
[0095] Good protocol compatibility means that the gateway device supports and correctly executes communication protocols related to backbone network devices, such as HTTP, MQTT, etc., ensuring the reliability and consistency of data transmission.
[0096] The normal status of the device indicates that the backbone network device can correctly receive and process the control instructions from the gateway device and feedback the corresponding status information, indicating that the device is operating normally.
[0097] Meeting the fault detection and recovery capability standards indicates that backbone network equipment and gateway equipment have the ability to detect network anomalies and faults, and can complete reconnection within a specified time to ensure that user data is not lost.
[0098] Specifically, the terminal may perform a communication test between the gateway device and each candidate device to obtain a communication test result of the candidate device.
[0099] In one embodiment, the communication test may include a communication connection test, a data transmission test, a protocol compatibility test, a device status test, and a fault detection and recovery test. Specifically, the terminal may determine a target communication test among the communication connection test, the data transmission test, the protocol compatibility test, the device status test, and the fault detection and recovery test. The terminal may perform a target communication test between the gateway device and the candidate device for each candidate device to obtain a communication test result of the candidate device.
[0100] In one embodiment, the terminal may obtain multiple continuous test periods configured for each candidate device. The terminal may determine the test order of each test period; the length of the test period is inversely related to the test order. The terminal may perform communication tests on the candidate devices in turn according to each test order to obtain communication test results of the candidate devices.
[0101] In this embodiment, multiple candidate devices that have a network mapping relationship with the gateway device are determined, and for each candidate device, a communication test is performed between the gateway device and the candidate device to obtain a communication test result of the candidate device. The candidate device with a normal communication test result is determined to be a backbone network device that is communicatively connected to the gateway device, thereby ensuring that the communication between the backbone network device and the gateway device is stable, which is beneficial to deleting the backbone network configuration in the backbone network device and improving the overall resource release efficiency.
[0102] In one embodiment, a communication test is performed between a gateway device and a candidate device to obtain a communication test result of the candidate device, including: obtaining a plurality of continuous test time periods configured for each candidate device, determining a test order for each test time period, wherein the length of the test time period is inversely correlated with the test order, and performing communication tests on the candidate devices in turn according to each test order to obtain a communication test result of the candidate device.
[0103] Among them, the test period corresponds to a single communication test period. Specifically, the test period includes the start test time and the end test time of the single communication test. It should be noted that the end test time of the previous test period can be the same as the start test time of the next test period. The longer the test period is, the longer the waiting time for the next test can be. For example, multiple consecutive test periods can be 5s, 30s, 1min, 5min, 5min, etc.
[0104] The test order indicates the order of the test periods. The length of the test period is positively correlated with the test order. Multiple consecutive test periods can be 5s, 30s, 1min, 5min, 5min, etc. The corresponding order can be 1, 2, 3, 4, etc.
[0105] Exemplarily, the terminal may perform a communication test on the candidate device within the first 5 seconds to obtain the communication test result of the candidate device. If the communication test is abnormal, the terminal may perform a communication test on the candidate device within the second 50 seconds to obtain the communication test result of the candidate device. If the communication test is abnormal, the terminal may perform a communication test on the candidate device within the third 1 minute to obtain the communication test result of the candidate device until the communication test is normal.
[0106] Specifically, the terminal performs communication tests on the candidate devices according to the test orders, preferably in the test period with a smaller test order, to obtain the communication test results of the candidate devices. If the communication test is abnormal, the terminal can perform communication tests on the candidate devices according to the test period with a larger test order until the communication test is normal.
[0107] In this embodiment, multiple continuous test time periods configured for each candidate device are obtained, and the test order of each test time period is determined. The duration of the test time period is inversely correlated with the test order. According to each test order, communication tests are performed on the candidate devices in turn to obtain communication test results of the candidate devices. The test duration and test waiting time are lengthened in turn, thereby improving the test accuracy while saving hardware resources, so as to improve the overall resource release efficiency.
[0108] In one embodiment, as shown in FIG3 , a method for recovering an SDWAN network device is provided, including:
[0109] S301: In response to a device recycling event for a gateway device, obtain gateway configuration information of the gateway device.
[0110] Among them, as shown in FIG4 , the process diagram of the equipment recycling method, the specific process of the equipment recycling method is as follows:
[0111] (1) Recycling of front-end operation equipment and recycling of CPE equipment.
[0112] (2) The controller deletes CPE-related business data, mainly business data recorded in the database.
[0113] (3) Since the CPE belongs to the user side, all the above configurations belong to the user, so the controller directly sends a reset command to the CPE to restore the factory settings and clear the configuration on the CPE.
[0114] (4) Delete the CPE device data recorded in the database, including basic device information, connection information, etc.
[0115] (5) Response result to the front end. After the front end receives a successful response result, it can be considered that the device has been recycled and the device can be reused by other users. In some scenarios (such as network oscillation), the controller fails to send the reset command to the CPE device, and directly responds to the front end with a failure and prompts that the reset command needs to be manually executed on the device. The purpose is to complete the recycling of the CPE device as soon as possible and enable it to be reused.
[0116] (6) Before responding to the result, the registration method of the scheduling module will be called to register the pop operation as a function. Since pop is a backbone network device shared by multiple tenants, pop cannot directly execute the reset command to restore to factory settings like cpe. pop needs to accurately delete the corresponding configuration of cpe on the pop. In the pop operation class, each method is atomic, and only one type of configuration is deleted in each method. Since there are dependencies between configurations, the deletion of configurations is sequential. If the previous configuration has not been deleted or has not been deleted successfully, the next configuration cannot be deleted. If the configuration deletion fails in the current method, the scheduling module needs to re-call the method regularly until the execution is successful, or remove the method call from the scheduling module through the operation and maintenance interface. When the configuration deletion fails in the method, an alarm needs to be issued, and manual intervention needs to be made to solve the failure problem to ensure that the method can be retried successfully and continue to be scheduled downward. Ultimately, it is ensured that the corresponding configuration of cpe on pop can be deleted successfully.
[0117] (7) After the configuration on POP is deleted, the interface ID resources and interface IP resources previously allocated to the device on the controller can be released, and other devices can reapply for use.
[0118] Among them, the method of deleting the configuration on the POP can refer to the interactive diagram of the scheduling module and the device recycling module shown in FIG5 .
[0119] (1) In the device recovery module, the method that needs to be scheduled is registered in the scheduling module as a function. A namespace needs to be specified. If the scheduling is based on devices, the namespace can usually be set in the form of "business type + device IP". The role of the namespace is to correspond to a scheduling queue in the scheduling module. When registering, you can set the retry interval when the method execution fails and the timeout time of the method execution. If no setting is made, the scheduling module will use the default data.
[0120] (2) When the registration method of the scheduling module is called, it first queries whether there is an existing queue based on the namespace. If there is an existing queue, it is directly removed. If not, a new queue is created and stored with the namespace as the key.
[0121] (3) The scheduling module adds the registered function to the queue.
[0122] (4) The scheduling module is called in the device recovery module. The scheduling module starts the scheduling task according to the namespace, and each scheduling task occupies one thread.
[0123] (5) The scheduling module takes out the corresponding task queue according to the namespace, and starts to execute the function from the head of the queue, that is, the registered functions are executed in the order of registration. If the currently taken function is not executed, other functions in the queue will not be executed.
[0124] (6) If the function is executed successfully, the next function in the queue is taken out and continued to execute. If the function fails to execute, the function is added to the head of the queue and marked as a retry.
[0125] (7) The next time a function is taken out of the queue, first check whether there is a retry mark. If there is no retry mark, the function is executed directly; if there is a retry mark, the execution must be timed according to the retry interval time when registered.
[0126] (8) If the function is executed successfully after retry, the next function can be taken from the task queue for execution, and so on, until the function in the queue is executed.
[0127] An exemplary, complete CPE equipment recycling process, as shown in FIG6 , includes:
[0128] The complete CPE equipment recycling example is as follows:
[0129] (1) The operation and maintenance personnel operate the CPE equipment recovery from the front-end interface.
[0130] (2) The front-end interface calls the northbound interface of the controller and first verifies the input parameters, such as whether the parameters are complete and whether the device to be recycled (pop) exists. If it fails the verification, it directly responds to the front-end with a failure; if it passes the verification, it continues to execute downward. The controller can be a terminal.
[0131] (3) Delete the business data on the CPE. Here, only the business data related to the CPE to be recycled recorded in the database is deleted, such as ACL, OSPF, monitoring and other data.
[0132] (4) The controller sends a restore factory settings command to the CPE device through the southbound protocol, and the CPE device directly clears all configurations on the device.
[0133] (5) The controller deletes the CPE device information data in the database.
[0134] (6) The controller releases the resources exclusively used by the CPE, such as the router ID of the box's BGP and the AS number of the box in the EBGP scenario.
[0135] (7) The response result is sent to the front end, indicating that the CPE has been recycled. At this time, it only means that the CPE can be reused. The configuration on the POP is deleted asynchronously and may not have been executed yet.
[0136] (8) Before responding to the result, the scheduling module will be registered and started. The main pop and backup pop need to be registered and started respectively. The namespace registered by the main pop uses "delete-site-main pop ip address", and the namespace registered by the backup pop uses "delete-site-backup pop ip address". Adding registration functions uses functional programming features. Each function object contains the minimum configuration of a pop (generally in units of configuration type) deletion logic.
[0137] (9) The configuration to be deleted is queried from the database to ensure that the configuration to be deleted is the configuration previously issued on POP.
[0138] (10) After the southbound configuration module converts the configuration data queried from the database into the configuration that needs to be sent to the device, it can be sent to the device through the protocol module.
[0139] (11) If the configuration deletion fails, an exception must be thrown. After the function object obtains the exception, it will return a false result, indicating that the method scheduling failed. The function will be reinserted into the head of the queue and marked as needing to be retried. When the scheduling module retrieves the function again, it will check that there is a retry mark and will re-call the function according to the retry time set when registering. It will not continue to obtain the next function from the queue until the execution is successful, and so on. This ensures that the configuration on the pop will eventually be deleted successfully.
[0140] (12) Finally, the controller deletes the configuration data recorded in the database and releases the configuration resources allocated by the controller, such as interface ID resources, interface IP address resources, etc.
[0141] S302: When the configuration information resetting operation for the gateway device is completed, determine the interface status of each of the multiple gateway interfaces included in the gateway device according to the gateway configuration information.
[0142] S303, among the gateway interfaces, filter the target interfaces whose interface status is in the configuration status.
[0143] S304: Release the first interface resource of the target interface.
[0144] S305: Determine backbone network configuration information corresponding to the gateway configuration information from the backbone network device to which the gateway device is communicatively connected.
[0145] The backbone network configuration information includes multiple sub-configuration information.
[0146] Among them, multiple candidate devices that have a network mapping relationship with the gateway device are determined. For each candidate device, multiple continuous test time periods configured for each candidate device are obtained. The test order of each test time period is determined. The length of the test time period is inversely related to the test order. According to each test order, communication tests are performed on the candidate devices in turn to obtain communication test results of the candidate devices. The candidate device with a normal communication test result is determined as a backbone network device that is connected to the gateway device for communication.
[0147] S306: Obtain a scheduling queue containing the operation functions of each sub-configuration information.
[0148] S307, taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order.
[0149] S308: When the retrieved target operation function carries a retry flag, obtain the retry interval of the target operation function.
[0150] S309: Call the retrieved target operation function according to the retry interval time, and delete the target sub-configuration information corresponding to the target operation function.
[0151] S310, determine whether the target sub-configuration information is deleted successfully, if yes, execute S311, if no, execute S312.
[0152] S311, determine whether all sub-configuration information has been deleted, if so, execute S313, if not, return to S307.
[0153] S312, put the target operation function into the queue head of the scheduling queue, add a retry flag for the target operation function, and return to S307.
[0154] S313, releasing the backbone network resources configured by the backbone network configuration information in the backbone network device.
[0155] In this embodiment, in response to a device recycling event for a gateway device, the gateway configuration information of the gateway device is obtained. When the configuration information reset operation for the gateway device is completed, the first interface resource in the gateway device that is in a configuration state is released according to the gateway configuration information. The first interface resource in the gateway device is released in a timely manner without waiting for the resource release process of the backbone network device, thereby improving the overall resource release efficiency. From the backbone network device to which the gateway device is communicatively connected, the backbone network configuration information corresponding to the gateway configuration information is determined, and the backbone network configuration information is deleted using the above method, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released, thereby realizing asynchronous release of resources between the gateway device and the backbone network device, thereby improving the overall resource release efficiency.
[0156] The above method can also bring the following beneficial effects: (1) The entire orchestration method for the recycling of DWAN network devices. This orchestration method can improve the efficiency of device recycling in the SDWAN network; ensure that the configuration on the device is completely deleted and no configuration residue will appear; ensure that the controller resources are completely recycled and no resource waste will occur. When the POP device is offline or fails, the normal recycling of the CPE device can also be guaranteed. (2) The scheduling method of the scheduling module. This scheduling method can ensure that the configuration on the device is completely deleted and the controller resources are completely recycled.
[0157] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0158] Based on the same inventive concept, the embodiment of the present application also provides a resource release device for a network device for implementing the resource release method of the network device involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiment of the resource release device of one or more network devices provided below can refer to the limitations of the resource release method of the network device above, and will not be repeated here.
[0159] In one embodiment, as shown in FIG. 7 , a resource release device of a network device is provided, comprising: an information acquisition module 701, a first resource release module 702, an information determination module 703, and a second resource release module 704, wherein:
[0160] The information acquisition module 701 is used to acquire gateway configuration information of the gateway device in response to a device recycling event for the gateway device;
[0161] A first resource releasing module 702, configured to release a first interface resource in a configuration state in the gateway device according to the gateway configuration information when the configuration information reset operation for the gateway device is completed;
[0162] An information determination module 703, configured to determine backbone network configuration information corresponding to the gateway configuration information from a backbone network device to which the gateway device is communicatively connected;
[0163] The second resource releasing module 704 is used to delete the backbone network configuration information and release the backbone network resources configured by the backbone network configuration information in the backbone network device.
[0164] In one embodiment, the first resource release module 702 is also used to determine the interface status of each of the multiple gateway interfaces included in the gateway device according to the gateway configuration information; in each gateway interface, filter the target interface whose interface status is in the configuration state; and release the first interface resource of the target interface.
[0165] In one of the embodiments, the backbone network configuration information includes multiple sub-configuration information; the second resource release module 704 is also used to obtain a scheduling queue containing the operation functions of each sub-configuration information; take out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order; call the taken out target operation function and delete the target sub-configuration information corresponding to the target operation function; when the target sub-configuration information is successfully deleted, return to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order until all sub-configuration information has been deleted.
[0166] In one of the embodiments, the resource release device of the network equipment also includes: a retry module, which is used to put the target operation function into the queue head of the scheduling queue and add a retry flag to the target operation function when the deletion of the target sub-configuration information fails; and return to the step of taking out the target operation function at the queue head from the scheduling queue in a first-in-first-out order.
[0167] In one of the embodiments, the retry module is further used to obtain the retry interval of the target operation function when the extracted target operation function carries a retry flag; call the extracted target operation function according to the retry interval, and delete the target sub-configuration information corresponding to the target operation function.
[0168] In one of the embodiments, the communication test module is also used to determine multiple candidate devices that have a network mapping relationship with the gateway device; for each candidate device, a communication test is performed between the gateway device and the candidate device to obtain a communication test result of the candidate device; and the candidate device with a normal communication test result is determined as a backbone network device that is communicatively connected to the gateway device.
[0169] In one of the embodiments, the communication test module is also used to obtain multiple continuous test time periods configured for each candidate device; determine the test order of each test time period; the length of the test time period is inversely correlated with the test order; according to each test order, communication tests are performed on the candidate devices in turn to obtain communication test results of the candidate devices.
[0170] Each module in the resource release device of the above network device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0171] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store gateway configuration information data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource release method of a network device is implemented.
[0172] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0173] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above method steps are implemented when the processor executes the computer program.
[0174] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method steps are implemented.
[0175] In one embodiment, a computer program product is provided, comprising a computer program, which implements the above method steps when executed by a processor.
[0176] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0177] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0178] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for releasing resources of a network device, characterized in that: The method comprises: In response to a device recycling event for a gateway device, acquiring gateway configuration information of the gateway device; When the configuration information reset operation for the gateway device is completed, releasing the first interface resource in the configuration state in the gateway device according to the gateway configuration information; Determining backbone network configuration information corresponding to the gateway configuration information from backbone network devices to which the gateway device is communicatively connected; The backbone network configuration information is deleted, and the backbone network resources configured by the backbone network configuration information in the backbone network device are released.
2. The method according to claim 1, characterized in that The releasing the first interface resource in the configuration state in the gateway device according to the gateway configuration information includes: Determining, according to the gateway configuration information, the interface status of each of the plurality of gateway interfaces included in the gateway device; In each of the gateway interfaces, select a target interface whose interface status is in a configuration status; Release the first interface resource of the target interface.
3. The method according to claim 1, characterized in that The backbone network configuration information includes a plurality of sub-configuration information; The deleting the backbone network configuration information includes: Obtaining a scheduling queue containing the operation functions of each of the sub-configuration information; According to the first-in-first-out order, the target operation function at the head of the queue is taken out from the scheduling queue; Calling the retrieved target operation function, and deleting the target sub-configuration information corresponding to the target operation function; When the target sub-configuration information is deleted successfully, the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order is returned until all the sub-configuration information are deleted.
4. The method according to claim 3, characterized in that The method further comprises: In the case where the target sub-configuration information fails to be deleted, the target operation function is placed at the head of the scheduling queue, and a retry flag is added to the target operation function; Return to the step of taking out the target operation function at the head of the queue from the scheduling queue in a first-in-first-out order.
5. The method according to claim 4, characterized in that The calling of the retrieved target operation function and the deleting of the target sub-configuration information corresponding to the target operation function include: When the retrieved target operation function carries a retry flag, obtaining a retry interval of the target operation function; The retrieved target operation function is called according to the retry interval time, and the target sub-configuration information corresponding to the target operation function is deleted.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Determine a plurality of candidate devices having a network mapping relationship with the gateway device; For each of the candidate devices, a communication test is performed between the gateway device and the candidate device to obtain a communication test result of the candidate device; The candidate device with a normal communication test result is determined as the backbone network device that is communicatively connected to the gateway device.
7. The method according to claim 6, characterized in that The performing a communication test between the gateway device and the candidate device to obtain a communication test result of the candidate device includes: Acquire a plurality of continuous test time periods configured for each of the candidate devices; Determining a test order for each of the test periods; the length of the test period is inversely related to the test order; According to each of the test orders, communication tests are performed on the candidate devices in turn to obtain communication test results of the candidate devices.
8. A resource release device for a network device, characterized in that: The device comprises: An information acquisition module, configured to acquire gateway configuration information of the gateway device in response to a device recycling event for the gateway device; A first resource releasing module, configured to release a first interface resource in a configuration state in the gateway device according to the gateway configuration information when a configuration information reset operation for the gateway device is completed; An information determination module, used to determine backbone network configuration information corresponding to the gateway configuration information from a backbone network device to which the gateway device is communicatively connected; The second resource releasing module is used to delete the backbone network configuration information and release the backbone network resources configured by the backbone network configuration information in the backbone network device.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.