WO2022253125A1 - Data recovery method and device, and storage medium - Google Patents

Data recovery method and device, and storage medium Download PDF

Info

Publication number
WO2022253125A1
WO2022253125A1 PCT/CN2022/095527 CN2022095527W WO2022253125A1 WO 2022253125 A1 WO2022253125 A1 WO 2022253125A1 CN 2022095527 W CN2022095527 W CN 2022095527W WO 2022253125 A1 WO2022253125 A1 WO 2022253125A1
Authority
WO
WIPO (PCT)
Prior art keywords
backed
configuration data
network element
check code
data
Prior art date
Application number
PCT/CN2022/095527
Other languages
French (fr)
Chinese (zh)
Inventor
张永
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2022253125A1 publication Critical patent/WO2022253125A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the present disclosure relates to the technical field of communications, and in particular to a data recovery method, device and storage medium.
  • network management equipment manages a large number of network elements.
  • the function of backing up and restoring network element configuration data is an important function required for network element management and daily maintenance. Backup time, network element identification and other information are stored in categories.
  • Backup time, network element identification and other information are stored in categories.
  • the existing backup recovery mechanism needs to be strengthened in terms of security. That is, when uploading and downloading backup data files, due to network security factors, the backup data may be tampered by the attacker during the transmission process, or part of the data is lost due to network reasons, and the backup data files stored on the network management server may also be maliciously tampered by the attacker , or the content of the file has been changed by mistake. If the modified configuration data is restored to the network element, it will seriously affect the service of the network element and cause extremely bad effects. Therefore, improving the security of network element configuration data is an urgent problem to be solved at present.
  • the disclosure proposes a data recovery method, network management equipment and storage media, aiming at improving the security of network element configuration data recovery.
  • an embodiment of the present disclosure provides a data restoration method, including: obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data; The identification information of the network element and the backup configuration data generate a second check code; if the first check code is the same as the second check code, send the second check code to the network element to be restored A second check code and the backed up configuration data, for the network element to be restored to generate a third check code based on the received backed up configuration data and the identification information, if the third check code is the same as the backed up configuration data If the second check code is the same, perform data recovery according to the backed up configuration data.
  • an embodiment of the present disclosure further provides a data recovery method, including: acquiring a data recovery command sent by a network management device, the data recovery command including a second check code; Downloading the backed up configuration data in the management device; generating a third check code according to the identification information of the network element and the downloaded backed up configuration data; if the second check code is the same as the third check code, then Perform data recovery based on the downloaded backup configuration data.
  • an embodiment of the present disclosure further provides a network management device, the network management device includes a processor, a memory, a computer program stored in the memory and executable by the processor, and used to implement the A data bus connecting and communicating between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any data recovery method provided by the embodiments of the present disclosure are realized.
  • an embodiment of the present disclosure further provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to implement the steps of any one of the network element configuration data methods provided by the embodiments of the present disclosure.
  • FIG. 1 is a schematic flowchart of a data recovery method provided by an embodiment of the present disclosure
  • Fig. 2 is a schematic flow chart of the sub-steps of the data recovery method in Fig. 1;
  • FIG. 3 is a schematic flowchart of another data recovery method provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart of another data recovery method provided by an embodiment of the present disclosure.
  • Fig. 5 is a schematic structural block diagram of a network management device provided by an embodiment of the present disclosure.
  • Embodiments of the present disclosure provide a data restoration method, a network management device, and a storage medium.
  • the data recovery method can be applied to a network management device, and the network management device can be a server, a notebook computer, a desktop computer, a personal digital assistant, and the like.
  • FIG. 1 is a schematic flowchart of a data recovery method provided by an embodiment of the present disclosure.
  • the data recovery method includes steps S101 to S103.
  • Step S101 Obtain the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data.
  • the network element is a device managed by the network management device.
  • the network element can be a base station, router, switch, server, etc.
  • the network management device can receive the configuration data of the network element, back up and store the configuration data, and the network management device can also send the configuration data to the network element.
  • the status identifier of each network element is obtained, and the status identifier information includes a first identifier or a second identifier, the first identifier is used to indicate that the network element is in a fault state, and the second identifier is used to indicate that the status of the network element is in the Normal state: determine the network element corresponding to the first identifier as the network element to be restored, and obtain the backed up configuration data of the network element to be restored from the backup database.
  • the first flag may be a high level signal
  • the second flag may be a low level signal.
  • the network management device acquires the states of network element 1, network element 2, network element 3, network element 4, network element 5, network element 6, network element 7, network element 8, network element 9 and network element 10 Identification information, wherein the status identification information of network element 1 is the second identification information, the status identification information of network element 2 is the first identification information, the status identification information of network element 3 is the second identification information, and the status identification information of network element 4 is the second identification information
  • the identification information, the status identification information of network element 5 is the second identification information
  • the status identification information of network element 6 is the second identification information
  • the status identification information of network element 7 is the first identification information
  • the status identification information of network element 8 is the second identification information
  • the state identification information of network element 9 is the second identification information
  • the state identification information of network element 10 is the second identification information
  • the method of obtaining the backed up configuration data of the network element to be restored from the backup database may be: obtain the backed up duration of each backed up configuration data of the network element to be restored in the backup database; obtain from the backup database The backed up configuration data with the shortest backed up time.
  • the backed-up configuration data of the network element to be restored in the backup database includes backed-up configuration data A, backed-up configuration data B, backed-up configuration data C, backed-up configuration data D, and backed-up configuration data E, wherein, The backup distance of backed up configuration data A is 5 days, the backup distance of backed up configuration data B is 8 days, the backup distance of backed up configuration data C is 10 days, and the backup distance of backed up configuration data 12 is 5 days days, the backup distance of the backed up configuration data E is 15 days at that time, according to the backed up time of each backed up configuration data, it can be determined that the backed up time of the backed up configuration data A is the shortest, then the backed up configuration data A is used as the network to be restored Meta restore configuration data.
  • the method of obtaining the backed-up configuration data of the network element to be restored from the backup database may be: obtaining all the backed-up configuration data of the network element to be restored from the backup database; selecting any A backed up configuration data.
  • the network element to be restored includes the backed up configuration data 1, the backed up configuration data 2, the backed up configuration data 3, the backed up configuration data 4 and the backed up configuration data 5, and the backed up configuration data 3 is used as the network element to be restored restore configuration data.
  • the way to obtain the backed up configuration data of the network element to be restored may be: display the network element restoration page, and the network element restoration page includes the identification information of the network element to be restored in the fault state; The selected identification information on the page, and display the list of backed up configuration data of the network element to be restored corresponding to the selected identification information; obtain the file identification selected by the user in the list of backed up configuration data, and obtain the corresponding file identification from the backup database The backed up configuration data of .
  • the identification information and the file identification of the network element to be restored can be set according to the actual situation, which is not specifically limited in this embodiment of the present disclosure.
  • the identification information of the network element to be restored may be the IP address of the network element to be restored, and the file identifier may be a file name.
  • the identification information of the network element to be restored is displayed on the network element restoration page, the identification information is the IP address of the network element to be restored, the IP address of the network element to be restored selected by the user is obtained, and the IP address is queried from the backup database
  • the list of backed up configuration data corresponding to the address, the list of backed up configuration data includes file 1, file 2, file 3, file 4 and file 5, and the file ID selected by the user in the list of backed up configuration data is obtained as file 4, then from The backed up configuration data corresponding to file 4 is obtained from the backup database, and the backed up configuration data is used as the restored configuration data of the network element to be restored.
  • the page showing network element recovery may be displayed on a display screen set on the network management device or a display independent from the network management device, and the display independent from the network management device may include a mobile phone, a tablet computer and a personal computer, etc., the display screen Including LED display, OLED display, LCD display and so on.
  • the first check code generated when backing up the backed up configuration data is acquired, wherein the first check code is generated according to the identification information of the network element to be restored and the configuration data to be backed up.
  • Step S102 Generate a second check code according to the identification information of the network element to be restored and the backed up configuration data.
  • the identification information includes at least one of the equipment serial number and the Mac address (Media Access Control Address) of the network element to be restored.
  • the Mac address Media Access Control Address
  • it may also include other information, which is not specifically limited in this embodiment of the present disclosure.
  • step S102 includes sub-steps S1021 to S1022.
  • Sub-step S1021 splicing the identification information of the network element to be restored and the backed up configuration data to obtain spliced configuration data.
  • the identification information of the network element to be restored and the backed up configuration data are spliced to obtain the spliced configuration data.
  • the splicing method can be set according to the actual situation, which is not specifically limited in the embodiments of the present disclosure.
  • the identification information is spliced after the backed up configuration data, or the backed up configuration data is spliced after the previous identification information.
  • the identification information of the network element to be restored is 12345QA
  • the backed up configuration data is 789456QWER
  • the identification information is spliced before the backed up configuration data
  • the spliced configuration data obtained is 12345QA789456QWER.
  • the identification information of the network element to be restored is 12345QA
  • the backed up configuration data is 789456QWER
  • the backed up configuration data is spliced before the identification information
  • the spliced configuration data is 789456QWER12345QA.
  • Sub-step S1022 Generate a second check code based on the preset check code generation algorithm and the concatenated configuration data.
  • the preset check code generation algorithm is a preset check code generation algorithm
  • the check code generation algorithm includes a message digest algorithm (MD5Message-Digest Algorithm, MD5), a secure hash algorithm 1 (Secure Hash Algorithm 1, SHA-1), cyclic redundancy check (Cyclic Redundancy Check 32, CRC32), and of course other check code generation algorithms, which are not specifically limited in this disclosure.
  • a preset check code generation algorithm is used to perform operations on the concatenated configuration data to obtain the second check code.
  • the spliced configuration data is 789456QWER12345QA
  • the spliced configuration data 789456QWER12345QA is operated by a preset check code generation algorithm to obtain a second check code of 741QAZ.
  • Step S103 if the first check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored, for the network element to be restored based on the received backed up configuration data and
  • the identification information generates a third check code, and if the third check code is the same as the second check code, data recovery is performed according to the backed up configuration data.
  • the backed up configuration data is valid configuration data.
  • the backed up configuration data is discarded, so as to prevent wrong configuration data from being transmitted to the network element to be restored, and improve the security and accuracy of network element configuration data restoration.
  • a data recovery instruction is sent to the network element to be restored, wherein the data recovery instruction includes the second check code, the file transfer protocol (File transfer protocol) Transfer Protocol (FTP) address or Secure File Transfer Protocol (Secure File Transfer Protocol, SFTP) address, user name and password, and the file storage location of the backed up configuration data.
  • the network element to be restored finds the network management device according to the FTP address or SFTP address. Access the network management device through the user name and password, and find and download the backed up configuration data according to the file storage location of the backed up configuration data.
  • the manner of sending the data restoration instruction to the network element to be restored may be selected according to the actual situation, which is not specifically limited in the present disclosure.
  • the way of sending the data recovery instruction can be sent through Simple Network Management Protocol (Simple Network Management Protocol, SNMP) or Network Configuration Protocol (NETCONF).
  • a third check code is generated according to the received backed up configuration data and the identification information of the network element to be restored, if the third check code is the same as If the second check code is different, it is determined that the received backed up configuration data has been tampered with or lost during transmission, and the received backed up configuration data will be discarded. If the third check code is different from the second check code codes are the same, then it is determined that the received backed up configuration data is valid configuration data, and data recovery is performed according to the backed up configuration data.
  • the method of generating the third verification code according to the received backed-up configuration data and the identification information of the network element to be restored may be: performing a check on the received backup configuration data and the identification information of the network element to be restored splicing, obtaining the spliced backed up configuration data, and generating a third check code based on the preset check code generation algorithm and the spliced backed up configuration data.
  • the third check code can be accurately obtained by operating the spliced backup configuration data through a preset check code generation algorithm.
  • the data recovery method further includes steps S104 to S106.
  • Step S104 obtaining the configuration data to be backed up and the fourth verification code sent by the network element to be backed up, the fourth verification code is generated by the network element to be backed up according to the configuration data to be backed up stored by itself and the identification information of the network element to be backed up .
  • the network management device sends a data backup command to the network element to be backed up.
  • the data backup command includes an FTP address or SFTP address, user name and password. and the identification information of the network element to generate a fourth check code.
  • the network element to be backed up finds the network management device according to the FTP address or SFTP address, accesses the network management device according to the user name and password, sends the configuration data to be backed up to the network management device, and sends the fourth verification code to the network management device , where sending the data backup command and sending the fourth check code can be sent through SNMP or NETCONF.
  • the fourth verification code may be generated by splicing the stored configuration data to be backed up and the identification information of the network element to obtain
  • the spliced configuration data to be backed up is based on the preset check code generation algorithm and the spliced configuration data to be backed up to generate a fourth check code, and the spliced configuration data to be backed up is processed by the preset check code generation algorithm By performing the operation, the fourth check code can be obtained accurately.
  • the configuration data to be backed up and the fourth verification code sent by the network element to be backed up are received, and the configuration data to be backed up and the fourth verification code are obtained.
  • Step S105 generating a fifth check code according to the acquired configuration data to be backed up and the identification information of the network element to be backed up.
  • the obtained configuration data to be backed up and the identification information of network elements to be backed up are spliced to obtain the spliced configuration data to be backed up, and the fifth calibration data is generated based on the preset check code generation algorithm and the spliced configuration data to be backed up.
  • Check code wherein, the preset check code generation algorithm includes at least one of MD5, SHA-1 and CRC32, and the acquired configuration data to be backed up is calculated by the preset check code generation algorithm, which can accurately Get the fifth check code.
  • Step S106 when the fourth check code is the same as the fifth check code, store the configuration data to be backed up and the fifth check code, so as to complete the configuration data backup of the network element to be backed up.
  • the fourth check code is the same as the fifth check code. If the fourth check code is not the same as the fifth check code, it is determined that the configuration data to be backed up has been tampered with or lost during transmission. The acquired configuration data to be backed up is discarded. If the fourth check code is the same as the fifth check code, it is determined that the configuration data to be backed up does not have been tampered with or lost during transmission, the configuration data to be backed up is valid data, and the configuration data to be backed up and the first Five check codes to complete the configuration data backup of the network element to be backed up. By determining whether the fourth check code and the fifth check code are the same, and then determining whether the configuration data to be backed up is tampered with or lost during transmission, the security of the network element backup configuration data is improved.
  • the data recovery method in the above embodiment by obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data; then according to the identification information of the network element to be restored and the backed up configuration data to generate a second check code; if the first check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored, for the network element to be restored based on the received
  • the backed up configuration data and the identification information generate a third check code, and if the third check code is the same as the second check code, data recovery is performed according to the backed up configuration data.
  • the backup configuration data of the network element to be restored and the received backup configuration data are verified by the check code, which can prevent the backup configuration data that has been tampered with or lost data from being used as the recovery data of the network element, and improve the recovery of network element data. security.
  • FIG. 4 is a schematic flowchart of another data recovery method provided by an embodiment of the present disclosure.
  • the method includes steps S201 to S204.
  • Step S201 Obtain a data restoration instruction sent by the network management device, where the data restoration instruction includes a second check code.
  • the data recovery instruction includes a second check code, a file transfer protocol (File Transfer Protocol, FTP) address or a file encryption transfer protocol (Secure File Transfer Protocol, SFTP) address, a user name and password, and the file storage location for backed up configuration data.
  • FTP File Transfer Protocol
  • SFTP file encryption transfer protocol
  • Step S202 downloading the backed up configuration data from the network management device according to the data recovery instruction.
  • the file storage location of the backed-up configuration data to be downloaded is obtained from the data recovery instruction; according to the file storage location, the corresponding backed-up configuration data is downloaded from the network management device.
  • find the network management device according to the FTP address or SFTP address in the data recovery instruction access the network management device through the user name and password, and find and download the corresponding backed up configuration according to the file storage location of the backed up configuration data data.
  • Step S203 generating a third verification code according to the identification information of the network element and the downloaded backed up configuration data.
  • the third check code can be accurately obtained by operating the spliced backup configuration data through a preset check code generation algorithm.
  • Step S204 if the second check code is the same as the third check code, perform data restoration according to the downloaded configuration data that has already been backed up.
  • the splicing sequence of the above data is the same, for example, the splicing manner after configuring the data splicing identification information, or the splicing manner before configuring the data splicing identification information.
  • All check codes are generated using the same algorithm, for example, the check code generation algorithm is CRC32. By setting the order of data splicing to be the same as that of the check code generation algorithm, the generated check codes will be the same.
  • the data recovery command includes the second check code; download the backed up configuration data from the network management device according to the data recovery command; The identification information and the downloaded backed up configuration data are used to generate a third check code; if the second check code is the same as the third check code, data recovery is performed according to the downloaded backed up configuration data.
  • the downloaded backup configuration data is verified by the check code, which can prevent the backup configuration data that has been tampered with or lost data from being used as the recovery data of the network element, and improves the security of network element data recovery.
  • FIG. 5 is a schematic structural block diagram of a network management device provided by an embodiment of the present disclosure.
  • the network management device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus 303, such as an I2C (Inter-integrated Circuit) bus.
  • a bus 303 such as an I2C (Inter-integrated Circuit) bus.
  • the processor 301 is configured to provide calculation and control capabilities, and support the operation of the entire network management device.
  • the processor 301 can be a central processing unit (Central Processing Unit, CPU), and the processor 301 can also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 302 can be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
  • FIG. 5 is only a block diagram of a partial structure related to the disclosed solution, and does not constitute a limitation on the network management device to which the disclosed solution is applied.
  • the specific server can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • the processor is configured to run a computer program stored in the memory, and implement any one of the data recovery methods provided by the embodiments of the present disclosure when executing the computer program.
  • the processor is configured to run a computer program stored in the memory, and implement the following steps when executing the computer program:
  • the processor is configured to, when acquiring the backed-up configuration data of the network element to be restored, implement: acquiring the status identifier of each network element, where the status identifier information includes the first identifier or the second identifier , the first identifier is used to indicate that the network element is in a fault state, and the second identifier is used to indicate that the state of the network element is in a normal state; the state is identified as the network element corresponding to the first identifier is determined as the network element to be restored, and the backup database Obtain the backed up configuration data of the NE to be restored.
  • the processor is configured to, when acquiring the backed-up configuration data of the network element to be restored from the backup database, implement: acquiring each backed-up configuration data of the network element to be restored in the backup database The length of the backup; obtain the backed up configuration data with the shortest backup time from the backup database.
  • the processor is configured to, when acquiring the backed-up configuration data of the network element to be restored, realize: displaying a network element restoration page, where the network element restoration page includes the information of the network element to be restored in a fault state Identification information; obtain the identification information selected by the user in the network element recovery page, and display the list of backed up configuration data of the network element to be restored corresponding to the selected identification information; obtain the file identification selected by the user in the list of backed up configuration data, And obtain the backed up configuration data corresponding to the file identifier from the backup database.
  • the processor is configured to, when generating the second verification code according to the identification information of the network element to be restored and the backed up configuration data, realize: the identification information of the network element to be restored and the backed up configuration data
  • the configuration data is spliced to obtain spliced configuration data; a second check code is generated based on a preset check code generation algorithm and the spliced configuration data.
  • the processor is configured to further implement: acquiring the configuration data to be backed up sent by the network element to be backed up and the fourth check code, where the fourth check code is the configuration to be backed up stored by the network element to be backed up data and the identification information of the network element to be backed up; generate the fifth check code according to the obtained configuration data to be backed up and the identification information of the network element to be backed up; when the fourth check code is the same as the fifth check code, The configuration data to be backed up and the fifth check code are stored to complete the configuration data backup of the network element to be backed up.
  • the network management device by obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data; then according to the identification information of the network element to be restored and the backed up configuration data to generate a second check code; if the first check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored, for the network element to be restored based on the received
  • the backed up configuration data and the identification information generate a third check code, and if the third check code is the same as the second check code, data recovery is performed according to the backed up configuration data.
  • the backup configuration data of the network element to be restored and the received backup configuration data are verified by the check code, which can prevent the backup configuration data that has been tampered with or lost data from being used as the recovery data of the network element, and improve the recovery of network element data. security.
  • An embodiment of the present disclosure also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following: The steps of any data recovery method provided in this disclosure specification.
  • the storage medium may be an internal storage unit of the network management device described in the foregoing embodiments, such as a hard disk or a memory of the network management device.
  • the storage medium can also be an external storage device of the network management device, such as a plug-in hard disk equipped on the network management device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
  • the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute.
  • Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit .
  • Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Embodiments of the present disclosure relate to the field of communications and provide a data recovery method and device, and a storage medium. The method comprises: acquiring backed-up configuration data of a network element to be recovered and a first check code generated during the backup of the backed-up configuration data; generating a second check code according to identifier information and the backed-up configuration data of the network element to be recovered; if the first check code is the same as the second check code, sending the second check code and the backed-up configuration data to the network element to be recovered, so that the network element to be recovered generates a third check code on the basis of the received backed-up configuration data and the identifier information; and if the third check code is the same as the second check code, performing data recovery according to the backed-up configuration data.

