CN112968970B - Configuration information backup method and device and network equipment - Google Patents

Configuration information backup method and device and network equipment Download PDF

Info

Publication number
CN112968970B
CN112968970B CN202110223035.1A CN202110223035A CN112968970B CN 112968970 B CN112968970 B CN 112968970B CN 202110223035 A CN202110223035 A CN 202110223035A CN 112968970 B CN112968970 B CN 112968970B
Authority
CN
China
Prior art keywords
configuration information
bitmap
information
rule table
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110223035.1A
Other languages
Chinese (zh)
Other versions
CN112968970A (en
Inventor
林天宇
李维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPtech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPtech Information Technology Co Ltd filed Critical Hangzhou DPtech Information Technology Co Ltd
Priority to CN202110223035.1A priority Critical patent/CN112968970B/en
Publication of CN112968970A publication Critical patent/CN112968970A/en
Application granted granted Critical
Publication of CN112968970B publication Critical patent/CN112968970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

The invention provides a configuration information backup method, a device and network equipment, relating to the technical field of communication, wherein when the configuration information backup is carried out, whether new rule table item configuration information is issued within a preset time length is monitored; if so, updating bitmap information, and sending the new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect; and when the monitoring result is negative, writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information. Therefore, the performance of the equipment for issuing the configuration information is improved, and the user experience is improved.

Description

Configuration information backup method and device and network equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a configuration information backup method, apparatus, and network device.
Background
The network equipment needs to backup the configuration information of the rule table entry so as to prevent the configuration loss of the equipment under the abnormal conditions of restart, hot plug and the like; the rule table entry refers to an Access Control List (ACL), which is a table entry used for screening network messages, and the screening condition includes a source IP (Internet Protocol) address, a destination IP address, a message port, a message Protocol, and the like of the message. The rule item configuration information which needs to be restored can be stored through a database or a file, the configuration information is stored in the database or written in the file for backup when the rule item configuration information is issued, and the rule item configuration information is issued to the equipment again when the rule item configuration information needs to be restored, so that unnecessary loss is avoided.
The rule table entry configuration information with large order of magnitude, high importance and frequent updating has high requirements on the performance and the safety of equipment for issuing the configuration information. In the existing technical solution, files are usually used to store configuration information with large backup order of magnitude, high importance and frequent update, however, this method still cannot meet the performance requirement of the user on the device issuing the configuration information, and especially under the high-frequency update of the configuration information, the reaction speed of the network device is significantly slowed down, resulting in poor user experience.
Disclosure of Invention
The invention aims to provide a configuration information backup method, a configuration information backup device and network equipment, so as to improve the performance of equipment for issuing configuration information, thereby improving the user experience.
The embodiment of the invention provides a configuration information backup method, which is applied to network equipment stored with bitmap information, wherein the bitmap information is used for indicating the storage position of rule table item configuration information in a configuration file; the method comprises the following steps:
monitoring whether new rule table item configuration information is issued within a preset time length;
when the monitoring result is yes, updating the bitmap information, and issuing the new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect;
and when the monitoring result is negative, writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information.
Further, the step of updating the bitmap information comprises:
setting a first bitmap position corresponding to the new rule table item configuration information to obtain updated bitmap information; wherein the first bitmap is used to indicate a storage location in the configuration file.
Further, after setting the position of the first bitmap corresponding to the new rule table entry configuration information, the method further includes:
setting the position of a second bitmap corresponding to the new rule table item configuration information to obtain updated bitmap information; wherein the second bitmap is used for indicating whether the new rule table item configuration information is successfully written into the configuration file.
Further, the step of writing the first configuration information to be backed up in the network device into the configuration file according to the bitmap information includes:
determining each rule table item configuration information with a second bitmap position of 1 in the bitmap information as the first configuration information to be backed up;
determining a position parameter of the first configuration information in the configuration file according to first bitmap position information corresponding to the first configuration information;
writing the first configuration information into the configuration file in a binary mode according to the position parameters;
and resetting the position of a second bitmap corresponding to the first configuration information in the bitmap information when the writing is successful.
Further, the method further comprises:
when a configuration information deleting instruction is received, second configuration information to be deleted is obtained;
resetting a first bitmap position corresponding to the second configuration information in the bitmap information;
deleting the second configuration information in the content addressable storage to effect deletion of the second configuration information.
Further, the step of monitoring whether to issue new rule table entry configuration information within a preset time length includes:
monitoring whether new rule table item configuration information is issued within a preset time length or not through a timer;
the method further comprises the following steps:
when a restart instruction is received, the timer is closed;
writing first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information;
and restarting the network equipment.
Further, the method further comprises:
reading the bitmap information when a configuration recovery instruction is received;
reading third configuration information to be issued in the configuration file according to the bitmap information;
and sending the third configuration information to the content addressable storage.
The embodiment of the invention also provides a configuration information backup device, which is applied to network equipment stored with bitmap information, wherein the bitmap information is used for indicating the storage position of the rule table item configuration information in the configuration file; the device comprises:
the monitoring module is used for monitoring whether to issue new rule table item configuration information within a preset time length;
an updating module, configured to update the bitmap information and send the new rule table entry configuration information to a content addressable storage on a service board of the network device, so that the new rule table entry configuration information becomes effective when the monitoring result is yes;
and the backup module is used for writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information when the monitoring result is negative.
The embodiment of the present invention further provides a network device, which includes a memory and a processor, where the memory stores a computer program that can run on the processor, and the processor implements the configuration information backup method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the above configuration information backup method.
In the configuration information backup method, device and network equipment provided by the embodiment of the invention, when the configuration information backup is carried out, whether new rule table item configuration information is issued within a preset time is monitored; if so, updating bitmap information, and sending the new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect; and when the monitoring result is negative, writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information. Therefore, when the rule table item configuration information is issued, the configuration information is not written into the configuration file for backup immediately, but is directly issued to the content addressable memory to be effective in the equipment, so that the time spent on issuing the rule table item configuration information is reduced, and the equipment performance for issuing the configuration information is improved; and the rule table item configuration information is stored to the configuration file at regular time, so that the use peak of the equipment can be staggered, the time complexity is low, and the reduction of the equipment performance caused by issuing the rule table item configuration information for many times at high frequency is effectively reduced. Therefore, the configuration information backup method, the configuration information backup device and the network equipment provided by the embodiment of the invention improve the performance of equipment for issuing configuration information, thereby improving the user experience.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a configuration information backup method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a configuration file according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a configuration information backup apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another configuration information backup apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a network device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Files are currently commonly used to store configuration information that is orders of magnitude backed up, of high importance, and frequently updated: when the configuration information is issued, the configuration information is enabled to take effect, and simultaneously, the configuration information is written into a configuration file for backup in real time; when the configuration information is deleted, the configuration information is also deleted from the configuration file in real time; and under the condition of restarting or hot plugging of the equipment, reading the configuration file and transmitting all the configuration information to the equipment from beginning to end.
The configuration information backup method based on the file storage can store the configuration information in real time, and the configuration file is modified each time the configuration information is added, so that the performance of issuing the configuration information is reduced to a certain extent, and particularly under the condition of high-frequency configuration information updating, the reaction speed of network equipment is obviously slowed down, and the user experience is poor. Moreover, if the configuration information is deleted in real time, other useful device information may be deleted by mistake when the device is operated for a long time, in a multi-thread manner, and at a high frequency, and the configuration information may be lost. Therefore, the existing configuration information backup method causes potential safety hazards while reducing the performance of the equipment. Based on this, the embodiment of the invention provides a configuration information backup method, a configuration information backup device and network equipment, which can perform storage backup on configurations with large magnitude, high importance and frequent update with higher performance and higher security.
To facilitate understanding of the embodiment, a detailed description is first given of a configuration information backup method disclosed in the embodiment of the present invention.
The embodiment of the invention provides a configuration information backup method, which is applied to network equipment stored with bitmap information, wherein the bitmap information is used for indicating the storage position of rule table item configuration information in a configuration file. Referring to fig. 1, a schematic flow chart of a configuration information backup method is shown, and the method mainly includes the following steps S102 to S106:
step S102, monitoring whether new rule table item configuration information is issued within a preset time length.
The preset duration can be set according to actual requirements, and is not limited here. In specific implementation, the thread can be independently started, and a timer is set in the thread to monitor the network device.
And step S104, when the monitoring result is yes, updating the bitmap information, and sending the new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect.
And resetting the time of the timer after finding that the new rule table item configuration information is issued. When the device issues the rule table configuration information, the configuration information is stored in the memory, and the configuration information may be issued to the kernel of the device first. And setting bitmap information in the kernel, and setting the bitmap position corresponding to the corresponding configuration information. And then, the configuration information is issued to a content addressable memory on the service board card by the kernel, so that the issued configuration information can take effect immediately, rather than writing the configuration information into a configuration file in real time for storage and backup.
In some possible embodiments, the first bitmap position corresponding to the new rule table entry configuration information may be set to obtain updated bitmap information; wherein the first bitmap is used for indicating the storage location of the new rule table entry configuration information in the configuration file.
Further, in order to reduce the operation of repeatedly writing the configuration file and improve the efficiency of writing the configuration file, another bitmap (second bitmap) may be used to indicate whether the rule table entry configuration information stored in the memory is consistent with the corresponding rule table entry configuration information in the configuration file. Based on this, after setting the first bitmap position corresponding to the new rule table entry configuration information, the method further includes: setting the position of a second bitmap corresponding to the new rule table item configuration information to obtain updated bitmap information; wherein, the second bitmap is used for indicating whether the new rule table item configuration information is successfully written into the configuration file.
For example, when the rule table configuration information is updated, the corresponding position is set to 1, after the rule table configuration information is successfully written into the configuration file, the corresponding position is set to 0, and only the rule table configuration information corresponding to the bitmap with 1 set is written into the configuration file.
And step S106, writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information when the monitoring result is negative.
For the rule table item configuration information which is large in storage and recovery magnitude, high in importance and frequent in updating, if the rule table item configuration information is stored in a configuration file in a binary mode, the storage performance and the reading performance of the rule table item configuration information are far higher than those of a text file, the size of the binary file is fixed, and the rule table item configuration information can be quickly positioned to the position of certain configuration information in the configuration file, so that the rule table item configuration information can be stored and backed up based on the binary file for file storage.
Based on this, in some possible embodiments, the step S106 may be implemented by the following process: determining each rule table item configuration information with a second bitmap position of 1 in the bitmap information as first configuration information to be backed up; determining a position parameter of the first configuration information in the configuration file according to the first bitmap position information corresponding to the first configuration information; writing the first configuration information into a configuration file in a binary mode according to the position parameter; and resetting the position of the second bitmap corresponding to the first configuration information in the bitmap information when the writing is successful.
In the concrete implementation, if no new rule item configuration information is issued to the equipment within a certain time, the rule item configuration information and bitmap information which need to be configured and restored in the equipment are written into the corresponding positions in the configuration file by using a binary system. Because the size of each rule table item configuration information of the same type is fixed in a binary system, the position parameters of the configuration information in the configuration file can be directly and accurately calculated through a fixed formula according to bitmap information, the corresponding storage position can be positioned according to the time complexity of O (1) and written, and the rule table item configuration information of different types is written in different configuration files.
In the embodiment of the invention, when the configuration information is backed up, whether new rule table item configuration information is issued within a preset time length is monitored; when the monitoring result is yes, updating bitmap information, and issuing new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect; and when the monitoring result is negative, writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information. Therefore, when the rule table item configuration information is issued, the configuration information is not written into the configuration file for backup immediately, but is directly issued to the content addressable memory to be effective in the equipment, so that the time spent on issuing the rule table item configuration information is reduced, and the equipment performance for issuing the configuration information is improved; and the rule table item configuration information is stored to the configuration file at regular time, so that the peak of the use of the equipment can be staggered, the time complexity is low, and the reduction of the equipment performance caused by issuing the rule table item configuration information for many times at high frequency is effectively reduced. Therefore, the configuration information backup method provided by the embodiment of the invention improves the performance of the equipment for issuing the configuration information, thereby improving the user experience.
Further, the method further comprises: when a configuration information deleting instruction is received, second configuration information to be deleted is obtained; resetting a first bitmap position corresponding to the second configuration information in the bitmap information; deleting the second configuration information in the content addressable storage to effect deletion of the second configuration information.
In the concrete implementation, if the operation of deleting the rule table entry configuration information is being performed during the file writing, the bitmap corresponding to the corresponding configuration information is set again (namely reset) in the kernel, and then the corresponding configuration information in the content addressable memory is deleted, so that the deleted configuration information is immediately effective, but the corresponding rule table entry configuration information stored in the configuration file is not required to be deleted.
Because the equipment does not delete the corresponding information in the configuration file when deleting the rule table entry configuration information, and only sets the bitmap, the content loss or errors possibly caused by frequently modifying the file are reduced, the file reading and writing times are reduced, the performance optimization is brought, and the accuracy of the configuration file information is improved.
Optionally, a timer is used to monitor whether to issue new rule table entry configuration information within a preset time duration, and based on this, the method further includes: when a restart instruction is received, closing a timer; writing first configuration information to be backed up in the network equipment into a configuration file according to the bitmap information; and restarting the network equipment.
After the device receives the restart instruction, the device does not directly execute the shutdown restart operation, but closes the timer, invokes a function of storing the rule table entry configuration information (i.e., a configuration storage function), updates the configuration information and bitmap information in the device into a configuration file, and after the rule table entry configuration information is stored and backed up, the device executes the subsequent shutdown restart operation.
The configuration storage function is directly called before the rule table item configuration information is restarted, so that the problem that the important rule table item configuration information is lost due to the fact that the rule table item configuration information is not stored timely because the timer does not run out can be solved, and the safety performance is improved.
Further, the method further comprises: reading bitmap information when a configuration recovery instruction is received; reading third configuration information to be issued in the configuration file according to the bitmap information; and sending the third configuration information to the content addressable storage.
After the equipment is restarted or the card is unplugged, and the like, configuration recovery based on the whole machine or the single card is required to be executed, at this time, bitmap information of the rule table item configuration information is read first, similarly, the position information of the rule table item configuration information in the configuration file can be accurately calculated through the same calculation formula according to the bitmap information, then the configuration information of the corresponding position is accurately positioned and read according to the time complexity of O (1), and the read rule table item configuration information is re-issued to a content addressable memory of the equipment, so that the corresponding configuration information is enabled to take effect again on the equipment.
When the rule table item configuration is recovered, the mode of acquiring the position of the rule table item configuration information to be issued in the configuration file from the bitmap information can prevent the issuing of the unnecessary configuration information and improve the authenticity of the equipment configuration information.
Further, a fixed length version number may be added to the header of the configuration file to determine the version of the configuration file. When the format or meaning of the rule field in the configuration file is changed, the version number is updated. The way in which all earlier versions are parsed can be retained by the software program so that all earlier versions of the configuration file can be correctly identified. When the device is started, if the version of the current configuration file is not the latest version, the current configuration file can be converted into the format of the latest version so as to facilitate the subsequent configuration update.
In order to facilitate understanding of location of configuration information in a configuration file, an embodiment of the present invention further provides an example of a configuration file, and referring to a schematic diagram of a configuration file shown in fig. 2, where a version number is 4, and a single rule entry configuration information is 152, a position of the 1 st rule entry configuration information in the configuration file is 4, a position of the 2 nd rule entry configuration information in the configuration file is 152 × 1+4, and similarly, a position of the n-th rule entry configuration information in the configuration file is 152 × (n-1) +4.
The operations provided by the embodiment of the invention aim to reduce the times of reading and writing files, extend the performance pressure of the equipment according to time, greatly improve the safety performance while improving the performance, and have no influence on the normal function of the equipment.
To sum up, the method for backing up configuration information based on file storage according to the embodiment of the present invention first sets a bitmap and a distribution logic when distributing rule table entry configuration information, and writes configuration information to a configuration file for storage at regular time after the rule table entry configuration information is frequently distributed; when deleting the rule table item configuration information, not deleting the configuration information in the configuration file, only setting a bitmap, and checking the bitmap before operating the file; the position of the configuration information in the configuration file is calculated through the bitmap information and the fixed formula, the time complexity is in a constant level, the times of reading and writing the file are greatly reduced, and the performance and the safety of storage backup and recovery of the rule table item configuration information which is large in order of magnitude, high in importance and frequent in updating are effectively improved.
Corresponding to the above configuration information backup method, an embodiment of the present invention further provides a configuration information backup apparatus, where the apparatus is applied to a network device that stores bitmap information, and the bitmap information is used to indicate a storage location of rule table entry configuration information in a configuration file. Referring to fig. 3, a configuration information backup apparatus is shown, which includes:
the monitoring module 32 is configured to monitor whether to issue new rule table configuration information within a preset duration;
an updating module 34, configured to update the bitmap information and send the new rule table entry configuration information to a content addressable storage on a service board of the network device, so that the new rule table entry configuration information becomes effective when the monitoring result is yes;
and the backup module 36 is configured to, when the monitoring result is negative, write the first configuration information to be backed up in the network device into the configuration file according to the bitmap information.
In the embodiment of the invention, when the configuration information is backed up, whether new rule table item configuration information is issued within a preset time length is monitored; when the monitoring result is yes, updating bitmap information, and issuing new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect; and when the monitoring result is negative, writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information. Therefore, when the rule table item configuration information is issued, the configuration information is not written into the configuration file for backup immediately, but is directly issued to the content addressable memory to be effective in the equipment, so that the time spent on issuing the rule table item configuration information is reduced, and the equipment performance for issuing the configuration information is improved; and the rule table item configuration information is stored to the configuration file at regular time, so that the use peak of the equipment can be staggered, the time complexity is low, and the reduction of the equipment performance caused by issuing the rule table item configuration information for many times at high frequency is effectively reduced. Therefore, the configuration information backup device provided by the embodiment of the invention improves the performance of the equipment for issuing the configuration information, thereby improving the user experience.
Further, the update module 34 is specifically configured to: setting a first bitmap position corresponding to the new rule table item configuration information to obtain updated bitmap information; wherein the first bitmap is used for indicating the storage location of the new rule table entry configuration information in the configuration file.
Further, the update module 34 is further configured to: setting the position of a second bitmap corresponding to the new rule table item configuration information to obtain updated bitmap information; wherein the second bitmap is used for indicating whether the new rule table entry configuration information is successfully written into the configuration file.
Further, the backup module 36 is specifically configured to: determining each rule table item configuration information with a second bitmap position of 1 in the bitmap information as first configuration information to be backed up; determining a position parameter of the first configuration information in the configuration file according to the first bitmap position information corresponding to the first configuration information; writing the first configuration information into a configuration file in a binary mode according to the position parameter; and when the writing is successful, resetting the position of a second bitmap corresponding to the first configuration information in the bitmap information.
Further, referring to the schematic structural diagram of another configuration information backup apparatus shown in fig. 4, on the basis of fig. 3, the apparatus further includes a deleting module 42, configured to, when receiving a configuration information deleting instruction, obtain second configuration information to be deleted; resetting a first bitmap position corresponding to the second configuration information in the bitmap information; deleting the second configuration information in the content addressable storage to effect deletion of the second configuration information.
Further, the monitoring module 32 is specifically configured to: monitoring whether new rule table item configuration information is issued within a preset time length or not through a timer; based on this, as shown in fig. 4, the apparatus further includes a restart module 44, configured to close the timer when receiving a restart instruction; writing first configuration information to be backed up in the network equipment into a configuration file according to the bitmap information; and restarting the network equipment.
Further, as shown in fig. 4, the apparatus further includes a recovery module 46, configured to read bitmap information when receiving a configuration recovery instruction; reading third configuration information to be issued in the configuration file according to the bitmap information; and sending the third configuration information to the content addressable memory.
The device provided by the embodiment has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
Referring to fig. 5, an embodiment of the present invention further provides a network device 100, including: the device comprises a processor 50, a memory 51, a bus 52 and a communication interface 53, wherein the processor 50, the communication interface 53 and the memory 51 are connected through the bus 52; the processor 50 is arranged to execute executable modules, such as computer programs, stored in the memory 51.
The Memory 51 may include a Random Access Memory (RAM) or a non-volatile Memory (NVM), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 53 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 52 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
The memory 51 is used for storing a program, the processor 50 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 50, or implemented by the processor 50.
The processor 50 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 50. The Processor 50 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 51, and the processor 50 reads the information in the memory 51 and completes the steps of the method in combination with the hardware thereof.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the configuration information backup method described in the foregoing method embodiment. The computer-readable storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In all examples shown and described herein, any particular value should be construed as merely exemplary, and not as a limitation, and thus other examples of example embodiments may have different values.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some communication interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The configuration information backup method is characterized by being applied to network equipment which stores bitmap information, wherein the bitmap information is used for indicating the storage position of rule table item configuration information in a configuration file; the method comprises the following steps:
monitoring whether new rule table item configuration information is issued within a preset time length;
if so, updating the bitmap information, and sending the new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect;
and when the monitoring result is negative, writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information.
2. The method for backing up configuration information according to claim 1, wherein the step of updating the bitmap information comprises:
setting the position of a first bitmap corresponding to the new rule table item configuration information to obtain updated bitmap information; wherein the first bitmap is used to indicate a storage location in the configuration file.
3. The method for backing up configuration information according to claim 2, wherein after setting the first bitmap location corresponding to the new rule table entry configuration information, the method further comprises:
setting the position of a second bitmap corresponding to the new rule table item configuration information to obtain updated bitmap information; wherein the second bitmap is used for indicating whether the new rule table item configuration information is successfully written into the configuration file.
4. The method for backing up configuration information according to claim 1, wherein the step of writing the first configuration information to be backed up in the network device into the configuration file according to the bitmap information comprises:
determining each rule table item configuration information with a second bitmap position of 1 in the bitmap information as the first configuration information to be backed up;
determining a position parameter of the first configuration information in the configuration file according to first bitmap position information corresponding to the first configuration information;
writing the first configuration information into the configuration file in a binary mode according to the position parameters;
and resetting the position of a second bitmap corresponding to the first configuration information in the bitmap information when the writing is successful.
5. The method for backing up configuration information according to claim 1, wherein the method further comprises:
when a configuration information deleting instruction is received, second configuration information to be deleted is obtained;
resetting a first bitmap position corresponding to the second configuration information in the bitmap information;
deleting the second configuration information in the content addressable storage to effect deletion of the second configuration information.
6. The method for backing up configuration information according to claim 1, wherein the step of monitoring whether to issue new rule table entry configuration information within a preset time period comprises:
monitoring whether new rule table item configuration information is issued within a preset time length or not through a timer;
the method further comprises the following steps:
when a restart instruction is received, closing the timer;
writing first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information;
restarting the network device.
7. The method for backing up configuration information according to claim 1, wherein the method further comprises:
reading the bitmap information when a configuration recovery instruction is received;
reading third configuration information to be issued in the configuration file according to the bitmap information;
and sending the third configuration information to the content addressable storage.
8. The configuration information backup device is applied to network equipment which stores bitmap information, wherein the bitmap information is used for indicating the storage position of rule table item configuration information in a configuration file; the device comprises:
the monitoring module is used for monitoring whether to issue new rule table item configuration information within a preset time length;
the updating module is used for updating the bitmap information and sending the new rule table item configuration information to a content addressable memory on a service board card of the network equipment so as to enable the new rule table item configuration information to take effect when the monitoring result is positive;
and the backup module is used for writing the first configuration information to be backed up in the network equipment into the configuration file according to the bitmap information when the monitoring result is negative.
9. A network device comprising a memory, a processor, a computer program being stored in the memory and being executable on the processor, wherein the processor implements the method of any of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, is adapted to carry out the method of any one of claims 1-7.
CN202110223035.1A 2021-02-26 2021-02-26 Configuration information backup method and device and network equipment Active CN112968970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110223035.1A CN112968970B (en) 2021-02-26 2021-02-26 Configuration information backup method and device and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110223035.1A CN112968970B (en) 2021-02-26 2021-02-26 Configuration information backup method and device and network equipment

Publications (2)

Publication Number Publication Date
CN112968970A CN112968970A (en) 2021-06-15
CN112968970B true CN112968970B (en) 2023-04-07

Family

ID=76277530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110223035.1A Active CN112968970B (en) 2021-02-26 2021-02-26 Configuration information backup method and device and network equipment

Country Status (1)

Country Link
CN (1) CN112968970B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116866965A (en) * 2022-03-28 2023-10-10 华为技术有限公司 Backup method, communication device and communication system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1486023A (en) * 2002-09-28 2004-03-31 华为技术有限公司 Method for serially implementing data backup of multiple device
CN102110032A (en) * 2011-02-23 2011-06-29 杭州海康威视数字技术股份有限公司 Method and device for improving reliability of configuration file
CN102137016A (en) * 2011-03-17 2011-07-27 华为技术有限公司 Network address translation table entry hot backup method and device
JP2018182582A (en) * 2017-04-17 2018-11-15 日本電信電話株式会社 Configuration management device, configuration management system, and configuration management method
CN110888603A (en) * 2019-11-27 2020-03-17 深圳前海环融联易信息科技服务有限公司 High-concurrency data writing method and device, computer equipment and storage medium
CN110912977A (en) * 2019-11-15 2020-03-24 北京浪潮数据技术有限公司 Configuration file updating method, device, equipment and storage medium
CN111382013A (en) * 2020-03-20 2020-07-07 平安科技(深圳)有限公司 Method and device for automatically adjusting initiation time of timing backup operation

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9122643B2 (en) * 2005-12-08 2015-09-01 Nvidia Corporation Event trigger based data backup services
CN104881336A (en) * 2015-05-22 2015-09-02 北京奇虎科技有限公司 Data backup method and device
CN109032839A (en) * 2018-06-27 2018-12-18 郑州云海信息技术有限公司 A kind of cloud host backup method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1486023A (en) * 2002-09-28 2004-03-31 华为技术有限公司 Method for serially implementing data backup of multiple device
CN102110032A (en) * 2011-02-23 2011-06-29 杭州海康威视数字技术股份有限公司 Method and device for improving reliability of configuration file
CN102137016A (en) * 2011-03-17 2011-07-27 华为技术有限公司 Network address translation table entry hot backup method and device
JP2018182582A (en) * 2017-04-17 2018-11-15 日本電信電話株式会社 Configuration management device, configuration management system, and configuration management method
CN110912977A (en) * 2019-11-15 2020-03-24 北京浪潮数据技术有限公司 Configuration file updating method, device, equipment and storage medium
CN110888603A (en) * 2019-11-27 2020-03-17 深圳前海环融联易信息科技服务有限公司 High-concurrency data writing method and device, computer equipment and storage medium
CN111382013A (en) * 2020-03-20 2020-07-07 平安科技(深圳)有限公司 Method and device for automatically adjusting initiation time of timing backup operation

Also Published As

Publication number Publication date
CN112968970A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
US10817386B2 (en) Virtual machine recovery method and virtual machine management device
CN103518191A (en) Upgrade method, intelligent terminal and upgrade system
CN113626256B (en) Virtual machine disk data backup method, device, terminal and storage medium
CN112182010B (en) Dirty page refreshing method and device, storage medium and electronic equipment
CN112015447B (en) System updating method and device of electronic equipment, electronic equipment and storage medium
CN112968970B (en) Configuration information backup method and device and network equipment
CN108509322B (en) Method for avoiding excessive return visit, electronic device and computer readable storage medium
CN112637284A (en) Redo log storage method and device, electronic device and storage medium
US9377966B2 (en) Method and apparatus for efficiently processing storage commands
CN110069217B (en) Data storage method and device
CN116991328B (en) Volume formatting control method, device, system, equipment and medium of disk array
CN108664255B (en) Software upgrading method and device
US20190073134A1 (en) Methods for resetting a flash memory device and apparatuses using the same
CN113691845A (en) Power-off protection method for partition upgrading of digital set-top box
US20150249708A1 (en) System and method for asynchronous replication of a storage in a computing environment
CN104572350A (en) Method and device for processing metadata
US8935494B2 (en) Backing up an image in a computing system
CN115586871B (en) Cloud computing scene-oriented data additional writing method, device, equipment and medium
CN112269583B (en) Method for processing equipment operation abnormal file upgrade, server and storage medium
TWI480799B (en) Method and equipment for upadating firmware of embedded system
US20220129198A1 (en) Data updates for controllers
JP6121928B2 (en) Communication device and data management method
CN116302681A (en) File management method, device, equipment and medium of in-vitro diagnosis equipment
CN114265603A (en) System upgrading method and device based on asymmetric partition and electronic equipment
CN117149487A (en) Method, device, equipment and storage medium for determining data loss

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant