Network equipment configuration method and device, storage medium and program product
By selecting the template to be synchronized in the SASE and SD-WAN unified management system and automatically synchronize it, combining intelligent selection and configuration commands to construct configuration commands, the network device configuration management problem of diversity and version inconsistency is solved, and flexible and efficient management and customer-insensitive adaptation are achieved.
Patent Information
- Application Number
- CN202411757029.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-03
AI Technical Summary
In the unified management system of SASE and SD-WAN, configuration management of network devices with different types and inconsistent versions faces adaptation difficulties. Traditional methods have a wide range of influence and are complex to update, making it difficult to deal with rapidly changing network environments.
By responding to the update request of the device adaptation template, select the template to be synchronized from several update versions, send the registration request and receive the registration success information, automatically synchronize the template to be synchronized, realize the update of the template set, and intelligently select the target template to be constructed based on the parameter set and device information.
It realizes flexible and efficient configuration management of network devices with diversity and version inconsistency, simplifies management processes, improves management efficiency, reduces the possibility of human errors, and realizes unaware equipment adaptation for customers.
Smart Images

Figure CN119676073A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of network security management, and in particular to a network device configuration method, device, storage medium, and program product. Background Art
[0002] In the unified management system of SASE (Secure Access Service Edge) and SD-WAN (Software-Defined Wide Area Network), multiple types of network devices need to be centrally managed. These network devices are not only of various types, but also the versions of the same type of devices may be inconsistent, resulting in more difficulties for the unified management platform when adapting the devices. The adaptation work depends on the interfaces provided by the products and faces the risk of changes in configuration command parameters at any time.
[0003] The traditional management method is to pre-set the configuration template to the unified management platform, and update it with the release of the unified management platform or through the upgrade package. This method has a wide impact range and a complex update process, making it difficult to cope with the rapidly changing network environment. In addition, the adaptation of the unified management platform is affected by the supporting version interface and cannot be adapted in advance. It lags behind the release of the device version. As a result, if the existing network is upgraded to a new device version, the unified management platform must be upgraded, which will affect the normal use of the existing network. Since the device interface and configuration command parameters may change at any time, the traditional method is difficult to cope with these changes, resulting in complex and inefficient adaptation work. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide a network device configuration method, apparatus, storage medium, and program product, which can effectively meet the configuration management needs of network devices of various types and inconsistent versions, and solve the problem that the unified management platform must be upgraded before the synchronization device adaptation template.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for configuring a network device, which adopts the following technical solution:
[0006] In response to a request for updating a device adaptation template, selecting a template to be synchronized from a plurality of updated versions;
[0007] Send a registration request;
[0008] Receive the returned registration success information;
[0009] When the registration success information does not contain the version number of the template to be synchronized, the template to be synchronized is synchronized to update the template set;
[0010] Receiving a parameter set and first device information sent by any network device;
[0011] Based on the parameter set and the first device information, selecting a target template from a plurality of template sets;
[0012] constructing a configuration command based on the target template and the parameter set;
[0013] The configuration command is sent to the network device to implement the configuration change of the network device.
[0014] Optionally, in response to the update request for the device adaptation template, selecting a template to be synchronized from a plurality of updated versions includes:
[0015] When monitoring that the current version of the device adaptation template is updated, determining whether there is a synchronization instruction;
[0016] If it exists, the latest version of the device adaptation template is determined as the template to be synchronized;
[0017] If it does not exist, then the timer is activated to record the timing time;
[0018] Determine whether the timing time is greater than the synchronization triggering time interval;
[0019] If it is greater, the timing is stopped and the latest version of the device adaptation template is determined as the template to be synchronized;
[0020] If not, determining whether the device adaptation template is updated again;
[0021] If it is updated again, the timer is turned off and it is determined again whether there is a synchronization instruction;
[0022] If there is no further update, the timer is turned off and the latest version of the device adaptation template is determined as the template to be synchronized.
[0023] Optionally, the network device configuration method further includes:
[0024] Determining whether the device adaptation template is updated for the first time within a preset time range;
[0025] If yes, the synchronization triggering time interval is equal to the preset basic time interval;
[0026] If not, the synchronization triggering time interval is obtained based on the number of updates of the device adaptation template within a preset time range and the basic time interval, wherein the calculation formula of the synchronization triggering time interval is:
[0027]
[0028] Among them, T sync is the synchronization triggering time interval; T baseis the basic time interval; α is the current adjustment factor; Δt is the average update time interval of the device adaptation template within the preset time range; β is the current weight factor; i is the serial number of the device adaptation template updated within the preset time range, 1≤i≤I; I is the number of updates of the device adaptation template within the preset time range; M i S is the modification amount of the device adaptation template updated for the i-th time within the preset time range; i is the mark value of the i-th update of the device adaptation template within the preset time range. If after the i-th update, the updated device adaptation template is marked to be synchronized, then S i =1, if no synchronization mark is performed, then S i =0.
[0029] Optionally, the calculation formula of the current adjustment factor is:
[0030]
[0031] Where n is the sequence number of the current adjustment operation of the factor within the preset time range; α n is the adjustment factor after the nth adjustment, α n-1 is the adjustment factor after the n-1th adjustment; γ is the preset first smoothing factor.
[0032] Optionally, the calculation formula of the current adjustment factor is:
[0033]
[0034] Where n is the sequence number of the current adjustment operation of the factor within the preset time range; α n is the adjustment factor after the nth adjustment, α n-1 is the adjustment factor after the n-1th adjustment; γ is the preset first smoothing factor.
[0035] Optionally, the synchronizing the template to be synchronized includes:
[0036] Convert the template to be synchronized into UTF-8 encoding and UNIX format;
[0037] Sending to the unified management platform based on the converted template to be synchronized, the second device information of the sending end, and the specified service type;
[0038] Filtering out old templates from a plurality of template sets on a unified management platform based on the second device information and the specified service type;
[0039] The converted template to be synchronized is used to replace the old template, and the corresponding template set index file is updated. The template set index file is a file that records the change history and storage path of all templates in each template set.
[0040] Optionally, based on the parameter set and the first device information, YY+242256P in multiple template sets
[0041] Select the target template, including:
[0042] Filtering out a target template set from the multiple template sets based on the first device information and the template set index file;
[0043] Acquire a target service type based on the parameter set;
[0044] The target template is screened out from the target template set based on the target business type and the template set index file.
[0045] In a second aspect, the embodiment of the present disclosure further provides a network device configuration system, which adopts the following technical solution:
[0046] An update response module, configured to respond to an update request for a device adaptation template and select a template to be synchronized from a plurality of updated versions;
[0047] A request sending module, used to send a registration request;
[0048] The first receiving module is used to receive the returned registration success information;
[0049] A template synchronization module, used for synchronizing the template to be synchronized to update the template set when the registration success information does not contain the version number of the template to be synchronized;
[0050] A second receiving module, used to receive a parameter set and first device information sent by any network device;
[0051] A template selection module, configured to select a target template from a plurality of template sets based on the parameter set and the first device information;
[0052] A command construction module, used to construct a configuration command based on the target template and the parameter set;
[0053] The command sending module is used to send the configuration command to the network device to implement the configuration change of the network device.
[0054] In a third aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:
[0055] The computer device comprises:
[0056] at least one processor; and,
[0057] a memory communicatively connected to the at least one processor; wherein,
[0058] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the above-mentioned network device configuration methods.
[0059] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned network device configuration methods.
[0060] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0061] The network device configuration method provided by the embodiment of the present disclosure allows the template to be synchronized to be selected from several updated versions, which provides great flexibility and customizability. Whether the operation and maintenance personnel complete the final template through one modification or multiple modifications, the synchronized template can be guaranteed to be the latest to the greatest extent. By sending a registration request and receiving a registration success message, a centralized management method is implemented, which helps to simplify the management process, improve management efficiency, and ensure that the configuration changes of all network devices are reviewed and controlled. When the registration success message does not contain the version number of the template to be synchronized, the template to be synchronized is automatically updated synchronously to ensure the real-time and accuracy of the template set, and prevent configuration errors caused by version mismatch. At the same time, when any network device needs to configure a command, the most suitable target template can be intelligently selected from multiple template sets through the parameter set and the first device information, and then the configuration command is constructed according to the template and the parameter set. This intelligent configuration method not only improves the configuration efficiency, but also reduces the possibility of human errors, and improves the convenience and efficiency of management. Compared with the traditional method, this method actively registers the templates to be synchronized to the unified management platform through the managed devices, and realizes the automatic update of the templates to be synchronized when the devices are online, so as to achieve the device adaptation effect without the customer's perception. At the same time, the device adaptation work is decoupled from the version release of the unified management platform. The release of the unified management platform is no longer dependent on the progress of the new device adaptation work, that is, it is not constrained by the release rhythm of the managed devices.
[0062] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0064] Figure 1 A flowchart of a network device configuration method provided by an embodiment of the present disclosure;
[0065] Figure 2 A schematic diagram of a flow chart of a method for selecting a template to be synchronized provided in an embodiment of the present disclosure;
[0066] Figure 3 A schematic diagram of a flow chart of a method for dynamically setting a synchronization trigger time interval provided in an embodiment of the present disclosure;
[0067] Figure 4 A schematic diagram of a flow chart of a template set updating method provided in an embodiment of the present disclosure;
[0068] Figure 5 A principle block diagram of a network device configuration method provided by an embodiment of the present disclosure;
[0069] Figure 6 A principle block diagram of a network device configuration system provided by an embodiment of the present disclosure;
[0070] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0071] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0072] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0073] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0074] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0075] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0076] Reference Figure 1 The present disclosure provides a network device configuration method, comprising the following steps:
[0077] S1: In response to a request for updating a device adaptation template, selecting a template to be synchronized from a plurality of updated versions;
[0078] S2: Send a registration request;
[0079] S3: Receive the returned registration success information;
[0080] S4: When the registration success information does not contain the version number of the template to be synchronized, the template to be synchronized is synchronized to update the template set;
[0081] S5: receiving a parameter set and first device information sent by any network device;
[0082] S6: Selecting a target template from multiple template sets based on the parameter set and the first device information;
[0083] S7: construct configuration commands based on the target template and parameter set;
[0084] S8: Send the configuration command to the network device to implement the configuration change of the network device.
[0085] The network device configuration method disclosed in the present invention allows the template to be synchronized to be selected from several updated versions, which provides great flexibility and customizability. Whether the operation and maintenance personnel complete the final template through one modification or multiple modifications, the synchronized template can be guaranteed to be the latest to the greatest extent. By sending a registration request and receiving a registration success message, a centralized management method is implemented, which helps to simplify the management process, improve management efficiency, and ensure that the configuration changes of all network devices are reviewed and controlled. When the registration success message does not contain the version number of the template to be synchronized, the template to be synchronized is automatically updated synchronously to ensure the real-time and accuracy of the template set and prevent configuration errors caused by version mismatch. At the same time, when any network device needs to configure a command, the most suitable target template can be intelligently selected from multiple template sets through the parameter set and the first device information, and then the configuration command is constructed according to the template and the parameter set. This intelligent configuration method not only improves the configuration efficiency, but also reduces the possibility of human errors, and improves the convenience and efficiency of management. Compared with the traditional method, this method actively registers the templates to be synchronized to the unified management platform through the managed devices, and realizes the automatic update of the templates to be synchronized when the devices are online, so as to achieve the device adaptation effect without the customer's perception. At the same time, the device adaptation work is decoupled from the version release of the unified management platform. The release of the unified management platform is no longer dependent on the progress of the new device adaptation work, that is, it is not constrained by the release rhythm of the managed devices.
[0086] In S1, when the operation and maintenance personnel manually update the device adaptation template of the managed device, or the version of the managed device itself is upgraded, an update request for the device adaptation template is triggered. The device adaptation template of the managed device only retains the latest version, so you only need to find the change list of the corresponding product adaptation file relative to previous versions in the product configuration file storage directory to get the list of files that need to be synchronized. The saved updated version of the device adaptation template can be queried from the file list. Among them, the managed device (using the ID-Mgt logo) is any device among multiple network devices, used to carry services on the customer network, including network services or security services, etc. These devices are uniformly configured, monitored and maintained by a unified management platform (using the ID-Dev logo).
[0087] The operation and maintenance personnel may make multiple changes to the configuration standards of the managed devices in a short period of time. During this period, the operation and maintenance personnel do not consciously want to synchronize each change to the unified management platform immediately, but only test and verify the configuration standards locally on the device. However, such continuous and multiple modifications will cause the device adaptation templates of the managed devices to be frequently updated in a short period of time, causing the synchronization of the device adaptation templates between the managed devices and the unified management platform to be too frequent, which not only wastes resources such as network bandwidth, but also increases the risk of errors, which may lead to configuration errors or data inconsistencies.
[0088] In order to solve the problem of frequent synchronization of device adaptation templates in a short period of time, refer to Figure 2 The flowchart of the method for selecting a template to be synchronized is shown. The network device configuration method disclosed in the present invention further includes the following steps:
[0089] S11: when the current version of the device adaptation template is updated, determine whether there is a synchronization instruction; if so, execute S12; if not, execute S13;
[0090] S12: Determine the latest version of the device adaptation template as the template to be synchronized;
[0091] S13: a timer for recording the time;
[0092] S14: Determine whether the timing time is greater than the synchronization trigger time interval; if so, execute S12; if not, execute S15;
[0093] S15: Determine whether the device adaptation template is updated again; if so, execute S16; if not, execute S17;
[0094] S16: turn off the timer, return to S11, and re-determine whether there is a synchronization instruction;
[0095] S17: Turn off the timer and execute S12.
[0096] In S11, a synchronization instruction is a command manually triggered by the user and can be triggered through the management interface or API. Whenever the current version of the device adaptation template is updated, the synchronization instruction detection process is automatically triggered. When a synchronization instruction is detected, it means that the operation and maintenance personnel want to synchronize the updated device adaptation template to the unified management platform immediately. Therefore, in this case, the latest version of the device adaptation template will be marked as synchronization pending and become a template to be synchronized for subsequent synchronization operations.
[0097] In S12, since the managed device only stores the latest version of the device adaptation template, this not only simplifies the query process of the template to be synchronized and ensures that the template to be synchronized is always the latest version, but also helps to reduce memory usage.
[0098] In S13-S17, when no synchronization instruction is detected, the preset timer is activated and the timer timing is recorded. The managed device compares the timing time with the set synchronization trigger time interval in real time. If the timing time exceeds the synchronization trigger time interval, it means that the operation and maintenance personnel have not updated the device adaptation template again within the synchronization trigger time interval, and the latest version of the device adaptation template is directly determined as the template to be synchronized. If the operation and maintenance personnel have updated the device adaptation template again within the synchronization trigger time interval, it will re-detect whether there is a synchronization instruction until the template to be synchronized is determined.
[0099] Furthermore, the network device configuration method disclosed in the present invention also includes dynamically adjusting the synchronization trigger time interval to optimize resource utilization and operation effect. Figure 3 The flowchart of the method for dynamically setting the synchronization trigger time interval is shown. The method for dynamically setting the synchronization trigger time interval based on the update operation of the device adaptation template includes the following steps:
[0100] S141: Determine whether the device adaptation template is updated for the first time within a preset time range; if so, execute S142; if not, execute S143;
[0101] S142: The synchronization triggering time interval is equal to the preset basic time interval;
[0102] S143: Acquire a synchronization triggering time interval based on the number of updates of the device adaptation template within a preset time range and a basic time interval.
[0103] According to experimental results, operation and maintenance personnel usually update the same device adaptation template twice or more within 15 minutes, and it takes about 1 hour to completely modify the device adaptation template version that can be synchronized. Therefore, the basic time interval is set to 15 minutes and the preset time range is 1 hour.
[0104] When the device adaptation template is updated for the first time within the preset time range, it is determined that the synchronization trigger time interval is equal to the preset basic time interval. When the device adaptation template is updated twice or more within the preset time range, the number of updates of the device adaptation template within the preset time range is obtained, and the synchronization trigger time interval is obtained based on the number of updates and the basic time interval, wherein the calculation formula of the synchronization trigger time interval is as follows:
[0105]
[0106] Among them, T sync is the synchronization trigger time interval; T base is the basic time interval; α is the current adjustment factor; Δt is the average update time interval of the device adaptation template within the preset time range; β is the current weight factor; i is the index, which is a positive integer representing the serial number of the device adaptation template update within the preset time range, 1≤i≤I; I is the number of updates to the device adaptation template within the preset time range; M i S is the modification amount of the device adaptation template for the i-th update within the preset time range, which can be the number of modified characters or attribute items, etc.; i is the mark value of the ith update of the device adaptation template within the preset time range. If after the ith update, the updated device adaptation template is marked to be synchronized, then S i =1, if no synchronization mark is performed, then S i =0.
[0107] In the above formula, Used to reflect the frequency of device adaptation template updates. The higher the frequency, the longer the synchronization trigger interval. Used to reflect the importance and marking status of the device adaptation template update. If an update is marked as "pending synchronization", the synchronization trigger interval will be shortened.
[0108] The current adjustment factor is used to control the sensitivity of the synchronization trigger time interval and is dynamically adjusted according to the importance of the template change and the historical change mode. Specifically, the calculation formula of the current adjustment factor is as follows:
[0109]
[0110] Where n is the sequence number of the current adjustment operation of the factor within the preset time range; α n is the adjustment factor after the nth adjustment, α is initially 0.2, that is, when n is equal to 1, α=0.2, and 0.1≤α≤0.5 is required to prevent the calculated synchronization trigger time interval from exceeding the reasonable range. n-1is the adjustment factor after the n-1th adjustment; γ is the preset first smoothing factor.
[0111] The current weight factor is used to balance the impact of frequent small modifications and large-scale modifications. It is dynamically adjusted according to the administrator's behavior pattern and historical change data. Specifically, the calculation formula of the current weight factor is as follows:
[0112]
[0113] In the formula, β n is the weight factor after the nth adjustment, β is initially 0.5, that is, when n is equal to 1, β = 0.5, and 0.3 ≤ β ≤ 0.7 is required to prevent the calculated synchronization trigger time interval from exceeding the reasonable range. n-1 is the weight factor after the n-1th adjustment; δ is the preset second smoothing factor.
[0114] Dynamically adjusting the synchronization trigger time interval can flexibly adjust the synchronization time according to the current status and needs of the system, avoiding resource waste or delays that may be caused by fixed time intervals. Moreover, when the device adaptation template is updated frequently, dynamic adjustment can ensure timely synchronization of the latest status and avoid delays caused by fixed time intervals. This method can adaptively adjust the synchronization frequency according to historical data and current operating status to ensure that the synchronization operation is performed at the best time. Moreover, the formula provides flexibility in adjusting the synchronization frequency by introducing the current adjustment factor and the current weight factor, and can dynamically adjust the synchronization trigger time according to actual conditions. The current adjustment factor and the current weight factor can be adjusted according to the system status, so that the synchronization trigger time interval can adapt to different operating environments and workloads. The formula can also more accurately calculate the appropriate synchronization trigger time interval by considering the modification amount and the tag value.
[0115] In S2-S4, the managed devices deployed in the existing network start up normally and complete initialization after power-on. After selecting the template to be synchronized, the managed devices identify the local version number of the template and build registration information containing their own basic information. Subsequently, based on this registration information, the managed devices initiate a registration request to the unified management platform. After receiving the registration request, the unified management platform will query the template corresponding to the managed device in multiple template sets based on the basic information provided, and feedback the registration success information based on the version number of the template.
[0116] The managed device detects whether the version number carried in the registration success information returned is consistent with the version number of the local template to be synchronized. If the two version numbers are the same, it indicates that the templates in the managed device and the unified management platform are synchronized, so there is no need to send the template to be synchronized to the unified management platform, and the synchronization pending status mark of the template is canceled. If the two version numbers are inconsistent, it means that the templates in the managed device and the unified management platform are not synchronized. At this time, the managed device, as the sender, sends the template to be synchronized to the unified management platform to update the corresponding template set.
[0117] The version number mentioned above is for the entire set of configuration files. As long as one of the configuration files (templates) changes, such as the increase or decrease in the number of files, or the change in the content of a file, the file version number will be updated. It should be noted that this version number is not the file title, but represents the overall change of a group of files, namely the template. Its meaning is consistent with the definition of the managed data version number in the configuration management tool.
[0118] Furthermore, in order to ensure network security, the unified management platform verifies the legitimacy of the managed device after receiving the registration request, including checking the national security certificate or international certificate. Only after the verification is passed, the unified management platform will send the registration success message back to the managed device. If the verification fails, an alarm will be issued. The operation and maintenance personnel will modify the error according to the alarm and then resend the registration request.
[0119] Reference Figure 4 The flow chart of the template set update method shown in the figure shows a method for synchronizing the template to be synchronized, including the following steps:
[0120] S41: converting the template to be synchronized into UTF-8 encoding and UNIX format;
[0121] S42: Sending to a unified management platform based on the converted template to be synchronized, the second device information of the sending end, and the specified service type;
[0122] S43: Filtering out old templates from a plurality of template sets on the unified management platform based on the second device information and the specified service type;
[0123] S44: Use the converted template to be synchronized to replace the old template, and update the corresponding template set index file. The template set index file records the change history of all templates in each template set.
[0124] and path to the file.
[0125] In S41, in order to ensure the consistency of data files when synchronizing between the managed device and the management platform, the template to be synchronized is converted into a text file in UTF-8 encoding and UNIX format. This step involves using an appropriate encoding conversion tool or script to read the template to be synchronized and save it in UTF-8 encoding, while ensuring that the line feed of the template to be synchronized complies with the UNIX standard, that is, only LF (Line Feed) is used as the line terminator. This operation can effectively reduce the compatibility issues between the managed device and the unified management platform.
[0126] In S42, after the template to be synchronized is encoded and formatted, the managed device (i.e., the sending end) will combine its own second device information (such as device model, device version, etc.) and the service type specified by the operation and maintenance personnel, and send this information and the converted template file to the unified management platform. This step is implemented through API calls or specific data transmission protocols to ensure that all necessary information can be correctly encapsulated and transmitted.
[0127] In S43, after receiving the template to be synchronized and the related device information, the unified management platform selects a suitable template set from the multiple template sets stored locally according to the second device information provided. Then, according to the specified business type, the corresponding old template is further selected from the determined template set. This screening process can be achieved by referring to the preset template set index file, because the index file records the change history and storage path of all templates in each template set in detail. Therefore, using the template set index file, the unified management platform can accurately locate and identify specific old template files.
[0128] In S44, once the old template is successfully identified, the unified management platform will replace the old template with the converted template to be synchronized. After the replacement operation is completed, the unified management platform also needs to update the template set index file. The update operation includes adding the storage path and version information of the new template, and marking the old template as replaced or deleted, to ensure that the template set index file can accurately reflect the status of the current template set. This step is crucial for maintaining version control and historical tracking of the template set.
[0129] In S5, the unified management platform receives a parameter set and first device information from any network device through its network interface, wherein the network interface is implemented by setting a listening port on the unified management platform so that the network device can send relevant data through a network protocol (such as HTTP, HTTPS or TCP / IP).
[0130] In S6, the target template set is filtered out from multiple template sets using the first device information and the template set index file. The template set index file records the detailed information of each template set, including the device types and versions they support, so the correct template set can be determined by matching the device information. The target business type is obtained based on the parameter set. The parameter set usually contains information about the nature of the request and the required operation, from which the business type can be extracted, and then the target template is filtered out from the target template set using the target business type and the template set index file. The template set index file not only records the change history of the template set, but also records the templates corresponding to different business types, so specific templates can be further filtered out by business type.
[0131] In S7, the unified management platform uses the target template and parameter set to construct the configuration command. Specifically, the unified management platform parses the target template, replaces the variables in the parameter set with actual values, and generates a complete configuration command. This process uses a template engine or scripting language to dynamically generate configuration commands.
[0132] In S8, the unified management platform sends the constructed configuration commands back to the requesting network devices, and the network devices execute these commands to implement the configuration changes. The unified management platform can also verify the execution results of the configuration commands to ensure that the device configuration has been updated as expected.
[0133] Reference Figure 5 The principle block diagram of the network device configuration method is shown. After the managed device determines the template to be synchronized, it obtains the feedback information of the unified management platform through the registration process, that is, the registration success information, so as to know the version number of the corresponding template stored in the unified management platform. The managed device compares this version number (called V1) with the version number of the local template to be synchronized (called V2) to verify whether the template to be synchronized has been synchronized with the unified management platform. If V1 and V2 are found to be inconsistent, it means that the unified management platform does not yet contain the latest template to be synchronized. At this time, the managed device will encapsulate the template to be synchronized, the second device information and the specified service type into a synchronization message, and send it to the unified management platform to update the template. For any network device (including managed devices), they can request the unified management platform by actively sending parameter sets and first device information. The unified management platform constructs configuration commands in a targeted manner based on this information to complete the configuration change of the network device.
[0134] In summary, the present invention provides a more flexible network equipment configuration method, which entrusts the work of equipment adaptation to personnel who understand the equipment business better. The unified management platform only provides a unified registration mechanism and configuration template update mechanism, reducing the problem of the unified management platform having to be upgraded due to equipment adaptation problems. The upgrade of the unified management platform is changed to only updating the configuration template. It can be applied to SASE and SD-WAN controllers and their management systems to achieve unified management of different networking devices, achieve the purpose of rapid product launch and existing network problem solving, and reduce the workload of developers and existing network maintenance personnel.
[0135] Reference Figure 6 The present disclosure provides a network device configuration system, comprising:
[0136] An update response module 101, configured to select a template to be synchronized from a plurality of updated versions in response to an update request for a device adaptation template;
[0137] A request sending module 102, used for sending a registration request;
[0138] YY+242256P
[0139] The first receiving module 103 is used to receive the returned registration success information;
[0140] The template synchronization module 104 is used to synchronize the template to be synchronized when the registration success information does not contain the version number of the template to be synchronized, so as to update the template set;
[0141] The second receiving module 105 is used to receive a parameter set and first device information sent by any network device;
[0142] A template selection module 106, configured to select a target template from a plurality of template sets based on the parameter set and the first device information;
[0143] A command construction module 107, used to construct a configuration command based on a target template and a parameter set;
[0144] The command sending module 108 is used to send configuration commands to the network device to implement configuration changes on the network device.
[0145] The various variations and specific examples in the network device configuration method provided above are also applicable to the network device configuration system provided in the present disclosure. Through the above detailed description of the network device configuration method, those skilled in the art can clearly understand the implementation method of the network device configuration system. For the sake of brevity of the specification, it will not be described in detail here.
[0146] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.
[0147] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device performs all or part of the steps of the network device configuration method of each embodiment of the present disclosure.
[0148] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.
[0149] like Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 7 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0150] like Figure 7 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0151] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 7A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0152] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the network device configuration method of the embodiment of the present disclosure are executed.
[0153] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0154] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the network device configuration method of each embodiment of the present disclosure are executed.
[0155] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).
[0156] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.
[0157] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.
[0158] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.
[0159] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0160] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0161] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.
[0162] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0163] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A network device configuration method, characterized in that: include: In response to a request for updating a device adaptation template, selecting a template to be synchronized from a plurality of updated versions; Send a registration request; Receive the returned registration success information; When the registration success information does not contain the version number of the template to be synchronized, the template to be synchronized is synchronized to update the template set; Receiving a parameter set and first device information sent by any network device; Based on the parameter set and the first device information, selecting a target template from a plurality of template sets; constructing a configuration command based on the target template and the parameter set; The configuration command is sent to the network device to implement the configuration change of the network device.
2. The network device configuration method according to claim 1, characterized in that: The step of selecting a template to be synchronized from a plurality of updated versions in response to an update request for the device adaptation template comprises: When monitoring that the current version of the device adaptation template is updated, determining whether there is a synchronization instruction; If it exists, the latest version of the device adaptation template is determined as the template to be synchronized; If it does not exist, then the timer is activated to record the timing time; Determine whether the timing time is greater than the synchronization triggering time interval; If it is greater, the timing is stopped and the latest version of the device adaptation template is determined as the template to be synchronized; If not, determining whether the device adaptation template is updated again; If it is updated again, the timer is turned off and it is determined again whether there is a synchronization instruction; If there is no further update, the timer is turned off and the latest version of the device adaptation template is determined as the template to be synchronized.
3. The network device configuration method according to claim 2, characterized in that: The method further comprises: Determining whether the device adaptation template is updated for the first time within a preset time range; If yes, the synchronization triggering time interval is equal to the preset basic time interval; If not, the synchronization triggering time interval is obtained based on the number of updates of the device adaptation template within a preset time range and the basic time interval, wherein the calculation formula of the synchronization triggering time interval is: Among them, T sync is the synchronization triggering time interval; T base is the basic time interval; α is the current adjustment factor; Δt is the average update time interval of the device adaptation template within the preset time range; β is the current weight factor; i is the serial number of the device adaptation template updated within the preset time range, 1≤i≤I; I is the number of updates of the device adaptation template within the preset time range; M i S is the modification amount of the device adaptation template updated for the i-th time within the preset time range; i is the mark value of the i-th update of the device adaptation template within the preset time range. If after the i-th update, the updated device adaptation template is marked to be synchronized, then S i =1, if no synchronization mark is performed, then S i =0.
4. The network device configuration method according to claim 3, characterized in that: The calculation formula of the current adjustment factor is: Where n is the sequence number of the current adjustment operation of the factor within the preset time range; α n is the adjustment factor after the nth adjustment, α n-1 is the adjustment factor after the n-1th adjustment; γ is the preset first smoothing factor.
5. The network device configuration method according to claim 3, characterized in that: The calculation formula of the current weight factor is: Where n is the sequence number of the current adjustment operation of the factor within the preset time range; β n is the weight factor after the nth adjustment, β n-1 is the weight factor after the n-1th adjustment; δ is the preset second smoothing factor.
6. The network device configuration method according to claim 1, characterized in that: The synchronizing process of the template to be synchronized includes: Convert the template to be synchronized into UTF-8 encoding and UNIX format; Sending to the unified management platform based on the converted template to be synchronized, the second device information of the sending end, and the specified service type; Filtering out old templates from a plurality of template sets on a unified management platform based on the second device information and the specified service type; The converted template to be synchronized is used to replace the old template, and the corresponding template set index file is updated. The template set index file is a YY+242256P file that records all templates in each template set. Files with change history and storage paths.
7. The network device configuration method according to claim 6, characterized in that: The selecting a target template from a plurality of template sets based on the parameter set and the first device information includes: Filtering out a target template set from the multiple template sets based on the first device information and the template set index file; Acquire a target service type based on the parameter set; The target template is screened out from the target template set based on the target business type and the template set index file.
8. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the network device configuration method described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the network device configuration method described in any one of claims 1-7.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Network device configuration framework
CN106576054A
Program updating processing method and device
CN114518894A
Data synchronization method and system, gateway device, proxy gateway and storage medium
CN115967722A
Multi-registration center adaptation method and device, electronic equipment and storage medium
CN116155978A
System template maintenance system, and system template maintenance method
JP2016115301A
Cited By
Method and device for collecting webpage content of public network, medium and program product
CN120547165A
Cross-cluster-based configuration synchronization method and device, equipment and medium
CN120658761A