Description

数据恢复方法、设备及存储介质Data recovery method, equipment and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请要求享有2021年06月04日提交的名称为“数据恢复方法、设备及存储介质”的中国专利申请CN202110626936.5的优先权,其全部内容通过引用并入本申请中。This application claims the priority of the Chinese patent application CN202110626936.5 filed on June 4, 2021, entitled "Data recovery method, device and storage medium", the entire content of which is incorporated into this application by reference.
技术领域technical field
本公开涉及通信技术领域,尤其涉及一种数据恢复方法、设备及存储介质。The present disclosure relates to the technical field of communications, and in particular to a data recovery method, device and storage medium.
背景技术Background technique
目前网络管理设备管理大量网元,备份和恢复网元配置数据功能是网元管理和日常维护工作所需的一项重要功能,网络管理设备定时自动或用户手工操作备份网元的配置数据,按照备份时间、网元标识等信息分类保存。当某个网元出现数据异常等问题时,使用该网元备份到网络管理设备中的历史备份数据恢复到网元,使网元恢复正常运行。At present, network management equipment manages a large number of network elements. The function of backing up and restoring network element configuration data is an important function required for network element management and daily maintenance. Backup time, network element identification and other information are stored in categories. When a network element has a problem such as data abnormality, use the network element to back up the historical backup data in the network management device to restore to the network element, so that the network element can resume normal operation.
随着电信运营商和设备商对安全因素越来越重视,现有的备份恢复机制在安全方面有待加强。即上传下载备份数据文件时,因网络安全因素,备份数据可能在传输过程中被攻击者篡改,或者由于网络原因丢失了部分数据,保存在网管服务器上的备份数据文件也可能被攻击者恶意篡改,或者误操作改动了文件内容。如果被改动过的配置数据恢复到网元,会严重影响网元业务,造成极坏的影响。因此,提高网元配置数据的安全性是目前亟待解决的问题。As telecom operators and equipment manufacturers pay more and more attention to security factors, the existing backup recovery mechanism needs to be strengthened in terms of security. That is, when uploading and downloading backup data files, due to network security factors, the backup data may be tampered by the attacker during the transmission process, or part of the data is lost due to network reasons, and the backup data files stored on the network management server may also be maliciously tampered by the attacker , or the content of the file has been changed by mistake. If the modified configuration data is restored to the network element, it will seriously affect the service of the network element and cause extremely bad effects. Therefore, improving the security of network element configuration data is an urgent problem to be solved at present.
发明内容Contents of the invention
本公开提出一种数据恢复方法、网络管理设备及存储介质,旨在提高网元配置数据恢复的安全性。The disclosure proposes a data recovery method, network management equipment and storage media, aiming at improving the security of network element configuration data recovery.
第一方面,本公开实施例提供一种数据恢复方法,包括:获取待恢复网元的已备份配置数据和备份所述已备份配置数据时所生成的第一校验码;根据所述待恢复网元的标识信息和所述已备份配置数据,生成第二校验码;若所述第一校验码与所述第二校验码相同,则向所述待恢复网元发送所述第二校验码和所述已备份配置数据,以供所述待恢复网元基于接收到的已备份配置数据和所述标识信息生成第三校验码,若所述第三校验码与所述第二校验码相同,则根据所述已备份配置数据进行数据恢复。In the first aspect, an embodiment of the present disclosure provides a data restoration method, including: obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data; The identification information of the network element and the backup configuration data generate a second check code; if the first check code is the same as the second check code, send the second check code to the network element to be restored A second check code and the backed up configuration data, for the network element to be restored to generate a third check code based on the received backed up configuration data and the identification information, if the third check code is the same as the backed up configuration data If the second check code is the same, perform data recovery according to the backed up configuration data.
第二方面,本公开实施例还提供一种数据恢复方法,包括:获取网络管理设备发送的数据恢复指令,所述数据恢复指令包括第二校验码;根据所述数据恢复指令从所述网络管理设备中下载已备份配置数据;根据网元的标识信息和下载得到的已备份配置数据,生成第三校验码;若所述第二校验码与所述第三校验码相同,则根据下载得到的已备份配置数据进行数据恢复。In a second aspect, an embodiment of the present disclosure further provides a data recovery method, including: acquiring a data recovery command sent by a network management device, the data recovery command including a second check code; Downloading the backed up configuration data in the management device; generating a third check code according to the identification information of the network element and the downloaded backed up configuration data; if the second check code is the same as the third check code, then Perform data recovery based on the downloaded backup configuration data.
第三方面,本公开实施例还提供一种网络管理设备,所述网络管理设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如本公开实施例提供的任一项数据恢复方法的步骤。In a third aspect, an embodiment of the present disclosure further provides a network management device, the network management device includes a processor, a memory, a computer program stored in the memory and executable by the processor, and used to implement the A data bus connecting and communicating between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any data recovery method provided by the embodiments of the present disclosure are realized.
第四方面,本公开实施例还提供一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如本公开实施例提供的任一项网元配置数据方法的步骤。In a fourth aspect, an embodiment of the present disclosure further provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to implement the steps of any one of the network element configuration data methods provided by the embodiments of the present disclosure.
附图说明Description of drawings
图1为本公开实施例提供的一种数据恢复方法的流程示意图;FIG. 1 is a schematic flowchart of a data recovery method provided by an embodiment of the present disclosure;
图2为图1中的数据恢复方法的子步骤流程示意图;Fig. 2 is a schematic flow chart of the sub-steps of the data recovery method in Fig. 1;
图3为本公开实施例提供的另一种数据恢复方法的流程示意图;FIG. 3 is a schematic flowchart of another data recovery method provided by an embodiment of the present disclosure;
图4为本公开实施例提供的另一种数据恢复方法的流程示意图;FIG. 4 is a schematic flowchart of another data recovery method provided by an embodiment of the present disclosure;
图5为本公开实施例提供的一种网络管理设备的结构示意性框图。Fig. 5 is a schematic structural block diagram of a network management device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are part of the embodiments of the present disclosure, not all of them. Based on the embodiments in the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present disclosure.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flow charts shown in the drawings are just illustrations, and do not necessarily include all contents and operations/steps, nor must they be performed in the order described. For example, some operations/steps can be decomposed, combined or partly combined, so the actual order of execution may be changed according to the actual situation.
应当理解,在此本公开说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本公开。如在本公开说明书和所附权利要求书中所使用的那样,除非上下文清 楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used in this disclosure and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.
本公开实施例提供一种数据恢复方法、网络管理设备及存储介质。其中,该数据恢复方法可应用于网络管理设备中,该网络管理设备可以是服务器、笔记本电脑、台式电脑和个人数字助理等等。Embodiments of the present disclosure provide a data restoration method, a network management device, and a storage medium. Wherein, the data recovery method can be applied to a network management device, and the network management device can be a server, a notebook computer, a desktop computer, a personal digital assistant, and the like.
下面结合附图,对本公开的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
请参照图1,图1为本公开实施例提供的一种数据恢复方法的流程示意图。Please refer to FIG. 1 , which is a schematic flowchart of a data recovery method provided by an embodiment of the present disclosure.
如图1所示,该数据恢复方法包括步骤S101至步骤S103。As shown in FIG. 1, the data recovery method includes steps S101 to S103.
步骤S101、获取待恢复网元的已备份配置数据和备份已备份配置数据时所生成的第一校验码。Step S101. Obtain the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data.
其中,网元为被网络管理设备管理的一个设备。例如,该网元可以是基站、路由器、交换机和服务器等等设备,该网络管理设备可以接收网元的配置数据,并备份存储该配置数据,该网络管理设备还可以向网元发送配置数据。Wherein, the network element is a device managed by the network management device. For example, the network element can be a base station, router, switch, server, etc. The network management device can receive the configuration data of the network element, back up and store the configuration data, and the network management device can also send the configuration data to the network element.
在一实施例中,获取每个网元的状态标识,状态标识信息包括第一标识或第二标识,第一标识用于表示网元处于故障状态,第二标识用于表示网元的状态处于正常状态;将状态标识为第一标识所对应的网元确定为待恢复网元,并从备份数据库中获取待恢复网元的已备份配置数据。其中,该第一标识可以是高电平信号,第二标识可以是低电平信号。通过获取每一个网元的状态标识,当网元处于故障状态时,可以自动地从备份数据库中获取待恢复网元(处于故障状态的网元)的已备份配置数据。In one embodiment, the status identifier of each network element is obtained, and the status identifier information includes a first identifier or a second identifier, the first identifier is used to indicate that the network element is in a fault state, and the second identifier is used to indicate that the status of the network element is in the Normal state: determine the network element corresponding to the first identifier as the network element to be restored, and obtain the backed up configuration data of the network element to be restored from the backup database. Wherein, the first flag may be a high level signal, and the second flag may be a low level signal. By obtaining the state identifier of each network element, when the network element is in a fault state, the backed up configuration data of the network element to be restored (the network element in the fault state) can be automatically obtained from the backup database.
示例性的,网络管理设备获取到网元1、网元2、网元3、网元4、网元5、网元6、网元7、网元8、网元9和网元10的状态标识信息,其中,网元1状态标识信息为第二标识信息、网元2状态标识信息为第一标识信息、网元3状态标识信息为第二标识信息、网元4状态标识信息为第二标识信息、网元5状态标识信息为第二标识信息、网元6状态标识信息为第二标识信息、网元7状态标识信息为第一标识信息、网元8状态标识信息为第二标识信息、网元9状态标识信息为第二标识信息、网元10状态标识信息为第二标识信息,则网元2和网元7处于故障状态,确定网元2和网元7为待恢复网元。Exemplarily, the network management device acquires the states of network element 1, network element 2, network element 3, network element 4, network element 5, network element 6, network element 7, network element 8, network element 9 and network element 10 Identification information, wherein the status identification information of network element 1 is the second identification information, the status identification information of network element 2 is the first identification information, the status identification information of network element 3 is the second identification information, and the status identification information of network element 4 is the second identification information The identification information, the status identification information of network element 5 is the second identification information, the status identification information of network element 6 is the second identification information, the status identification information of network element 7 is the first identification information, and the status identification information of network element 8 is the second identification information , the state identification information of network element 9 is the second identification information, and the state identification information of network element 10 is the second identification information, then network element 2 and network element 7 are in a fault state, and it is determined that network element 2 and network element 7 are network elements to be restored .
在一实施例中,从备份数据库中获取待恢复网元的已备份配置数据的方式可以为:获取备份数据库中待恢复网元的每个已备份配置数据的已备份时长;从备份数据库中获取已备份时长最短的已备份配置数据。通过将已备份时长最短的已备份配置数据作为待恢复网元的恢复数据,可以减少数据的丢失和提高配置数据的安全性。In an embodiment, the method of obtaining the backed up configuration data of the network element to be restored from the backup database may be: obtain the backed up duration of each backed up configuration data of the network element to be restored in the backup database; obtain from the backup database The backed up configuration data with the shortest backed up time. By using the backed up configuration data with the shortest backup time as the recovery data of the network element to be restored, data loss can be reduced and the security of the configuration data can be improved.
示例性的,备份数据库中存在待恢复网元已备份的配置数据有已备份配置数据A、已备份配置数据B、已备份配置数据C、已备份配置数据D和已备份配置数据E,其中,已备份配置数据A备份距离当时长为5天,已备份配置数据B备份距离当时长为8天,已备份配置数据C备份距离当时长为10天,已备份配置数据12备份距离当时长为5天,已备份配置数据E备份距离当时长为15天,根据每个已备份配置数据的已备份时长可以确定已备份配置数据A的已备份时长最短,则将已备份配置数据A作为待恢复网元的恢复配置数据。Exemplarily, the backed-up configuration data of the network element to be restored in the backup database includes backed-up configuration data A, backed-up configuration data B, backed-up configuration data C, backed-up configuration data D, and backed-up configuration data E, wherein, The backup distance of backed up configuration data A is 5 days, the backup distance of backed up configuration data B is 8 days, the backup distance of backed up configuration data C is 10 days, and the backup distance of backed up configuration data 12 is 5 days days, the backup distance of the backed up configuration data E is 15 days at that time, according to the backed up time of each backed up configuration data, it can be determined that the backed up time of the backed up configuration data A is the shortest, then the backed up configuration data A is used as the network to be restored Meta restore configuration data.
在一实施例中,从备份数据库中获取待恢复网元的已备份配置数据的方式可以为:从备份数据库中获取待恢复网元的全部已备份配置数据;从全部已备份配置数据中选择任意一个已备份配置数据。示例性的,待恢复网元包括已备份配置数据1、已备份配置数据2、已备份配置数据3、已备份配置数据4和已备份配置数据5,将已备份配置数据3作为待恢复网元的恢复配置数据。In an embodiment, the method of obtaining the backed-up configuration data of the network element to be restored from the backup database may be: obtaining all the backed-up configuration data of the network element to be restored from the backup database; selecting any A backed up configuration data. Exemplarily, the network element to be restored includes the backed up configuration data 1, the backed up configuration data 2, the backed up configuration data 3, the backed up configuration data 4 and the backed up configuration data 5, and the backed up configuration data 3 is used as the network element to be restored restore configuration data.
在一实施例中,获取待恢复网元的已备份配置数据的方式可以为:显示网元恢复页面,网元恢复页面包括处于故障状态的待恢复网元的标识信息;获取用户在网元恢复页面中的选择的标识信息,并显示选择的标识信息对应的待恢复网元的已备份配置数据列表;获取用户在已备份配置数据列表中选择的文件标识,并从备份数据库中获取文件标识对应的已备份配置数据。其中,待恢复网元的标识信息和文件标识可以根据实际情况进行设置,本公开实施例对此不做具体限定。例如,该待恢复网元的标识信息可以是待恢复网元的IP地址,该文件标识可以是文件名称。通过提供网元恢复页面,使得用户可以通过网元恢复页面快速地选择故障状态的待恢复网元和待恢复网元的已备份配置数据。In an embodiment, the way to obtain the backed up configuration data of the network element to be restored may be: display the network element restoration page, and the network element restoration page includes the identification information of the network element to be restored in the fault state; The selected identification information on the page, and display the list of backed up configuration data of the network element to be restored corresponding to the selected identification information; obtain the file identification selected by the user in the list of backed up configuration data, and obtain the corresponding file identification from the backup database The backed up configuration data of . Wherein, the identification information and the file identification of the network element to be restored can be set according to the actual situation, which is not specifically limited in this embodiment of the present disclosure. For example, the identification information of the network element to be restored may be the IP address of the network element to be restored, and the file identifier may be a file name. By providing the network element restoration page, the user can quickly select the network element to be restored in the fault state and the backed up configuration data of the network element to be restored through the network element restoration page.
示例性的,显示网元恢复页面上显示待恢复网元的标识信息,该标识信息为待恢复网元的IP地址,获取用户选取的待恢复网元的IP地址,从备份数据库中查询该IP地址对应的已备份配置数据列表,该已备份配置数据列表包括文件1、文件2、文件3、文件4和文件5,获取用户在已备份配置数据列表中选取的文件标识为文件4,则从备份数据库中获取文件4对应的已备份配置数据,并将该已备份配置数据作为待恢复网元的恢复配置数据。其中,显示网元恢复的页面可以显示在网络管理设备上设置的显示屏或者是独立于网络管理设置的显示器,独立于网络管理设备的显示器可以包括手机、平板电脑和个人电脑等,该显示屏包括LED显示屏、OLED显示屏、LCD显示屏等。Exemplarily, the identification information of the network element to be restored is displayed on the network element restoration page, the identification information is the IP address of the network element to be restored, the IP address of the network element to be restored selected by the user is obtained, and the IP address is queried from the backup database The list of backed up configuration data corresponding to the address, the list of backed up configuration data includes file 1, file 2, file 3, file 4 and file 5, and the file ID selected by the user in the list of backed up configuration data is obtained as file 4, then from The backed up configuration data corresponding to file 4 is obtained from the backup database, and the backed up configuration data is used as the restored configuration data of the network element to be restored. Wherein, the page showing network element recovery may be displayed on a display screen set on the network management device or a display independent from the network management device, and the display independent from the network management device may include a mobile phone, a tablet computer and a personal computer, etc., the display screen Including LED display, OLED display, LCD display and so on.
在一实施例中,获取备份已备份配置数据时所生成的第一校验码,其中,该第一校验码是根据待恢复网元的标识信息和待备份配置数据生成的。In an embodiment, the first check code generated when backing up the backed up configuration data is acquired, wherein the first check code is generated according to the identification information of the network element to be restored and the configuration data to be backed up.
步骤S102、根据待恢复网元的标识信息和已备份配置数据,生成第二校验码。Step S102: Generate a second check code according to the identification information of the network element to be restored and the backed up configuration data.
其中,标识信息包括待恢复网元的设备序列号和Mac地址(Media Access Control Address)中的至少一项,当然,也可以包括其他信息,本公开实施例对此不做具体限定。Wherein, the identification information includes at least one of the equipment serial number and the Mac address (Media Access Control Address) of the network element to be restored. Of course, it may also include other information, which is not specifically limited in this embodiment of the present disclosure.
在一实施例中,如图2所示,步骤S102包括子步骤S1021至步骤S1022。In one embodiment, as shown in FIG. 2 , step S102 includes sub-steps S1021 to S1022.
子步骤S1021、对待恢复网元的标识信息和已备份配置数据进行拼接,得到拼接后的配置数据。Sub-step S1021, splicing the identification information of the network element to be restored and the backed up configuration data to obtain spliced configuration data.
对待恢复网元的标识信息和已备份配置数据进行拼接,得到拼接后的配置数据,其中,拼接的方式可以根据实际情况进行设置,本公开实施例对此不做具体限定。例如,标识信息拼接在已备份配置数据之后,或者已备份配置数据拼接在前标识信息之后。The identification information of the network element to be restored and the backed up configuration data are spliced to obtain the spliced configuration data. The splicing method can be set according to the actual situation, which is not specifically limited in the embodiments of the present disclosure. For example, the identification information is spliced after the backed up configuration data, or the backed up configuration data is spliced after the previous identification information.
示例性的,待恢复网元的标识信息为12345QA,已备份配置数据为789456QWER,并按照标识信息拼接在已备份配置数据之前,得到拼接后的配置数据为12345QA789456QWER。Exemplarily, the identification information of the network element to be restored is 12345QA, the backed up configuration data is 789456QWER, and the identification information is spliced before the backed up configuration data, and the spliced configuration data obtained is 12345QA789456QWER.
示例性的,待恢复网元的标识信息为12345QA,已备份配置数据为789456QWER,并按照已备份配置数据拼接在标识信息之前,得到拼接后的配置数据为789456QWER12345QA。Exemplarily, the identification information of the network element to be restored is 12345QA, the backed up configuration data is 789456QWER, and the backed up configuration data is spliced before the identification information, and the spliced configuration data is 789456QWER12345QA.
子步骤S1022、基于预设的校验码生成算法和拼接后的配置数据,生成第二校验码。Sub-step S1022: Generate a second check code based on the preset check code generation algorithm and the concatenated configuration data.
其中,预设的校验码生成算法为预先设置的校验码生成算法,该校验码生成算法包括信息摘要算法(MD5Message-Digest Algorithm,MD5)、安全散列算法1(Secure Hash Algorithm 1,SHA-1)、循环冗余校验(Cyclic Redundancy Check 32,CRC32),当然也可以是其他的校验码生成算法,本公开对此不做具体限定。Wherein, the preset check code generation algorithm is a preset check code generation algorithm, and the check code generation algorithm includes a message digest algorithm (MD5Message-Digest Algorithm, MD5), a secure hash algorithm 1 (Secure Hash Algorithm 1, SHA-1), cyclic redundancy check (Cyclic Redundancy Check 32, CRC32), and of course other check code generation algorithms, which are not specifically limited in this disclosure.
示例性的,通过预设的校验码生成算法对拼接后的配置数据进行运算,得到第二校验码。例如,拼接后的配置数据为789456QWER12345QA,通过预设的校验码生成算法对该拼接后的配置数据789456QWER12345QA进行运算,得到第二校验码为741QAZ。Exemplarily, a preset check code generation algorithm is used to perform operations on the concatenated configuration data to obtain the second check code. For example, the spliced configuration data is 789456QWER12345QA, and the spliced configuration data 789456QWER12345QA is operated by a preset check code generation algorithm to obtain a second check code of 741QAZ.
步骤S103、若第一校验码与第二校验码相同,则向待恢复网元发送第二校验码和已备份配置数据,以供待恢复网元基于接收到的已备份配置数据和标识信息生成第三校验码,若第三校验码与第二校验码相同,则根据已备份配置数据进行数据恢复。Step S103, if the first check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored, for the network element to be restored based on the received backed up configuration data and The identification information generates a third check code, and if the third check code is the same as the second check code, data recovery is performed according to the backed up configuration data.
确定第一校验码和第二校验码是否相同,若第一校验码和第二校验码相同,则确定已备份配置数据在网络管理设备中存储时没有被篡改或者没有数据丢失,该已备份配置数据是有效的配置数据。通过确定第一校验码和第二校验码是否相同,进而可以确定已备份配置数据在网络管理设备中存储是否被篡改或者数据丢失,提高了网元配置数据恢复的准确性。Determine whether the first check code and the second check code are the same, if the first check code and the second check code are the same, then determine that the backed up configuration data has not been tampered with or lost when stored in the network management device, The backed up configuration data is valid configuration data. By determining whether the first check code and the second check code are the same, it can be determined whether the backed up configuration data stored in the network management device has been tampered with or lost, thereby improving the accuracy of network element configuration data recovery.
在一实施例中,若第一校验码和第二校验码不相同,则确定已备份配置数据在网络管理设备中存储时有被篡改或者有数据丢失,该已备份配置数据为无效的配置数据,则将该已备份配置数据丢弃,以防止给待恢复网元传输错误的配置数据,提高了网元配置数据恢复的安全性和准确性。In one embodiment, if the first check code and the second check code are different, it is determined that the backed up configuration data has been tampered with or lost when stored in the network management device, and the backed up configuration data is invalid configuration data, the backed up configuration data is discarded, so as to prevent wrong configuration data from being transmitted to the network element to be restored, and improve the security and accuracy of network element configuration data restoration.
在一实施例中,在确定第一校验码和第二校验码相同时,向待恢复网元发送数据恢复指令,其中,该数据恢复指令包括第二校验码、文件传输协议(File Transfer Protocol,FTP)地址或者文件加密传输协议(Secure File Transfer Protocol,SFTP)地址、用户名和密码以及已备份配置数据的文件存储位置,待恢复网元根据该FTP地址或者SFTP地址找到网络管理设备,通过该用户名和密码访问该网络管理设备,并根据该已备份配置数据的文件存储位置找到并下载该已备份配置数据。其中,该向待恢复网元发送数据恢复指令的方式可以根据实际情况进行选择,本公开对此不做具体限定。例如,发送数据恢复指令的方式可以通过简单网络管理协议(Simple Network Management Protocol,SNMP)或者网络配置协议(NETCONF)发送。In an embodiment, when it is determined that the first check code and the second check code are the same, a data recovery instruction is sent to the network element to be restored, wherein the data recovery instruction includes the second check code, the file transfer protocol (File transfer protocol) Transfer Protocol (FTP) address or Secure File Transfer Protocol (Secure File Transfer Protocol, SFTP) address, user name and password, and the file storage location of the backed up configuration data. The network element to be restored finds the network management device according to the FTP address or SFTP address. Access the network management device through the user name and password, and find and download the backed up configuration data according to the file storage location of the backed up configuration data. Wherein, the manner of sending the data restoration instruction to the network element to be restored may be selected according to the actual situation, which is not specifically limited in the present disclosure. For example, the way of sending the data recovery instruction can be sent through Simple Network Management Protocol (Simple Network Management Protocol, SNMP) or Network Configuration Protocol (NETCONF).
在一实施例中,当待恢复网元接收到已备份配置数据时,根据接收到的已备份配置数据和待恢复网元的标识信息生成第三校验码,若该第三校验码与第二校验码不相同,则确定接收到已备份配置数据在传输的过程中存储数据篡改或者数据丢失,将接收到的已备份配置数据丢弃,若该第三校验码与第二校验码相同,则确定该接收到的已备份配置数据为有效的配置数据,则根据该已备份配置数据进行数据恢复。通过校验码确定接收到的已备份配置数据是否为有效的配置数据,若已备份配置数据为有效的配置数据,则根据该已备份配置数据进行数据恢复,否则将该已备份配置数据丢弃,提高了待恢复网元恢复配置数据的安全性和准确性。In an embodiment, when the network element to be restored receives the backed up configuration data, a third check code is generated according to the received backed up configuration data and the identification information of the network element to be restored, if the third check code is the same as If the second check code is different, it is determined that the received backed up configuration data has been tampered with or lost during transmission, and the received backed up configuration data will be discarded. If the third check code is different from the second check code codes are the same, then it is determined that the received backed up configuration data is valid configuration data, and data recovery is performed according to the backed up configuration data. Determine whether the received backed up configuration data is valid configuration data through the check code, if the backed up configuration data is valid configuration data, perform data recovery according to the backed up configuration data, otherwise discard the backed up configuration data, The security and accuracy of restoring configuration data of network elements to be restored are improved.
在一实施例中,根据接收到的已备份配置数据和待恢复网元的标识信息生成第三校验码的方式可以为:对接收到的已备份配置数据和待恢复网元的标识信息进行拼接,得到拼接后的已备份配置数据,基于预设的校验码生成算法和拼接后的已备份配置数据,生成第三校验码。通过预设的校验码生成算法对拼接后的已备份配置数据进行运算,可以准确地得到第三校验码。In an embodiment, the method of generating the third verification code according to the received backed-up configuration data and the identification information of the network element to be restored may be: performing a check on the received backup configuration data and the identification information of the network element to be restored splicing, obtaining the spliced backed up configuration data, and generating a third check code based on the preset check code generation algorithm and the spliced backed up configuration data. The third check code can be accurately obtained by operating the spliced backup configuration data through a preset check code generation algorithm.
在一实施例中,如图3所示,该数据恢复方法还包括步骤S104至步骤S106。In an embodiment, as shown in FIG. 3 , the data recovery method further includes steps S104 to S106.
步骤S104、获取待备份网元发送的待备份配置数据和第四校验码,该第四校验码是待备份网元根据本身存储的待备份配置数据和待备份网元的标识信息生成的。Step S104, obtaining the configuration data to be backed up and the fourth verification code sent by the network element to be backed up, the fourth verification code is generated by the network element to be backed up according to the configuration data to be backed up stored by itself and the identification information of the network element to be backed up .
网络管理设备向待备份网元发送数据备份指令,其中,该数据备份指令包括FTP地址或者SFTP地址、用户名和密码,待备份网元在接收到数据备份指令之后,根据本身存储 的待备份配置数据和网元的标识信息,生成第四校验码。待备份网元根据FTP地址或者SFTP地址找到网络管理设备,根据该用户名和密码访问该网络管理设备,并将待备份配置数据发送给网络管理设备,以及将第四校验码发送给网络管理设备,其中发送数据备份指令和发送第四校验码可以通过SNMP或NETCONF的方式发送。The network management device sends a data backup command to the network element to be backed up. The data backup command includes an FTP address or SFTP address, user name and password. and the identification information of the network element to generate a fourth check code. The network element to be backed up finds the network management device according to the FTP address or SFTP address, accesses the network management device according to the user name and password, sends the configuration data to be backed up to the network management device, and sends the fourth verification code to the network management device , where sending the data backup command and sending the fourth check code can be sent through SNMP or NETCONF.
在一实施例中,根据本身存储的待备份配置数据和网元的标识信息,生成第四校验码的方式可以为:对本身存储的待备份配置数据和网元的标识信息进行拼接,得到拼接后的待备份配置数据,基于预设的校验码生成算法和拼接后的待备份配置数据,生成第四校验码,通过预设的校验码生成算法对拼接后的待备份配置数据进行运算,可以准确地得到第四校验码。In an embodiment, according to the stored configuration data to be backed up and the identification information of the network element, the fourth verification code may be generated by splicing the stored configuration data to be backed up and the identification information of the network element to obtain The spliced configuration data to be backed up is based on the preset check code generation algorithm and the spliced configuration data to be backed up to generate a fourth check code, and the spliced configuration data to be backed up is processed by the preset check code generation algorithm By performing the operation, the fourth check code can be obtained accurately.
在一实施例中,接收待备份网元发送的待备份配置数据和第四校验码,得到待备份配置数据和第四校验码。In an embodiment, the configuration data to be backed up and the fourth verification code sent by the network element to be backed up are received, and the configuration data to be backed up and the fourth verification code are obtained.
步骤S105、根据获取到的待备份配置数据和待备份网元的标识信息生成第五校验码。Step S105, generating a fifth check code according to the acquired configuration data to be backed up and the identification information of the network element to be backed up.
对获取到的待备份配置数据和待备份网元的标识信息进行拼接,得到拼接后的待备份配置数据,基于预设的校验码生成算法和拼接后的待备份配置数据,生成第五校验码,其中,该预设的校验码生成算法包括MD5、SHA-1和CRC32中至少一种,通过该预设的校验码生成算法对获取到的待备份配置数据进行运算,可以准确地得到第五校验码。The obtained configuration data to be backed up and the identification information of network elements to be backed up are spliced to obtain the spliced configuration data to be backed up, and the fifth calibration data is generated based on the preset check code generation algorithm and the spliced configuration data to be backed up. Check code, wherein, the preset check code generation algorithm includes at least one of MD5, SHA-1 and CRC32, and the acquired configuration data to be backed up is calculated by the preset check code generation algorithm, which can accurately Get the fifth check code.
步骤S106、在第四校验码与第五校验码相同时,存储待备份配置数据和第五校验码,以完成待备份网元的配置数据备份。Step S106, when the fourth check code is the same as the fifth check code, store the configuration data to be backed up and the fifth check code, so as to complete the configuration data backup of the network element to be backed up.
确定第四校验码和第五校验是否相同,若第四校验码和第五校验码不相同,则确定待备份配置数据在传输过程中配置数据被篡改了或者存在数据丢失,将获取到的待备份配置数据丢弃。若第四校验码和第五校验码相同,则确定待备份数据在传输过程中不存在配置数据被篡改和数据丢失的情况,待备份配置数据为有效数据,存储待备份配置数据和第五校验码,以完成待备份网元的配置数据备份。通过对确定第四校验码和第五校验码是否相同,进而确定待备份配置数据在传输过程中是否存在被篡改或者数据丢失,提高了网元备份配置数据的安全性。Determine whether the fourth check code is the same as the fifth check code. If the fourth check code is not the same as the fifth check code, it is determined that the configuration data to be backed up has been tampered with or lost during transmission. The acquired configuration data to be backed up is discarded. If the fourth check code is the same as the fifth check code, it is determined that the configuration data to be backed up does not have been tampered with or lost during transmission, the configuration data to be backed up is valid data, and the configuration data to be backed up and the first Five check codes to complete the configuration data backup of the network element to be backed up. By determining whether the fourth check code and the fifth check code are the same, and then determining whether the configuration data to be backed up is tampered with or lost during transmission, the security of the network element backup configuration data is improved.
利用上述实施例中的数据恢复方法,通过获取待恢复网元的已备份配置数据和备份已备份配置数据时所生成的第一校验码;然后根据待恢复网元的标识信息和已备份配置数据,生成第二校验码;若第一校验码与第二校验码相同,则向待恢复网元发送第二校验码和已备份配置数据,以供待恢复网元基于接收到的已备份配置数据和标识信息生成第三校验码,若第三校验码与第二校验码相同,则根据已备份配置数据进行数据恢复。通过校验码对待恢复网元的已备份配置数据和接收到的已备份配置数据进行校验,可以防止被篡改过或丢 失数据的已备份配置数据作为网元的恢复数据,提高网元数据恢复的安全性。Using the data recovery method in the above embodiment, by obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data; then according to the identification information of the network element to be restored and the backed up configuration data to generate a second check code; if the first check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored, for the network element to be restored based on the received The backed up configuration data and the identification information generate a third check code, and if the third check code is the same as the second check code, data recovery is performed according to the backed up configuration data. The backup configuration data of the network element to be restored and the received backup configuration data are verified by the check code, which can prevent the backup configuration data that has been tampered with or lost data from being used as the recovery data of the network element, and improve the recovery of network element data. security.
请参照图4,图4为本公开实施例提供的另一种数据恢复方法的流程示意图。Please refer to FIG. 4 , which is a schematic flowchart of another data recovery method provided by an embodiment of the present disclosure.
如图4所示,所述方法包括步骤S201至步骤S204。As shown in FIG. 4, the method includes steps S201 to S204.
步骤S201、获取网络管理设备发送的数据恢复指令,该数据恢复指令包括第二校验码。Step S201. Obtain a data restoration instruction sent by the network management device, where the data restoration instruction includes a second check code.
接收网络管理设备发送的数据恢复指令,其中,该数据恢复指令包括第二校验码、文件传输协议(File Transfer Protocol,FTP)地址或者文件加密传输协议(Secure File Transfer Protocol,SFTP)地址、用户名和密码以及已备份配置数据的文件存储位置。Receive a data recovery instruction sent by the network management device, wherein the data recovery instruction includes a second check code, a file transfer protocol (File Transfer Protocol, FTP) address or a file encryption transfer protocol (Secure File Transfer Protocol, SFTP) address, a user name and password, and the file storage location for backed up configuration data.
步骤S202、根据数据恢复指令从网络管理设备中下载已备份配置数据。Step S202, downloading the backed up configuration data from the network management device according to the data recovery instruction.
在一实施例中,从数据恢复指令中获取待下载的已备份配置数据的文件存储位置;根据该文件存储位置,从网络管理设备中下载对应的已备份配置数据。In one embodiment, the file storage location of the backed-up configuration data to be downloaded is obtained from the data recovery instruction; according to the file storage location, the corresponding backed-up configuration data is downloaded from the network management device.
示例性的,根据数据恢复指令中的FTP地址或者SFTP地址找到网络管理设备,通过该用户名和密码访问该网络管理设备,并根据该已备份配置数据的文件存储位置找到并下载对应的已备份配置数据。Exemplarily, find the network management device according to the FTP address or SFTP address in the data recovery instruction, access the network management device through the user name and password, and find and download the corresponding backed up configuration according to the file storage location of the backed up configuration data data.
步骤S203、根据网元的标识信息和下载得到的已备份配置数据,生成第三校验码。Step S203, generating a third verification code according to the identification information of the network element and the downloaded backed up configuration data.
对该网元的标识信息和下载得到的已备份配置数据进行拼接,得到拼接后的已备份配置数据,基于预设的校验码生成算法和拼接后的已备份配置数据,生成第三校验码。通过预设的校验码生成算法对拼接后的已备份配置数据进行运算,可以准确地得到第三校验码。Splicing the identification information of the network element and the downloaded backed-up configuration data to obtain the spliced backed-up configuration data, and generating a third checksum based on the preset check code generation algorithm and the spliced backed-up configuration data code. The third check code can be accurately obtained by operating the spliced backup configuration data through a preset check code generation algorithm.
步骤S204、若第二校验码与第三校验码相同,则根据下载得到的已备份配置数据进行数据恢复。Step S204, if the second check code is the same as the third check code, perform data restoration according to the downloaded configuration data that has already been backed up.
确定第二校验码与第三校验码是否相同,若该第三校验码与第二校验码不相同,则确定下载得到的已备份配置数据在传输的过程中存储数据篡改或者数据丢失,将下载得到的已备份配置数据丢弃,若该第三校验码与第二校验码相同,则确定下载得到的已备份配置数据为有效的配置数据,则根据该已备份配置数据进行数据恢复。通过校验码确定下载得到的已备份配置数据是否为有效的配置数据,若已备份配置数据为有效的配置数据,则根据该已备份配置数据进行数据恢复,否则将该已备份配置数据丢弃,提高了待恢复网元恢复配置数据的安全性和准确性。Determine whether the second check code is the same as the third check code, and if the third check code is not the same as the second check code, then determine whether the downloaded backed up configuration data has been stored during transmission for data tampering or data lost, the downloaded backed up configuration data is discarded, if the third check code is the same as the second check code, it is determined that the downloaded backed up configuration data is valid Data Recovery. Determine whether the downloaded backed-up configuration data is valid configuration data through the check code, if the backed-up configuration data is valid configuration data, perform data recovery according to the backed-up configuration data, otherwise discard the backed-up configuration data, The security and accuracy of restoring configuration data of network elements to be restored are improved.
需要说明的是,上述数据的拼接的先后均是相同的,例如,配置数据拼接标识信息之后的拼接方式,或者配置数据拼接标识信息之前的拼接方式。所有校验码生成的算法均是使用同一个,例如,校验码生成算法为CRC32。通过设置数据拼接的先后均是相同和校验 码生成算法的相同,使得生成的校验码才会相同。It should be noted that the splicing sequence of the above data is the same, for example, the splicing manner after configuring the data splicing identification information, or the splicing manner before configuring the data splicing identification information. All check codes are generated using the same algorithm, for example, the check code generation algorithm is CRC32. By setting the order of data splicing to be the same as that of the check code generation algorithm, the generated check codes will be the same.
利用上述实施例中的数据恢复方法,通过获取网络管理设备发送的数据恢复指令,数据恢复指令包括第二校验码;根据数据恢复指令从网络管理设备中下载已备份配置数据;根据网元的标识信息和下载得到的已备份配置数据,生成第三校验码;若第二校验码与第三校验码相同,则根据下载得到的已备份配置数据进行数据恢复。通过校验码对下载的已备份配置数据进行校验,可以防止被篡改过或丢失数据的已备份配置数据作为网元的恢复数据,提高网元数据恢复的安全性。Using the data recovery method in the above embodiment, by obtaining the data recovery command sent by the network management device, the data recovery command includes the second check code; download the backed up configuration data from the network management device according to the data recovery command; The identification information and the downloaded backed up configuration data are used to generate a third check code; if the second check code is the same as the third check code, data recovery is performed according to the downloaded backed up configuration data. The downloaded backup configuration data is verified by the check code, which can prevent the backup configuration data that has been tampered with or lost data from being used as the recovery data of the network element, and improves the security of network element data recovery.
请参阅图5,图5为本公开实施例提供的一种网络管理设备的结构示意性框图。Please refer to FIG. 5 . FIG. 5 is a schematic structural block diagram of a network management device provided by an embodiment of the present disclosure.
如图5所示,网络管理设备300包括处理器301和存储器302,处理器301和存储器302通过总线303连接,该总线比如为I2C(Inter-integrated Circuit)总线。As shown in FIG. 5, the network management device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus 303, such as an I2C (Inter-integrated Circuit) bus.
处理器301配置为提供计算和控制能力,支撑整个网络管理设备的运行。处理器301可以是中央处理单元(Central Processing Unit,CPU),该处理器301还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 301 is configured to provide calculation and control capabilities, and support the operation of the entire network management device. The processor 301 can be a central processing unit (Central Processing Unit, CPU), and the processor 301 can also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein, the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
存储器302可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。The memory 302 can be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
本领域技术人员可以理解,图5中示出的结构,仅仅是与本公开方案相关的部分结构的框图,并不构成对本公开方案所应用于其上的网络管理设备的限定,具体的服务器可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of a partial structure related to the disclosed solution, and does not constitute a limitation on the network management device to which the disclosed solution is applied. The specific server can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
其中,所述处理器配置为运行存储在存储器中的计算机程序,并在执行计算机程序时实现本公开实施例提供的任意一种所述的数据恢复方法。Wherein, the processor is configured to run a computer program stored in the memory, and implement any one of the data recovery methods provided by the embodiments of the present disclosure when executing the computer program.
在一实施方式中,所述处理器配置为运行存储在存储器中的计算机程序,并在执行计算机程序时实现如下步骤:In one embodiment, the processor is configured to run a computer program stored in the memory, and implement the following steps when executing the computer program:
获取待恢复网元的已备份配置数据和备份已备份配置数据时所生成的第一校验码;根据待恢复网元的标识信息和已备份配置数据,生成第二校验码;若第一校验码与第二校验码相同,则向待恢复网元发送第二校验码和已备份配置数据,以供待恢复网元基于接收到的已备份配置数据和标识信息生成第三校验码,若第三校验码与第二校验码相同,则根据已备份配置数据进行数据恢复。Obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data; generating a second check code according to the identification information of the network element to be restored and the backed up configuration data; if the first If the check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored, so that the network element to be restored can generate a third check code based on the received backed up configuration data and identification information. check code, if the third check code is the same as the second check code, then perform data recovery based on the backed up configuration data.
在一实施例中,所述处理器配置为在实现所述获取待恢复网元的已备份配置数据时,实现:获取每个网元的状态标识,状态标识信息包括第一标识或第二标识,第一标识用于表示网元处于故障状态,第二标识用于表示网元的状态处于正常状态;将状态标识为第一标识所对应的网元确定为待恢复网元,并从备份数据库中获取待恢复网元的已备份配置数据。In an embodiment, the processor is configured to, when acquiring the backed-up configuration data of the network element to be restored, implement: acquiring the status identifier of each network element, where the status identifier information includes the first identifier or the second identifier , the first identifier is used to indicate that the network element is in a fault state, and the second identifier is used to indicate that the state of the network element is in a normal state; the state is identified as the network element corresponding to the first identifier is determined as the network element to be restored, and the backup database Obtain the backed up configuration data of the NE to be restored.
在一实施例中,所述处理器配置为在实现所述从备份数据库中获取待恢复网元的已备份配置数据时,实现:获取备份数据库中待恢复网元的每个已备份配置数据的已备份时长;从备份数据库中获取已备份时长最短的已备份配置数据。In an embodiment, the processor is configured to, when acquiring the backed-up configuration data of the network element to be restored from the backup database, implement: acquiring each backed-up configuration data of the network element to be restored in the backup database The length of the backup; obtain the backed up configuration data with the shortest backup time from the backup database.
在一实施例中,所述处理器配置为在实现所述获取待恢复网元的已备份配置数据时,实现:显示网元恢复页面,网元恢复页面包括处于故障状态的待恢复网元的标识信息;获取用户在网元恢复页面中的选择的标识信息,并显示选择的标识信息对应的待恢复网元的已备份配置数据列表;获取用户在已备份配置数据列表中选择的文件标识,并从备份数据库中获取文件标识对应的已备份配置数据。In an embodiment, the processor is configured to, when acquiring the backed-up configuration data of the network element to be restored, realize: displaying a network element restoration page, where the network element restoration page includes the information of the network element to be restored in a fault state Identification information; obtain the identification information selected by the user in the network element recovery page, and display the list of backed up configuration data of the network element to be restored corresponding to the selected identification information; obtain the file identification selected by the user in the list of backed up configuration data, And obtain the backed up configuration data corresponding to the file identifier from the backup database.
在一实施例中,所述处理器配置为在实现所述根据待恢复网元的标识信息和已备份配置数据,生成第二校验码时,实现:对待恢复网元的标识信息和已备份配置数据进行拼接,得到拼接后的配置数据;基于预设的校验码生成算法和拼接后的配置数据,生成第二校验码。In an embodiment, the processor is configured to, when generating the second verification code according to the identification information of the network element to be restored and the backed up configuration data, realize: the identification information of the network element to be restored and the backed up configuration data The configuration data is spliced to obtain spliced configuration data; a second check code is generated based on a preset check code generation algorithm and the spliced configuration data.
在一实施例中,所述处理器配置为还实现:获取待备份网元发送的待备份配置数据和第四校验码,第四校验码是待备份网元根据本身存储的待备份配置数据和待备份网元的标识信息生成的;根据获取到的待备份配置数据和待备份网元的标识信息生成第五校验码;在第四校验码与第五校验码相同时,存储待备份配置数据和第五校验码,以完成待备份网元的配置数据备份。In an embodiment, the processor is configured to further implement: acquiring the configuration data to be backed up sent by the network element to be backed up and the fourth check code, where the fourth check code is the configuration to be backed up stored by the network element to be backed up data and the identification information of the network element to be backed up; generate the fifth check code according to the obtained configuration data to be backed up and the identification information of the network element to be backed up; when the fourth check code is the same as the fifth check code, The configuration data to be backed up and the fifth check code are stored to complete the configuration data backup of the network element to be backed up.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的网络管理设备的具体工作过程,可以参考前述数据恢复方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the network management device described above can refer to the corresponding process in the foregoing data recovery method embodiment, which is not described here. Let me repeat.
利用上述实施例中的网络管理设备,通过获取待恢复网元的已备份配置数据和备份已备份配置数据时所生成的第一校验码;然后根据待恢复网元的标识信息和已备份配置数据,生成第二校验码;若第一校验码与第二校验码相同,则向待恢复网元发送第二校验码和已备份配置数据,以供待恢复网元基于接收到的已备份配置数据和标识信息生成第三校验码,若第三校验码与第二校验码相同,则根据已备份配置数据进行数据恢复。通过校验码对待恢复网元的已备份配置数据和接收到的已备份配置数据进行校验,可以防止被篡改过或丢 失数据的已备份配置数据作为网元的恢复数据,提高网元数据恢复的安全性。Using the network management device in the above embodiment, by obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data; then according to the identification information of the network element to be restored and the backed up configuration data to generate a second check code; if the first check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored, for the network element to be restored based on the received The backed up configuration data and the identification information generate a third check code, and if the third check code is the same as the second check code, data recovery is performed according to the backed up configuration data. The backup configuration data of the network element to be restored and the received backup configuration data are verified by the check code, which can prevent the backup configuration data that has been tampered with or lost data from being used as the recovery data of the network element, and improve the recovery of network element data. security.
本公开实施例还提供一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如本公开说明书提供的任一项数据恢复方法的步骤。An embodiment of the present disclosure also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following: The steps of any data recovery method provided in this disclosure specification.
其中,所述存储介质可以是前述实施例所述的网络管理设备的内部存储单元,例如所述网络管理设备的硬盘或内存。所述存储介质也可以是所述网络管理设备的外部存储设备,例如所述网络管理设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。Wherein, the storage medium may be an internal storage unit of the network management device described in the foregoing embodiments, such as a hard disk or a memory of the network management device. The storage medium can also be an external storage device of the network management device, such as a plug-in hard disk equipped on the network management device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
应当理解,在本公开说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be understood that the term "and/or" used in the present disclosure and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. It should be noted that, as used herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。以上所述,仅为本公开 的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。The serial numbers of the above-mentioned embodiments of the present disclosure are for description only, and do not represent the advantages and disadvantages of the embodiments. The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person familiar with the technical field can easily think of various equivalents within the technical scope of the present disclosure. Modifications or replacements should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be determined by the protection scope of the claims.

Claims (10)

  1. 一种数据恢复方法,包括:A data recovery method comprising:
    获取待恢复网元的已备份配置数据和备份所述已备份配置数据时所生成的第一校验码;Obtaining the backed up configuration data of the network element to be restored and the first check code generated when backing up the backed up configuration data;
    根据所述待恢复网元的标识信息和所述已备份配置数据,生成第二校验码;generating a second check code according to the identification information of the network element to be restored and the backed up configuration data;
    若所述第一校验码与所述第二校验码相同,则向所述待恢复网元发送所述第二校验码和所述已备份配置数据,以供所述待恢复网元基于接收到的已备份配置数据和所述标识信息生成第三校验码,若所述第三校验码与所述第二校验码相同,则根据所述已备份配置数据进行数据恢复。If the first check code is the same as the second check code, send the second check code and the backed up configuration data to the network element to be restored for the network element to be restored Generate a third check code based on the received backed up configuration data and the identification information, and if the third check code is the same as the second check code, perform data restoration according to the backed up configuration data.
  2. 如权利要求1所述的数据恢复方法,其中,所述获取待恢复网元的已备份配置数据,包括:The data restoration method according to claim 1, wherein said obtaining the backed up configuration data of the network element to be restored comprises:
    获取每个网元的状态标识,所述状态标识信息包括第一标识或第二标识,所述第一标识用于表示所述网元处于故障状态,所述第二标识用于表示所述网元的状态处于正常状态;Acquiring the status identifier of each network element, the status identifier information includes a first identifier or a second identifier, the first identifier is used to indicate that the network element is in a fault state, and the second identifier is used to indicate that the network element is in a fault state. The state of the element is in a normal state;
    将所述状态标识为所述第一标识所对应的网元确定为待恢复网元,并从备份数据库中获取所述待恢复网元的已备份配置数据。Determining the state as the network element corresponding to the first identification as the network element to be restored, and obtaining the backed up configuration data of the network element to be restored from the backup database.
  3. 如权利要求2所述的数据恢复方法,其中,所述从备份数据库中获取所述待恢复网元的已备份配置数据,包括:The data restoration method according to claim 2, wherein said obtaining the backed up configuration data of the network element to be restored from the backup database comprises:
    获取所述备份数据库中所述待恢复网元的每个已备份配置数据的已备份时长;Obtain the backup duration of each backup configuration data of the network element to be restored in the backup database;
    从所述备份数据库中获取所述已备份时长最短的已备份配置数据。Acquiring the backed up configuration data with the shortest backed up duration from the backup database.
  4. 如权利要求1所述的数据恢复方法,其中,所述获取待恢复网元的已备份配置数据,包括:The data restoration method according to claim 1, wherein said obtaining the backed up configuration data of the network element to be restored comprises:
    显示网元恢复页面,所述网元恢复页面包括处于故障状态的待恢复网元的标识信息;Displaying a network element recovery page, where the network element recovery page includes identification information of a network element to be recovered in a fault state;
    获取用户在所述网元恢复页面中的选择的标识信息,并显示所述选择的标识信息对应的待恢复网元的已备份配置数据列表;Obtaining the identification information selected by the user in the network element restoration page, and displaying the backed up configuration data list of the network element to be restored corresponding to the selected identification information;
    获取用户在所述已备份配置数据列表中选择的文件标识,并从备份数据库中获取所述文件标识对应的已备份配置数据。Obtain the file ID selected by the user in the backed up configuration data list, and acquire the backed up configuration data corresponding to the file ID from the backup database.
  5. 如权利要求1所述的数据恢复方法,其中,所述根据所述待恢复网元的标识信息和所述已备份配置数据,生成第二校验码,包括:The data recovery method according to claim 1, wherein said generating a second check code according to the identification information of said network element to be recovered and said backed up configuration data comprises:
    对所述待恢复网元的标识信息和所述已备份配置数据进行拼接,得到拼接后的配置数据;Splicing the identification information of the network element to be restored and the backup configuration data to obtain spliced configuration data;
    基于预设的校验码生成算法和所述拼接后的配置数据,生成所述第二校验码。The second check code is generated based on a preset check code generation algorithm and the concatenated configuration data.
  6. 如权利要求1-5中任一项所述的数据恢复方法,还包括:The data recovery method according to any one of claims 1-5, further comprising:
    获取待备份网元发送的待备份配置数据和第四校验码,所述第四校验码是所述待备份网元根据本身存储的待备份配置数据和所述待备份网元的标识信息生成的;Obtain the configuration data to be backed up and the fourth check code sent by the network element to be backed up, the fourth check code is the configuration data to be backed up stored by the network element to be backed up and the identification information of the network element to be backed up Generated;
    根据获取到的待备份配置数据和所述待备份网元的标识信息生成第五校验码;generating a fifth check code according to the acquired configuration data to be backed up and the identification information of the network element to be backed up;
    在所述第四校验码与所述第五校验码相同时,存储所述待备份配置数据和所述第五校验码,以完成所述待备份网元的配置数据备份。When the fourth check code is the same as the fifth check code, storing the configuration data to be backed up and the fifth check code, so as to complete the configuration data backup of the network element to be backed up.
  7. 一种数据恢复方法,包括:A data recovery method comprising:
    获取网络管理设备发送的数据恢复指令,所述数据恢复指令包括第二校验码;Obtaining a data restoration instruction sent by the network management device, where the data restoration instruction includes a second check code;
    根据所述数据恢复指令从所述网络管理设备中下载已备份配置数据;downloading the backed up configuration data from the network management device according to the data recovery instruction;
    根据网元的标识信息和下载得到的已备份配置数据,生成第三校验码;Generate a third check code according to the identification information of the network element and the downloaded backed up configuration data;
    若所述第二校验码与所述第三校验码相同,则根据下载得到的已备份配置数据进行数据恢复。If the second check code is the same as the third check code, perform data restoration according to the downloaded configuration data that has been backed up.
  8. 根据权利要求7所述的数据恢复方法,其中,所述根据所述数据恢复指令从所述网络管理设备中下载已备份配置数据,包括:The data recovery method according to claim 7, wherein said downloading the backed up configuration data from the network management device according to the data recovery instruction comprises:
    从所述数据恢复指令中获取待下载的已备份配置数据的文件存储位置;Acquiring the file storage location of the backed up configuration data to be downloaded from the data recovery instruction;
    根据所述文件存储位置,从所述网络管理设备中下载对应的已备份配置数据。Download corresponding backed up configuration data from the network management device according to the file storage location.
  9. 一种网络管理设备,其中,所述网络管理设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如权利要求1至6中任一项所述的数据恢复方法的步骤。A network management device, wherein, the network management device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a computer program for realizing communication between the processor and the memory A data bus connected for communication, wherein when the computer program is executed by the processor, the steps of the data recovery method according to any one of claims 1 to 6 are realized.
  10. 一种存储介质,用于计算机可读存储,其中,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至8中任一项所述的数据恢复方法的步骤。A storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement claims 1 to 8 The steps of any one of the data recovery methods.
PCT/CN2022/095527 2021-06-04 2022-05-27 Data recovery method and device, and storage medium WO2022253125A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110626936.5A CN115437835A (en) 2021-06-04 2021-06-04 Data recovery method, device and storage medium
CN202110626936.5 2021-06-04

Publications (1)

Publication Number Publication Date
WO2022253125A1 true WO2022253125A1 (en) 2022-12-08

Family

ID=84271660

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/095527 WO2022253125A1 (en) 2021-06-04 2022-05-27 Data recovery method and device, and storage medium

Country Status (2)

Country Link
CN (1) CN115437835A (en)
WO (1) WO2022253125A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1815974A (en) * 2005-02-06 2006-08-09 华为技术有限公司 Method and system for duplicating and recovering network element configuration data
CN101202644A (en) * 2006-12-15 2008-06-18 中兴通讯股份有限公司 Data backup and recovery method
US20150100819A1 (en) * 2013-10-03 2015-04-09 Andrey Fedorov Method of Recovering Data in a Storage Device
CN107133120A (en) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 A kind of method of calibration of file data, device
CN111984465A (en) * 2020-07-28 2020-11-24 北京人大金仓信息技术股份有限公司 Database remote backup method, device, medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1815974A (en) * 2005-02-06 2006-08-09 华为技术有限公司 Method and system for duplicating and recovering network element configuration data
CN101202644A (en) * 2006-12-15 2008-06-18 中兴通讯股份有限公司 Data backup and recovery method
US20150100819A1 (en) * 2013-10-03 2015-04-09 Andrey Fedorov Method of Recovering Data in a Storage Device
CN107133120A (en) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 A kind of method of calibration of file data, device
CN111984465A (en) * 2020-07-28 2020-11-24 北京人大金仓信息技术股份有限公司 Database remote backup method, device, medium and electronic equipment

Also Published As

Publication number Publication date
CN115437835A (en) 2022-12-06

Similar Documents

Publication Publication Date Title
JP5989807B2 (en) Software installation method, device and system
US10148731B2 (en) Methods, systems, and computer readable media for on-boarding virtualized network function (VNF) packages in a network functions virtualization (NFV) system
US7480907B1 (en) Mobile services network for update of firmware/software in mobile handsets
US20120226823A1 (en) Document distribution system and method
US9984255B2 (en) Methods and apparatus to enable runtime checksum verification of block device images
CN110058867B (en) Application program mirror image packaging and installing method, computer device and storage medium
US11157656B2 (en) Method and system for software image verification using a Null File
CN112565393B (en) File uploading method, downloading method, device, computer equipment and storage medium
WO2015131603A1 (en) Differential upgrade method, serving end and terminal
KR101954976B1 (en) System for managing data backup and method thereof
US10687216B2 (en) Antitheft method for mobile terminal and apparatus
CN105981332A (en) Broadcasting management information using fountain codes
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
WO2017124736A1 (en) Method, device and system for transmitting upgrade abnormality information
CN111654522B (en) File synchronization method, file synchronization server and storage medium
CN113746638A (en) NFT storage method, NFT restoration method, computer device, and storage medium
US11269540B2 (en) Method, apparatus, and computer program product for managing application system
WO2019095388A1 (en) Remotely-assisted processing method and device
CN111176685A (en) Upgrading method and device
CN112131041A (en) Method, apparatus and computer program product for managing data placement
WO2022253125A1 (en) Data recovery method and device, and storage medium
CN107872336B (en) Mounting point identification method and system and identification management equipment
CN111858156A (en) Mirror image management method and device and electronic equipment
CN101616002B (en) User identity authentication method and device thereof
CN111400771A (en) Target partition checking method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22815171

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE