WO2019184877A1 - 一种数据处理的方法以及相关设备 - Google Patents

一种数据处理的方法以及相关设备 Download PDF

Info

Publication number
WO2019184877A1
WO2019184877A1 PCT/CN2019/079536 CN2019079536W WO2019184877A1 WO 2019184877 A1 WO2019184877 A1 WO 2019184877A1 CN 2019079536 W CN2019079536 W CN 2019079536W WO 2019184877 A1 WO2019184877 A1 WO 2019184877A1
Authority
WO
WIPO (PCT)
Prior art keywords
management device
data
repeater
management
forwarder
Prior art date
Application number
PCT/CN2019/079536
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP19775975.6A priority Critical patent/EP3761604B1/en
Publication of WO2019184877A1 publication Critical patent/WO2019184877A1/zh
Priority to US17/030,168 priority patent/US11477067B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0695Management of faults, events, alarms or notifications the faulty arrangement being the maintenance, administration or management system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration
    • H04L41/0873Checking configuration conflicts between network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities

Definitions

  • the present application relates to the field of communications, and in particular, to a data processing method and related equipment.
  • the controller in the software defined network includes multiple scenarios when managing the forwarder.
  • one scenario is single-head management, that is, the forwarder is only managed by the controller, and the other scenario is long.
  • Management ie the repeater can be controlled by a plurality of management devices, which can include controllers or other management devices.
  • the scenario in which the controller and the management device generate data inconsistency in the interaction may include multiple types, for example, the repeater restarts, but the configuration on the forwarder is not saved, the repeater, and the controller.
  • the network failure or the reason of the forwarder itself for example, the busy of the repeater system, or the database restoration of the controller and the remote disaster recovery scenario may cause the data on the forwarder and the management device to be inconsistent.
  • the scenario in which the data between the management device and the forwarder is inconsistent in the single-head management scenario can be repaired by the management device or the forwarder.
  • the data of the forwarding device and the management device may be inconsistent.
  • the reason is that the forwarding device is controlled by other management devices except the management device, and the data sent by the other management device is sent by the management device.
  • the data conflicts, causing the data on the forwarder to be inconsistent with the data on the management device.
  • the forwarder is often unable to determine whether the data on the management device is the primary or the data on the forwarder, so that the data synchronization processing method is complicated and the efficiency is low. Therefore, in a multi-head management scenario, how to ensure the consistency of the management device and the forwarder data becomes an urgent problem to be solved.
  • the present invention provides a data processing method and related device, which can be used to implement data consistency between a management device and a forwarder more efficiently and flexibly in a scenario of multi-head management, and improve reliability of communication between the management device and the repeater.
  • the first aspect of the present application provides a data processing method, the application and the multi-head management scenario, where the multi-head management scenario is a scenario in which the forwarder is managed by multiple management devices, and the method may include:
  • the first management device of the plurality of management devices sends a lock instruction to the repeater, where the lock command is used to indicate that the repeater is switched to a locked state, where the lock state is a state that the repeater is controlled only by the first management device
  • the first management device compares the target data of the user with the corresponding data corresponding to the target data on the forwarder to obtain a comparison result, and if the first management device determines the target data and the corresponding data by using the comparison result If the data does not match, the first management device synchronizes the target data with the corresponding data to match the target data with the corresponding data.
  • the first management device first locks the forwarder, so that the forwarder is in a locked state that can only be controlled by the first management device, and the other management device is prevented from the first management device and the forwarder. After the data synchronization is performed, the first management device synchronizes the target data with the corresponding data, so that the target data on the first management device is consistent with the corresponding data corresponding to the target data on the forwarder. Sex.
  • the first management device sends a lock instruction to the forwarder, which may include:
  • the first management device sends a lock instruction to the repeater, where the lock instruction includes the lock indication and identity information of the first management device, where the identity information is used by the repeater to determine a lock source, and the lock indication is used for
  • the repeater is instructed to switch to a locked state that can only be controlled by the first management device.
  • the first management device may send a lock instruction to the forwarder by using a preset format, such as the netconf protocol format, and the lock command may carry the identity information of the first management device and the lock indication
  • the repeater can determine the source of the lock according to the identity information, and by using the identity information and the lock indication, the repeater can switch to a lock state that can only be controlled by the first management device, reducing the first management device and forwarding. Interference between the devices during communication ensures data consistency between the first management device and the repeater.
  • the first management device synchronizes the target data with the corresponding data, include:
  • the first management device determines, according to the comparison result, that the corresponding data is updated according to the target data, or updates the target data according to the corresponding data.
  • the first management device may determine, according to the comparison result, that the corresponding data is updated based on the target data, or update the target data according to the corresponding data, and the management device determines the synchronization manner according to the comparison result, which may be improved.
  • the efficiency and accuracy of data synchronization may be improved.
  • the first management device synchronizes the target data with the corresponding data, and further Can include:
  • the first management device can obtain input information in response to the user's operation, and then the first management device determines, according to the input information, an update manner of the target data and the corresponding data.
  • the user may manually select the update manner of the target data and the corresponding data, and then the first management device updates the target data and the corresponding data according to the user's selection, and may adjust the target data and the corresponding data according to actual conditions.
  • the update method makes the synchronization of the target data and the corresponding data closer to the actual demand, and can more flexibly synchronize the target data with the corresponding data.
  • the first management device may further include a display interface, where the first management device obtains input information, the method It can also include:
  • the first management device displays the comparison result on the display interface.
  • the comparison result may be displayed on other display devices, which is not limited herein.
  • the comparison result is displayed on the display interface, and then the user determines the synchronization manner of the target data and the corresponding data according to the comparison result, and then inputs the synchronization mode to the first management device, and the first management device Updating the target data and the corresponding data enables the user to more intuitively observe the comparison result, so that the update of the target data and the corresponding data is accurate and closer to the actual demand.
  • the first management device compares the difference between the target data and the corresponding data to obtain a comparison result, which may include:
  • the first management device acquires each of the characteristics in the target data and each of the corresponding ones of the corresponding data; each characteristic of the first management device for the target data and each corresponding feature in the corresponding data Compare to get the comparison.
  • the collection granularity of the target data and the corresponding data is a characteristic, and each characteristic in the target data and each characteristic in the corresponding data are compared, so that the obtained comparison result is more accurate, and the subsequent target data is more accurate. More accurate with the update of the corresponding data.
  • the synchronization, by the first management device, the target data and the corresponding data may further include:
  • the first management device may determine that the target characteristics in the target data are the corresponding ones under the corresponding data. The feature is updated. If the comparison result is that the sub-characteristic under the target characteristic in the target data is less than the sub-characteristic under the corresponding characteristic of the corresponding data, the first management device may determine that the corresponding characteristic in the corresponding data is the target. The target characteristics under the data are updated.
  • the controller may determine the synchronization manner of the target data and the corresponding data according to the comparison result, thereby improving the efficiency of synchronizing the target data with the corresponding data, and when synchronizing the data, only the synchronization may be different. Partly, further improve synchronization efficiency.
  • the first management device may further include: the synchronization of the target data and the corresponding data may include:
  • the comparison result is displayed on the display interface of the first management device or other display device, and the user selects a synchronization manner of the target data and the corresponding data according to the displayed comparison result, and then inputs the selected synchronization in the first management device. After the first management device receives the input information, the first management device synchronizes the target data with the corresponding data.
  • the synchronization manner of the target data and the corresponding data may be determined by the user according to the comparison result displayed by the display interface, so that the synchronization mode is closer to the actual requirement, and the target data and the corresponding data may be more flexibly synchronized.
  • the method may further include:
  • the first management device sends an unlocking instruction to the repeater, where the unlocking command is used for at least the repeater to release the locked state, so that the repeater can be managed by other management devices except the first management device.
  • the first management device may send an unlocking instruction to the forwarder, so that the repeater can be released only by the first management device.
  • the lock state of the control is performed.
  • the other management device can send the lock command to the repeater and control the forwarder, so that the repeater can be more flexibly controlled by multiple management devices, and the multiple management devices can In this way, the transponder is controlled, and when each management device controls the transponder, it is not interfered by other management devices, and the data consistency between the management device and the transponder can be more ensured.
  • the method may further include:
  • the first management device determines that the target data is inconsistent with the corresponding data on the forwarder, the first management device updates the corresponding data on the forwarder by using the target data.
  • the first management device can implement normal communication with the forwarder, and if the first management device discovers the data of the first management device and the data of the forwarder If the data is inconsistent, the first management device may update the data of the forwarder according to the data of the first management device, so that the data on the first management device is consistent with the corresponding data on the forwarder.
  • the first management device Obtaining each of the characteristics in the target data and each of the corresponding ones in the corresponding data may include:
  • the first management device acquires each of the characteristics in the target data and each of the corresponding ones of the corresponding data according to the yang data model or the tree structure.
  • the first management device may collect the target data and the corresponding data according to the yang data model or the tree structure model, and subsequently compare the difference between the target data and the corresponding data through the yang data model and the tree structure model. To make the results of the difference comparison more accurate.
  • the second aspect of the present application provides a data processing method, the application and the multi-head management scenario, where the multi-head management scenario is a scenario in which the forwarder is managed by multiple management devices, and the multiple management devices may include at least one first management device.
  • the method can include:
  • the forwarder receives a first lock instruction sent by the first management device of the plurality of management devices; the repeater switches to the first lock state according to the first lock instruction, where the first lock state is that the repeater can only be The state of the first management device control.
  • the forwarder after receiving the first locking instruction sent by the first management device, the forwarder may switch to the first locking state that can only be controlled by the first management device according to the first locking instruction, when the forwarder is in the In the first locked state, the forwarder can only be controlled by the first management device, so that the influence of other management devices on the communication between the first management device and the forwarder can be avoided.
  • the method may further include:
  • the forwarder receives the update information sent by the first management device, and the update information may be generated when the first management device performs data synchronization; the forwarder updates the corresponding data on the forwarder according to the update information, and the corresponding The data is data corresponding to the target data on the forwarder, and the target data is data on the first management device.
  • the first management device when the forwarder is in the first locked state that can only be controlled by the first management device, the first management device may target data on the first management device and the target data on the forwarder. Corresponding corresponding data is synchronized. Therefore, when the corresponding data is updated, because the repeater is in the first locked state, interference of other management devices when the first management device controls the repeater can be avoided, thereby improving the first Manage the communication efficiency and reliability of the device with the repeater.
  • the forwarder receiving the first lock command sent by the first management device of the multiple management devices may include:
  • the forwarder receives the lock instruction in the preset format sent by the first management device, and the lock command may include the lock indication and the identity information of the first management device.
  • the lock command may be generated by the first management device according to a preset protocol format, and the protocol may be a netconf, where the lock command may include a lock indication and identity information of the first management device, and the forwarder may be based on the identity information. Determining the locking source, and then switching to the first locking state that can only be controlled by the first management device according to the identity information and the locking indication, to prevent other management devices from communicating with the forwarding device when the first management device communicates with the forwarding device influences.
  • the forwarding device may switch to the first locked state according to the first locking instruction, and may include:
  • the repeater identifies the lock source according to the identity information; the repeater switches to the first lock state according to the lock source and the first lock indication.
  • the forwarder can identify the lock source according to the identity information in the lock instruction, and the identity information can be the user identifier of the first management device.
  • the switch After determining the lock source, the switch can be locked according to the first lock indication, and can be switched to only The first locking state controlled by the first management device, that is, the locking of the transponder by the first management device is implemented. Therefore, interference of other management devices when the first management device communicates with the repeater can be avoided.
  • the repeater switches to the first locked state according to the locking source and the first locking instruction.
  • the forwarder receives the configuration data; the forwarder determines whether the identification information of the device that sends the configuration data matches the identity information of the first management device; and the identity information of the device that sends the configuration data and the identity of the first management device If the information is matched, the forwarder saves the configuration data; if the identifier information of the device that sends the configuration data does not match the identity information of the first management device, the forwarder discards the configuration data, or sends the configuration data.
  • the management device responds with a failure message.
  • the forwarder can identify the device that sends the configuration data, and if the device that sends the configuration data is added If the lock source is used, the forwarder can save the configuration data or other corresponding operations. If the device that sends the configuration data is not a lock source, the forwarder can ignore or respond to the failure information, so that other devices can be avoided.
  • the data on the repeater is modified when the forwarder is locked.
  • the method may further include:
  • the repeater receives an unlock command sent by the first management device, and the repeater cancels the first lock state according to the unlock command.
  • the first management device may send an unlocking instruction to the forwarder, and when the forwarder receives the unlocking command, the first lock may be released according to the unlocking command.
  • the unlocking command may be sent by the first management device by using an unlocking command.
  • the unlocking command may include the identity information of the first management device, and the repeater may determine the unlocking source according to the identity information. .
  • the method may further include:
  • the repeater determines that the first management device does not respond within the preset time, or the required data of the repeater is not within the management range of the first management device, the repeater releases the first locked state.
  • the forwarder when the first management device does not respond within a preset time, for example, the first management device is down, powered off, or the system is busy, or the data required by the repeater is not in the first management.
  • the forwarder can forcibly release the first locked state, so that the forwarder can normally communicate with other management devices, and the forwarder can be prevented from being idle for a long time, thereby avoiding waste of network resources.
  • the method may further include:
  • the transponder receives a second locking instruction sent by the second management device of the plurality of management devices except the first management device, and the transponder switches to the second management device according to the second locking instruction.
  • the second locked state When the repeater is in the second locked state, the second management device may also synchronize data on the second management device with data on the forwarder.
  • the forwarder may receive the second locking instruction sent by the second management device, and then the forwarder may switch to the second locked state according to the second locking instruction, and forward
  • the forwarder can only be controlled by the second management device, and can be prevented from being affected by other management devices when the second management device communicates with the forwarder.
  • the eighth embodiment of the second aspect of the present application Can also include:
  • the repeater If the repeater is in the first locked state, when the repeater receives the third locking instruction sent by the third management device, the repeater discards the third locking instruction, or manages to send the third locking instruction. The device responds with a failure message.
  • the forwarder can ignore, discard or respond to the failure information, etc., to ensure that the forwarder can only be locked by the current locker management. equipment control.
  • a third aspect of the embodiments of the present application provides a management device having a function of a method for implementing data processing of the first aspect described above.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • a fourth aspect of the embodiments of the present application provides a repeater having a function of a method for implementing data processing of the first aspect described above.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • a fifth aspect of the embodiments of the present application provides a management device, which may include:
  • a processor a memory, a bus, and an input/output interface, the processor, the memory and the input/output interface being connected through the bus; the memory for storing program code; the processor executing the application when the program code in the memory is executed.
  • a sixth aspect of the embodiments of the present application provides a repeater, which may include:
  • processor a processor, a memory, a bus, and an input/output interface, the processor, the memory and the input/output interface being connected through the bus; the memory for storing program code; the processor executing the application when the program code in the memory is executed.
  • a seventh aspect of the present application provides a communication system, where the communication system includes at least two management devices and a repeater, and the at least two management devices are in any one of the first to second embodiments of the present application. At least two management devices; the repeater is a repeater in any one of the first to second aspects of the present application.
  • the eighth aspect of the embodiments of the present application provides a storage medium.
  • the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be implemented by software.
  • the computer software product is stored in a storage medium for storing computer software instructions for use in the above apparatus, comprising: for performing any one of the first aspect to the second aspect described above as a management device or a repeater The program designed.
  • the storage medium includes: a U disk, a mobile hard disk, a read only memory (English abbreviation ROM, English full name: Read-Only Memory), a random access memory (English abbreviation: RAM, English full name: Random Access Memory), a disk or a disk. And other media that can store program code.
  • a ninth aspect of the embodiments of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method as described in any of the alternative aspects of the first or second aspect of the present application.
  • the repeater when the repeater processes the multi-head management scenario, the repeater is controlled by multiple management devices.
  • the forwarder switches to the switch according to the lock command.
  • the locked state controlled by the first management device can be prevented from being interfered by other management devices when the first management device controls the repeater.
  • the first management device performs a difference comparison between the target data of the first management device and the corresponding data on the forwarder, and performs data synchronization on the target data and the corresponding data, so that the target data on the first management device corresponds to the forwarder.
  • the data is consistent, because the forwarder is in a locked state that can only be controlled by the first management device and cannot be controlled by the management device except the first management device. Therefore, difference comparison and data synchronization can be avoided in the first management device. When it is interfered by other management devices, the data consistency between the first management device and the forwarder is more efficiently and flexibly guaranteed.
  • FIG. 1 is a schematic diagram of a network architecture in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of data in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an embodiment of a method for data processing in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another embodiment of a method for data processing in an embodiment of the present application
  • FIG. 5 is a schematic diagram of a characteristic method of data processing in an embodiment of the present application.
  • FIG. 6 is another schematic diagram of data characteristics of a method for data processing in an embodiment of the present application.
  • FIG. 7 is another schematic diagram of data characteristics of a method for data processing in an embodiment of the present application.
  • FIG. 8 is another schematic diagram of data characteristics of a method for data processing in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of data comparison of a method for data processing in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of data synchronization of a method for data processing in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of an embodiment of a management device according to an embodiment of the present application.
  • FIG. 12 is a schematic diagram of an embodiment of a repeater in an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another embodiment of a management device according to an embodiment of the present application.
  • FIG. 14 is a schematic diagram of another embodiment of a repeater in an embodiment of the present application.
  • the present application provides a data processing method and related device, which can implement data consistency between a management device and a forwarder more efficiently and flexibly in a scenario of multi-head management, and improve reliability of communication between the management device and the repeater.
  • the SDN network is a network architecture that can be defined by software. It separates the control plane and data forwarding plane of the switch in the traditional network, and the centralized management device uniformly manages the repeaters in the network.
  • the SDN network may include a repeater and one or more management devices for managing the repeater.
  • the specific network architecture diagram of the present application may be as shown in FIG. 1.
  • the forwarder may be managed by multiple management devices, that is, a multi-head management scenario, and the multiple management devices may include at least one controller. Or one or more other management devices, the controller may be an agile controller (AC).
  • AC agile controller
  • the specific management method may be: taking a controller as an example, the controller may send data to the forwarder, including configuration data, forwarding data, etc., and then the controller performs data communication with the forwarder through a preset protocol format, including The controller controls the repeater to forward data and the like.
  • the repeater can be controlled by multiple management devices, so there may be multiple data of the management device on the forwarder.
  • the forwarder cannot determine to control.
  • Whether the data of the device is mainly based on the data on the repeater may cause the communication between the controller and the repeater to fail or the forwarder cannot forward the data. For example, as shown in FIG.
  • the embodiment of the present application provides a method for data processing. Please refer to FIG. 3 , which is a schematic flowchart of a data processing method according to an embodiment of the present application.
  • the first management device locks the forwarder.
  • the first management device locks the forwarder. Specifically, the first management device sends a lock command to the forwarder. For example, when the first management device needs to control the forwarder, first sending a lock command to the forwarder, and forwarding The device is locked so that the repeater is in the first locked state that can only be controlled by the first management device, and the forwarder can not receive or ignore the commands or data sent by other management devices except the first management device. You can also reply to the communication failure or the system is busy, and you can also open the query interface for other management devices to query the data. For a specific manner of locking the command, refer to the following description of the step 401 in the embodiment shown in FIG. 4, which is not limited in this application, and may be other locking methods.
  • the repeater When the repeater is in the first locked state, it can only be controlled by the first management device, and other management devices cannot control the forwarder. Therefore, when the first management device controls the repeater, for example, the first management device controls the forwarder to forward the forwarding data transmitted from the first management device to the user device. The other management device cannot control the forwarder to prevent other management devices from modifying the configuration data of the communication channel on the forwarder, resulting in data forwarding failure.
  • a management device of the plurality of management devices such as the first management device in the embodiment, such as an SDN controller, cannot be The forwarding device performs management, so that the first management device is not interfered by other management devices when controlling the forwarder, thereby improving the efficiency and reliability of communication between the first management device and the forwarder.
  • the first management device performs a difference comparison
  • the first management device After the first management device sends a lock to the forwarder, after the forwarder is in the first locked state, the first management device determines its own target data, and collects corresponding data corresponding to the target data on the forwarder, and the target data is Compare the differences with the corresponding data to get the comparison results.
  • the first management device may synchronize the target data with the corresponding data according to the comparison result and the preset synchronization manner, or determine, by the user, the target data and the comparison result according to the comparison result that the first management device presents to the user through the user interface. Synchronization method for synchronizing data.
  • the manner in which the first management device collects the corresponding data on the forwarder may be collected by the yang model, or may be collected through a tree structure, etc., and the specific implementation manner refers to the specific embodiment of the embodiment shown in FIG. 4 to FIG. 8 below. description.
  • the first management device synchronizes data with the forwarder.
  • the data is synchronized between the first management device and the forwarder, where the preset synchronization manner mentioned above may include the first management device determining the target data according to the comparison result. It is necessary to update the corresponding data or update the target data with the corresponding data.
  • the synchronization manner may be determined by the user according to the comparison result, for example, the user determines that the corresponding data is updated based on the target data, or updates the target data according to the corresponding data.
  • the first management device after the first management device locks the transponder, the first management device and the transponder perform data synchronization, and at this time, the first management device can be prevented from being interfered by other management devices.
  • the data consistency with the repeater improves the efficiency and reliability of communication between the first management device and the repeater.
  • the first management device may also send configuration data to the forwarder to enable the controller to communicate normally with the forwarder.
  • the first management device can perform normal communication with the forwarder, and the first management device controls the forwarder to forward data sent to the user device, or the forwarder pair The user sets the data to be forwarded and the like.
  • the first management device may use the first management device.
  • the data on it updates the data on the forwarder. For details, refer to the detailed description of the embodiment shown in FIG. 10 below.
  • the first management device unlocks the forwarder.
  • the transponder can be unlocked.
  • the specific manner in which the first management device unlocks the transponder may be that the first management device sends an unlocking instruction to the transponder, and the transponder may release the locked state after receiving the unlocking instruction.
  • the specific manner of the unlocking instruction refer to the specific description of the step 405 in the embodiment shown in FIG. 4, which is not limited in this application, and may also be other unlocking modes.
  • the transponder can receive information or instructions sent by any management device in the range of the transponder, so that other management devices can lock the transponder as needed to perform lock control, thereby ensuring other management devices.
  • Normal communication, and the switching by the unlocking of the lock may be that the repeater flexibly communicates normally between the plurality of management devices, thereby improving the reliability of communication between the repeater and other management devices. It can be understood that, when other management devices do not perform lock control on the repeater, the repeater is in a state of receiving multiple management device controls. Whether the management device needs to lock the forwarder is determined according to the type of data exchange performed by each management device on the forwarder.
  • the management device only needs to query the data on the forwarder, the associated device does not need to perform the forwarding on the forwarder.
  • Query if the management device needs to control the transponder or synchronize data between the data on the management device and the data on the transponder, for example, control the transponder to perform data forwarding or control the transponder to perform data modification, etc.
  • the management device needs to lock the transponder.
  • the second management device sends a lock instruction to the forwarder.
  • the repeater After the first management device sends the unlocking command to the repeater, the repeater is in an unlocked state.
  • the second management device may send a lock command to the forwarder, and the forwarder may switch according to the lock command sent by the second management device.
  • To a second locked state that can only be controlled by the second management device.
  • the second management device can control the repeater and is not interfered by other management devices.
  • the second management device may also perform a difference comparison between the data on the second management device and the data on the forwarder, and perform data synchronization based on the difference comparison result, so that the data on the second management device and the forwarder are The data on the device is consistent.
  • the second management device is a management device other than the controller, the second management device may not perform the difference comparison, and the second management device directly communicates with the forwarder. There is no limit.
  • the second management device sends an unlocking instruction to the forwarder.
  • the second management device When the second management device does not need to control the repeater, it also needs to send an unlocking instruction to the repeater to enable the repeater to release the second locked state.
  • the first management device sends a lock instruction to the forwarder.
  • the forwarder When the forwarder is in the unlocked state, if the first management device needs to continue to control the forwarder, the first management device needs to resend the lock command to the forwarder, and the forwarder can be locked before continuing with the forwarder. Communicate. For example, when the first management device needs to retransmit the transmission data to the user equipment through the repeater, the forwarder needs to be controlled. At this time, the first management device may send a lock instruction to the repeater to enable the repeater to switch. To a locked state that can only be controlled by the first management device.
  • the transponder when the first management device controls the transponder, the transponder is locked, and when the transponder is not controlled, the lock state of the transponder may be released, where the lock is locked.
  • the unlocking may be performed by other means. After the forwarder releases the locked state that can only be controlled by the first management device, the forwarder can be re-locked by the first management device, or can be locked by the second management device. Qualified, therefore, steps 305 through 307 can be optional steps.
  • a lock command needs to be sent to the forwarder. If the forwarder is in an unlocked state, the forwarder can switch to the first locked state, and then the first A management device can perform data synchronization with the repeater to ensure data consistency between the first management device and the forwarder. When the first management device does not need to control the repeater, the unlocking command may be sent to the repeater to cancel the first locked state of the forwarder.
  • the forwarder can normally receive information of other management devices, and can be locked and controlled by other management devices.
  • the transponder is locked, it can only be controlled by the locked management device. When the transponder is not locked, it can be locked and controlled by other devices, so the transponder can flexibly switch between the management devices. So that the multi-header management scenario of the repeater can communicate and work normally.
  • the foregoing describes the flow of the method for data processing provided by the embodiment of the present application.
  • the method for data processing in the implementation of the present application is further described below.
  • the first management device is used as a controller as an example.
  • FIG. 4 another embodiment of the method for data processing in the embodiment of the present application is described.
  • Schematic diagram including:
  • the controller sends a lock instruction to the forwarder.
  • the controller may first send a lock command to the repeater by using the netconf protocol.
  • the lock command includes the identity information of the controller and the lock indication.
  • the identity information of the controller may be a user identifier, that is, an identifier of the controller, and may be used by the repeater to identify a lock source, and the lock indication is used to instruct the repeater to switch to the first lock state.
  • the repeater is in the first locked state, a communication channel is established between the repeater and the controller, and the forwarder can only receive control information sent through the communication channel, that is, the forwarder can only receive the sent by the controller. Control information without receiving control information sent by other management devices.
  • the transponder when the transponder is in the first locked state, the transponder can only be controlled by the controller, and when the controller controls the transponder, the data on the transponder is modified by other management devices, for example, by other controls. Modifications such as the controller or the management server, resulting in communication errors or data forwarding failures between the controller and the repeater.
  • the repeater switches the locked state.
  • the lock command When the forwarder receives the lock command sent by the controller, the lock command includes a user identifier and a lock indication, and the forwarder can identify the lock source according to the user identifier, and if the forwarder is currently in an unlocked state, forwarding
  • the device can switch to the first locked state that can only be controlled by the controller according to the locking indication.
  • the repeater When the repeater is in a locked state that can only be controlled by the controller, the repeater only receives control information sent by the controller, if during this time, control information of other management devices, such as other controllers or management servers, is received.
  • the forwarder can confirm that the other management device is not a lock source by using the user identifier, so that the control information or response error sent by the other management device can be discarded; in addition, when the forwarder receives the lock command sent by the controller, The forwarder is currently locked. That is, the forwarder has been controlled by other management devices except the controller. The controller cannot currently lock the forwarder. Only when the forwarder is unlocked. The controller can lock the transponder.
  • the controller performs a difference comparison
  • the controller When the controller sends a lock command to the repeater, the repeater can only be controlled by the controller when the repeater switches to the first lock state.
  • the controller compares the target data on the controller with the corresponding data on the transponder to obtain a comparison result of the difference comparison, and the comparison result is used by the controller to determine whether the target data matches the corresponding data.
  • the controller performs the difference comparison specific steps, which may include:
  • the controller determines the target data on the controller and the corresponding data on the transponder corresponding to the target data.
  • the forwarder can provide a data query interface, and the controller can use the query interface to query corresponding data corresponding to the target data on the forwarder.
  • the controller includes virtual private network (vpn) interface data that communicates with the repeater, and the corresponding vpn interface data is also included on the forwarder.
  • the target data and the corresponding data may be other configuration data or communication data or the like.
  • the granularity of the target data and the corresponding data may be characteristics.
  • the feature may be an interface, a module, or the like.
  • the interface may include multiple sub-interfaces, or the module may include multiple sub-modules and the like.
  • the target data and the corresponding data may be presented in a yang model or based on a tree structure.
  • the target data and the corresponding data may be interface management (ifm) characteristic data, for example, the number of interfaces on the controller and the repeater,
  • the controller uses the ifm attribute as the path to collect the ifm characteristic data on the forwarder.
  • the sub-feature under the ifm attribute is a child node, and the tree structure of the ifm attribute is collected.
  • the target data and the corresponding data may be quality of service (qos) characteristic data, such as channel data, address data, etc., as shown in FIG.
  • the corresponding data may be stored in a tree structure in the database of the repeater, and the controller
  • the qos feature is used as the path to collect corresponding data.
  • Each sub-node is a sub-characteristic under the qos characteristic. All sub-nodes under the qos feature are collected to complete the tree structure of the qos feature.
  • the initial node to be collected may be a root node in the forwarder database, or may be a non-root node.
  • the B characteristics and the C characteristics under the A characteristic are respectively two characteristics. Take the B characteristic or C characteristic as the root node, and collect all the child nodes under the A feature to collect the corresponding data of the complete transponder. Therefore, in practical applications, the controller can collect corresponding data according to the tree structure, and can collect complete corresponding data, and has high efficiency and high accuracy.
  • the controller compares the target data of the controller with the corresponding data corresponding to the target data on the forwarder. If the structural model of the target data and the corresponding data is a tree structure, the tree structure and the corresponding data of the target data may be In the embodiment of the present application, the controller can compare each node to avoid data omission and make the comparison result more accurate. As shown in FIG. 8, the controller traverses the target data and the corresponding data, that is, the data on the controller and the nodes in the tree structure of the data on the transponder, and can obtain the result of the difference comparison, that is, the target data and the corresponding
  • the difference in data for example, the result of the difference comparison may be that, as shown in FIG.
  • the sub-characteristic of the characteristic 1 of the target data is more than the sub-characteristic of the characteristic 1 of the corresponding data
  • the sub-characteristic of the characteristic 2 of the target data and the corresponding data The sub-characteristics of the characteristic 2 are identical
  • the sub-characteristic of the characteristic 3 of the target data is less than the sub-characteristic of the characteristic 3 of the corresponding data
  • the sub-characteristic of the characteristic 4 in the target data collides with the sub-characteristic of the characteristic 4 of the corresponding data.
  • the controller determines the synchronization manner of the target data and the corresponding data. Further, if the controller includes the display interface, the comparison result may be displayed in the display interface, and then the user selects a synchronization manner of the target data and the corresponding data.
  • the controller synchronizes data with the repeater.
  • the controller compares the differences and obtains the comparison result of the difference comparison, if the controller knows that the target data does not match the corresponding data through the comparison result, the controller and the corresponding data on the repeater are inconsistent, or the controller and the forwarding If the data on the device does not correspond, the controller can synchronize the target data with the corresponding data, so that the synchronized target data matches the corresponding data. After the data synchronization is completed, the controller can also send configuration data to the forwarder to enable the controller to communicate normally with the forwarder.
  • the specific method for performing data synchronization may be: if the data on the forwarder is updated based on the data on the controller, the controller may send the update information to the forwarder, and the update information may be data on the controller.
  • the part that is different from the data on the transponder may also be the data on the entire controller, which is not limited herein.
  • the update information may be saved to the forwarder, or the forwarder may update the data on the forwarder according to the update information in a preset manner. limited. If the data on the controller is updated based on the data on the transponder, the controller may directly obtain the difference data from the data query interface provided by the transponder, and then save the difference data to the controller, or The controller obtains all the data corresponding to the data on the controller on the forwarder, and then saves all the data corresponding to the data on the controller, which is not limited herein.
  • the synchronization process may refer to FIG. 10.
  • the controller may take the feature 1 in the target data as the standard.
  • the feature 1 in the corresponding data is updated so that the feature 1 in the updated corresponding data is consistent with the feature 1 in the target data.
  • the controller may not update the target data and the characteristic 2 in the corresponding data.
  • the controller may update the characteristic 3 in the target data according to the characteristic 3 in the corresponding data, so that the characteristic 3 in the target data and the corresponding data are The characteristic 3 is consistent.
  • the characteristic 4 in the target data collides with the characteristic 4 in the corresponding data
  • the characteristic 4 in the target data or the corresponding data may be marked, and the characteristic 4 in the target data and the characteristic 4 in the corresponding data are temporarily not processed.
  • the characteristic 4 in the corresponding data is updated with the characteristic 4 in the target data, or the characteristic 4 in the target data is updated with the characteristic 4 in the corresponding data.
  • the controller automatically determines the synchronization manner of the target data and the corresponding data according to the preset synchronization manner. For example, the synchronization manners for different characteristics may be different, thereby improving the accuracy of synchronizing the target data with the corresponding data, and the controller. Work efficiency.
  • the preset synchronization manner may include: for conflicting data, the replacement message may be sent by the controller, so that the corresponding data on the forwarder is consistent with the target data on the controller;
  • the extra data of the device can be created by the controller, and the data is added by the controller.
  • the data sent by the controller can be deleted by the controller to delete the forwarder.
  • the extra data is outputted; the controller can directly issue the replacement message, and update the corresponding data based on the target data.
  • the comparison result of the difference comparison is displayed on the controller or other display device, and the synchronization mode is selected by the user according to the comparison result, and then the controller can receive the input information of the user, and then The controller or the repeater synchronizes the target data with the corresponding data according to a synchronization mode selected by the user.
  • an interface as shown in FIG. 9 may be displayed on a controller or other display device, and the user may choose to update the characteristic 1 in the target data based on the characteristic 1 in the corresponding data, or the characteristic 3 in the target data. It is necessary to update the feature 3 in the corresponding data.
  • the manner of updating the target data and the corresponding data can be more flexibly determined, which is closer to the actual demand.
  • the controller performs difference comparison and data synchronization, if for other reasons, for example, the repeater restarts, the configuration data is not saved, the network fault between the repeater and the controller, the repeater itself is busy, etc., causing the repeater
  • the corresponding data on the controller is inconsistent with the target data on the controller
  • the corresponding data on the forwarder may be updated based on the target data on the controller, and the target data and the forwarder on the controller may be caused by the controller.
  • the target data on the controller may be updated based on the data on the repeater.
  • the forwarder is forcibly unlocked
  • the controller can normally control the repeater to communicate. For example, the controller can control the repeater to forward data to the terminal device connected to the repeater.
  • the unlocking command may be sent to the transponder to unlock the transponder.
  • the transponder may be controlled by other management devices. It can also be a forced unlocking by the repeater. For example, when the controller is abnormal, including the cause of downtime, power failure, or system busy, if the sender does not send information or respond to the repeater for a long time, the repeater can perform forced unlocking and release the repeater.
  • the first locked state, and then the repeater can communicate with the second management device, receive a lock command of the second management device, and the like.
  • the specific unlocking step may be: the controller sends an unlocking instruction to the repeater, where the unlocking instruction may include identity information of the controller and an unlocking indication, where the identity information may be
  • the forwarder can compare the user identifier with the user identifier of the lock source. If the user identifier is consistent with the identifier of the lock source, the repeater can cancel the identifier according to the unlock indication.
  • the repeater may not perform the lock state release.
  • the repeater when the controller does not send information to the repeater within the preset time, or the data required by the forwarder is not within the management range of the controller, the repeater may directly release the locked state, and then the repeater The second management device can communicate with each other to avoid reducing the communication efficiency of the repeater due to the long-term non-response of the controller.
  • the controller After the forwarder is directly unlocked, if the controller works normally, the controller can sense that the forwarder releases the locked state controlled by the controller. If the controller needs to send data to the forwarder, the controller needs to re-apply the The transponder locks and relocks before continuing data transmission.
  • the first lock state of the repeater can be directly released, so that the second management device can send the forwarder to the forwarder.
  • the instruction is locked, the waiting time of the second management device is reduced, and the communication efficiency between the second management device and the repeater is improved.
  • the data required by the repeater is not within the management scope of the controller, and if the data required by the repeater is within the management range of the second management device, the first lock state of the repeater can be released.
  • the second management device locks the forwarder, and then the forwarder obtains data required by the forwarder through the second management device, thereby improving the working efficiency of the forwarder.
  • the repeater After the controller sends the unlock command to the repeater, the repeater is unlocked, or after the repeater is forcibly unlocked, if the controller needs to control the repeater again, the controller needs to resend the lock command to the repeater, so that the repeater is re-located.
  • the state is locked and the difference is compared with the data synchronization before the controller can control the repeater.
  • the second management device sends a lock instruction to the forwarder.
  • the second management device other than the controller may also send a lock command to the forwarder.
  • a lock command For a specific implementation, refer to step 401 in the foregoing embodiment shown in FIG. 4 to enable forwarding.
  • the device is in a locked state controlled by the second management device.
  • the second management device may be a terminal device including a command-line interface (CLI), or may be another network management device.
  • the second management device may also be a controller.
  • a control instruction may be input in the CLI by the user or other network management device, and then the instruction is executed by the terminal device including the CLI, when the forwarder is included
  • the repeater can only be controlled by the terminal device including the CLI, including the modification of the data on the repeater only by the terminal device including the CLI, except for the terminal device including the CLI.
  • the management device cannot modify the data on the forwarder, so as to prevent the forwarder from modifying data when it communicates with the terminal device including the CLI, other than the terminal device including the CLI, thereby causing the The case where the repeater fails to communicate with the terminal device including the CLI or the data forwarding fails.
  • the repeater switches the locked state.
  • the forwarder may identify the lock source as the second management device according to the lock command, and then switch to the second lock state according to the lock instruction in the lock command.
  • the repeater When the repeater is in the second locked state, the repeater only receives control information of the second management device, for example, data synchronization information, configuration data, and the like.
  • the second management device when the second management device is a management device other than the controller, the second management device may send a lock instruction to the repeater to lock the transponder, and the second management device may perform data The difference is compared with the data, and the transponder can be directly controlled, which is not limited herein.
  • the second management device sends an unlocking instruction to the forwarder.
  • the second management device may send an unlocking instruction to the repeater to release the second locked state that the repeater can only be controlled by the second management device.
  • the forwarder can also perform the forced unlocking, and then the other management device sends the locking command to the repeater through another channel. Configure, then the forwarder is controlled by another management device. For example, when the user finds that the controller is turned off due to power failure, or the controller does not respond for a long time, and the repeater is still in the locked state controlled by the controller, the repeater can perform forced unlocking and release the controller. Control, then the repeater is locked by other management devices, and the repeater is controlled by other management devices.
  • the repeater is unlocked.
  • the forwarder After receiving the unlocking command sent by the second management device, the forwarder cancels the second locked state, that is, the forwarder can receive the locking command sent by the other management device at this time.
  • the controller sends a lock instruction to the repeater.
  • the controller needs to control the repeater, the controller needs to re-send the lock command to the repeater to switch the repeater to the locked state controlled only by the controller. Then perform data synchronization and data transmission.
  • the controller when the controller performs management control on the transponder, first, the controller sends a lock instruction to the transponder to lock the transponder so that the transponder is in a locked state that can only be controlled by the controller. Preventing other management devices from tampering with data on the forwarder when the controller communicates with the repeater, avoiding the correspondence between the target data on the controller and the forwarder due to modification of the corresponding data on the repeater by other management devices After the data is inconsistent, the controller compares the difference between the target data and the corresponding data, and synchronizes the data between the target data and the corresponding data, so that the target data on the controller is consistent with the forwarding data on the forwarder, and then the controller It can communicate with the repeater, which is controlled by the controller.
  • an unlocking instruction may be sent to the transponder to unlock the transponder.
  • the transponder may be locked and controlled and communicated by other management devices, and the other device may be avoided.
  • the data is modified while communicating with the repeater.
  • the current network includes a controller, a repeater, and a network management device, and the controller and the network management device can control the forwarder, and the controller needs to control the forwarder.
  • the controller may first send a lock instruction to the transponder, so that the transponder is in a locked state that can only be controlled by the controller, and the network management device cannot control the transponder at this time.
  • the configuration data on the forwarder could not be modified.
  • a management channel is established between the controller and the repeater.
  • the controller compares the target data, such as its own target configuration data, with the corresponding data on the transponder, for example, the corresponding configuration data, and the difference may be based on the characteristics in the data, if the target If the configuration data is inconsistent with the corresponding configuration data, the controller may update the target configuration data and the corresponding configuration data, and the controller may update the corresponding configuration data by using the target configuration data, or may be corresponding configuration on the forwarder. The data is updated to the target configuration data, so that the target configuration data is consistent with the corresponding configuration data, and the controller cannot control the repeater because the target configuration data is inconsistent with the corresponding configuration data.
  • the target data such as its own target configuration data
  • the forwarder can automatically perform the forced unlocking, or the repeater responds to the user operation. Forcibly unlocking, etc., the controller is locked to the transponder.
  • the network management device can send a lock instruction to lock the forwarder to the forwarder through the another management channel, and send configuration data of the network management device. If the controller is always in a normal working state, the controller can send an unlocking instruction to the repeater when the controller is not required to perform the controller to unlock the transponder. Then, the network management device can send a lock instruction to the forwarder, so that the forwarder is in a locked state controlled by the network management device, and then the network management device controls the forwarder and normal communication.
  • a schematic diagram of an embodiment of the management device in the embodiment of the present application includes:
  • the sending unit 1101 is configured to send a lock instruction to the repeater, where the lock command is used to indicate that the repeater switches to a first locked state, where the first locked state is a state that the repeater is controlled only by the first management device.
  • the specific implementation steps of the first management device in the step 301 in the embodiment corresponding to the foregoing FIG. 3 and the step 401 in the embodiment corresponding to FIG. 4 are implemented;
  • the comparison unit 1102 is configured to perform a difference comparison between the target data and the corresponding data to obtain a comparison result, where the target data is data on the first management device, and the corresponding data is data on the forwarder.
  • the synchronization unit 1103 is configured to: if the target data is determined to be inconsistent with the corresponding data, the target data is synchronized with the corresponding data, so that the target data is matched with the corresponding data, specifically used to implement the foregoing figure.
  • the sending unit 1101 is configured to send, to the repeater, a lock command in a preset format, where the lock command includes a lock indication and identity information of the first management device, where the identity information is used by the repeater to determine a lock source.
  • the specific implementation steps of the first management device in the step 401 of the embodiment corresponding to FIG. 4 are implemented.
  • the synchronization unit 1103 is specifically configured to: according to the comparison result, determine to update the corresponding data according to the target data, or update the target data according to the corresponding data, specifically for implementing the foregoing corresponding FIG. Step 301 in the embodiment and the specific implementation steps of the first management device in step 401 of the embodiment corresponding to FIG. 4 described above.
  • the synchronization unit 1103 is specifically configured to:
  • the management device further includes:
  • the display interface 1104 is configured to display the comparison result of the difference comparison, and is specifically used to implement the step 301 in the foregoing embodiment corresponding to FIG. 3 and the specific implementation steps of the first management device in the step 403 of the embodiment corresponding to FIG. 4 .
  • the comparing unit 1102 is specifically configured to:
  • each of the characteristics of the target data and the corresponding one of the corresponding data are compared to obtain the comparison result, which is specifically used to implement the step 302 in the embodiment corresponding to FIG. 3 and the implementation of the foregoing FIG.
  • the sending unit 1101 is further configured to send an unlocking instruction to the repeater, where the unlocking command is used to at least the repeater cancels the locked state, so that the repeater can be managed by other management devices except the first management device.
  • the specific implementation steps of the first management device in step 304 of the embodiment corresponding to FIG. 3 are implemented.
  • the synchronization unit 1103 is further configured to: after the synchronization unit synchronizes the target data with the corresponding data, if the target data is inconsistent with the corresponding data on the forwarder, pass the target data to the forwarder.
  • the corresponding data is updated, and is specifically used to implement the specific implementation steps of the first management device in the step 303 in the embodiment corresponding to FIG. 3 and the step 404 in the embodiment corresponding to FIG. 4 .
  • the comparison unit 1102 is specifically configured to acquire each of the characteristics of the target data and the corresponding one of the corresponding data according to the Yang data model, or the tree structure, specifically for implementing the foregoing embodiment corresponding to FIG. Step 302 in step and step 403 in the foregoing embodiment corresponding to FIG. 4 are specific implementation steps of the first management device.
  • a schematic diagram of an embodiment of a repeater in the embodiment of the present application includes:
  • the receiving unit 1201 is configured to receive the first locking instruction sent by the first management device, specifically to implement step 301 in the foregoing embodiment corresponding to FIG. 3 and the specific implementation of the step 401 in the embodiment corresponding to FIG. 4 step;
  • the switching unit 1202 is configured to switch to the first locking state according to the first locking instruction, where the first locking state is a state that the repeater can only be controlled by the first management device, so that the first management device is in the forwarding
  • the first locking state is a state that the repeater can only be controlled by the first management device, so that the first management device is in the forwarding
  • the corresponding data and the target data are synchronized, and the target data is the data on the first management device, and the corresponding data is the data on the forwarder, which is specifically used to implement the foregoing corresponding FIG. Step 301 in the embodiment and the specific implementation steps of the repeater in step 402 in the foregoing embodiment corresponding to FIG.
  • the repeater further includes: a synchronization unit 1205;
  • the receiving unit 1201 is further configured to receive update information sent by the first management device
  • the synchronization unit 1205 is further configured to: update the corresponding data on the forwarder according to the update information, where the corresponding data is data corresponding to the target data on the forwarder, where the target data is data on the first management device;
  • step 303 in the foregoing embodiment corresponding to FIG. 3 and the specific implementation steps of the repeater in step 404 in the foregoing embodiment corresponding to FIG. 4.
  • the receiving unit 1201 is specifically configured to receive a lock instruction in a preset format sent by the first management device, where the lock command includes the lock command and the identity information of the first management device, and is specifically used to implement the foregoing FIG. Step 302 in the embodiment and the specific implementation steps of the repeater in step 403 in the foregoing embodiment corresponding to FIG. 4.
  • the switching unit 1202 is specifically configured to:
  • step 301 in the foregoing embodiment corresponding to FIG. 3 and step 402 in the foregoing embodiment corresponding to FIG. 4 are implemented.
  • the synchronization unit 1205 is specifically configured to:
  • the identifier information of the device that sends the configuration data does not match the identity information of the first management device, discarding the configuration data, or responding to the failure information of the management device that sends the configuration data;
  • step 303 in the foregoing embodiment corresponding to FIG. 3 and the specific implementation steps of the repeater in step 404 in the foregoing embodiment corresponding to FIG. 4.
  • the repeater further includes: a first unlocking unit 1203;
  • the receiving unit 1201 is further configured to receive the unlocking command sent by the first management device, specifically, to implement step 304 in the foregoing embodiment corresponding to FIG. 3 and the forwarder in step 405 in the foregoing embodiment corresponding to FIG. Specific implementation steps;
  • the first unlocking unit 1203 is configured to release the first locked state according to the unlocking instruction.
  • the repeater further includes:
  • the second unlocking unit 1204 is configured to: when the repeater determines that the first management device does not respond within the preset time, or the required data of the forwarder is not within the management range of the first management device, cancel the first
  • the locking state is specifically used to implement the specific implementation steps of the forwarder forced unlocking in step 405 in the foregoing embodiment corresponding to FIG. 4.
  • the receiving unit 1201 is further configured to receive a second locking instruction sent by the second management device, where the second management device is a management device other than the first management device of the multiple management devices, specifically used to implement the foregoing FIG. 3 Step 305 in the corresponding embodiment and the specific implementation steps of the repeater in step 406 in the foregoing embodiment corresponding to FIG. 4;
  • the switching unit 1202 is further configured to switch to the second locking state according to the second locking instruction, where the second locking state is a state that the transponder can only be controlled by the second management device, specifically for implementing the foregoing FIG. Step 305 in the embodiment and the specific implementation steps of the repeater in step 407 in the foregoing embodiment corresponding to FIG.
  • the receiving unit 1201 is further configured to: if the repeater is in the first locked state, discard the third locking instruction when the repeater receives the third locking instruction sent by the third management device, or the management device that sends the third locking instruction.
  • the response failure information is specifically used to implement steps 301, 305, and 307 in the foregoing embodiment corresponding to FIG. 3 and the specific implementation steps of the repeaters in steps 402 and 407 in the foregoing embodiment corresponding to FIG. 4.
  • FIG. 13 is a schematic diagram of another embodiment of a management device in an embodiment of the present application.
  • the management device 1300 may generate a large difference due to different configurations or performances, and may include one or more central processing units (CPUs). 1322 (eg, one or more processors) and memory 1332, one or more storage media 1330 that store application 1342 or data 1344 (eg, one or one storage device in Shanghai).
  • the memory 1332 and the storage medium 1330 may be short-term storage or persistent storage.
  • the program stored on the storage medium 1330 may include one or more modules (not shown), each of which may include a series of instruction operations in the management device.
  • the central processor 1322 can be configured to communicate with the storage medium 1330 to perform a series of instruction operations in the storage medium 1330 on the management device 1300.
  • Management device 1300 may also include one or more power sources 1326, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1358, and/or one or more operating systems 1341, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • operating systems 1341 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • FIG. 14 is a schematic diagram of another embodiment of a repeater in the embodiment of the present application.
  • the repeater 1400 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPUs). 1422 (eg, one or more processors) and memory 1432, one or more storage media 1430 that store application 1442 or data 1444 (eg, one or one storage device in Shanghai).
  • the memory 1432 and the storage medium 1430 may be short-term storage or persistent storage.
  • the program stored on storage medium 1430 may include one or more modules (not shown), each of which may include a series of instruction operations in the repeater.
  • central processor 1422 can be configured to communicate with storage medium 1430, executing a series of instruction operations in storage medium 1430 on repeater 1400.
  • the repeater 1400 can also include one or more power sources 1426, one or more wired or wireless network interfaces 1450, one or more input and output interfaces 1458, and/or one or more operating systems 1441, such as Windows ServerTM, Mac. OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • operating systems 1441 such as Windows ServerTM, Mac. OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • the steps performed by the repeater in FIGS. 3 through 10 of the above embodiment may be based on the repeater structure shown in FIG.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of Figures 3 through 10 of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Telephonic Communication Services (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种数据处理的方法以及相关设备,用于在多头管理的场景下,使管理设备与转发器的数据保持一致,可以更高效灵活地实现管理设备与转发器的数据一致性,提高管理设备与转发器通信的可靠性。该方法包括:该多个管理设备中的第一管理设备向该转发器发送锁定指令,该锁定指令用于指示该转发器切换为锁定状态,该锁定状态为该转发器仅由该第一管理设备控制的状态;该第一管理设备对自身的目标数据与转发器上与该目标数据对应的对应数据进行差异比较,以得到对比结果,若该第一管理设备通过该对比结果确定该目标数据与该对应数据不匹配,则该第一管理设备对该目标数据与该对应数据进行同步,以使该目标数据与该对应数据匹配。

Description

[根据细则26改正30.04.2019] 一种数据处理的方法以及相关设备
本申请要求于2018年3月26日提交中国国家知识产权局、申请号为201810253225.6、发明名称为“一种数据处理的方法以及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别涉及一种数据处理的方法以及相关设备。
背景技术
软件定义网络(software defined network,SDN)中的控制器在管理转发器时包括多种场景,例如,其中一种场景为单头管理,即转发器仅被控制器管理,另一种场景为多头管理,即转发器可以被多个管理设备控制,该多个设备可以包括控制器或其他的管理设备。
当转发器被管理设备独立控制时,控制器和管理设备在交互中产生的数据不一致的场景可以包括多种,例如,转发器重启,但转发器上的配置没有保存、转发器和控制器之间的网络故障或是转发器自身的原因,例如,转发器系统繁忙,又或是控制器的数据库还原、异地容灾场景等,都可能导致转发器和管理设备上的数据不一致。而以上单头管理场景中导致管理设备与转发器之间数据不一致的场景都可以由管理设备或转发器为主进行修复。而多头管理场景下,转发器与管理设备的数据不一致的原因还可能是由于转发器被除该管理设备外的其他管理设备控制,而其他的管理设备下发的数据与该管理设备下发的数据冲突,导致转发器上的数据与该管理设备上的数据不一致。而转发器往往无法确定以管理设备上的数据为主还是以转发器上的数据为主,使数据同步的处理方式复杂,效率低。因此,在多头管理场景下,如何保障管理设备与转发器数据的一致性成为亟待解决的问题。
发明内容
本申请提供一种数据处理的方法以及相关设备,用于在多头管理的场景下,可以更高效灵活地实现管理设备与转发器的数据一致性,提高管理设备与转发器通信的可靠性。
有鉴于此,本申请第一方面提供一种数据处理的方法,应用与多头管理场景,该多头管理场景为转发器由多个管理设备进行管理的场景,该方法可以包括:
该多个管理设备中的第一管理设备向该转发器发送锁定指令,该锁定指令用于指示该转发器切换为锁定状态,该锁定状态为该转发器仅由该第一管理设备控制的状态;该第一管理设备对自身的目标数据与转发器上与该目标数据对应的对应数据进行差异比较,以得到对比结果,若该第一管理设备通过该对比结果确定该目标数据与该对应数据不匹配,则该第一管理设备对该目标数据与该对应数据进行同步,以使该目标数据与该对应数据匹配。
在本申请实施方式中,首先由第一管理设备对转发器加锁,使转发器处于仅能被该第一管理设备控制的锁定状态,避免其他管理设备对该第一管理设备与该转发器之间进行数据同步的影响,之后该第一管理设备对目标数据与对应的数据进行同步,可以保障该第一管理设备上的目标数据与该转发器上与该目标数据对应的对应数据保持一致性。
结合本申请第一方面,在本申请第一方面的第一种实施方式中,该第一管理设备向该转发器发送锁定指令,可以包括:
该第一管理设备向该转发器发送锁定指令,该锁定指令中包括该加锁指示以及该第一管理设备的身份信息,该身份信息用于该转发器确定锁定源头,该加锁指示用于指示转发器切换到仅能由该第一管理设备控制的锁定状态。
在本申请实施方式中,第一管理设备可以通过预置格式,例如netconf协议格式,向转发器发送锁定指令,且该锁定指令中可以携带该第一管理设备的身份信息以及加锁指示,以使转发器可以根据该身份信息确定加锁的源头,且通过该身份信息以及加锁指示,该转发器可以切换为仅能被该第一管理设备控制的锁定状态,减少第一管理设备与转发器之间进行通信时的干扰,保障该第一管理设备与该转发器之间的数据一致性。
结合本申请第一方面或本申请第一方面的第一种实施方式,在本申请第一方面的第二种实施方式中,该第一管理设备对该目标数据与该对应数据进行同步,可以包括:
该第一管理设备根据该对比结果确定以该目标数据为准对该对应数据进行更新,或,以该对应数据为准对该目标数据进行更新。
在本申请实施方式中,可以由该第一管理设备根据对比结果确定是以目标数据为准更新对应数据,或以对应数据为准更新目标数据,由管理设备根据对比结果确定同步方式,可以提高数据同步的效率以及准确性。
结合本申请第一方面或本申请第一方面的第一种实施方式,在本申请第一方面的第三种实施方式中,该第一管理设备对该目标数据与该对应数据进行同步,还可以包括:
该第一管理设备可以响应用户的操作得到输入信息,然后该第一管理设备根据该输入信息确定对目标数据与对应数据的更新方式。
在本申请实施方式中,可以由用户手动选择目标数据与对应数据的更新方式,然后由第一管理设备根据用户的选择对目标数据与对应数据进行更新,可以根据实际情况调整目标数据与对应数据的更新方式,使对目标数据与对应数据的同步方式更贴近与实际需求,能更灵活地对目标数据与对应数据进行同步。
结合本申请第一方面的第三种实施方式,在本申请第一方面的第四种实施方式中,该第一管理设备还可以包括显示界面,该第一管理设备获取输入信息之前,该方法还可以包括:
该第一管理设备在该显示界面上显示该对比结果。
需要说明的是,除了可以由该第一管理设备包括显示界面,也可以在其他显示设备上显示该对比结果,具体此处不作限定。
在本申请实施方式中,在显示界面上显示该对比结果,然后由用户根据该对比结果确定目标数据与对应数据的同步方式,之后将该同步方式输入到第一管理设备,由第一管理设备对目标数据与对应数据进行更新,可以使用户更直观地观察对比结果,使对目标数据与对应数据的更新跟准确,更接近实际需求。
结合本申请第一方面或本申请第一方面的第一种实施方式至本申请第一方面的第四种实施方式中的任一实施方式,在本申请第一方面的第五种实施方式中,该第一管理设备对目标数据与对应数据进行差异比较,以得到对比结果,可以包括:
该第一管理设备获取该目标数据中的每个特性以及该对应数据中对应中的每个特性;该第一管理设备对该目标数据中的每个特性以及该对应数据中对应的每个特性进行对比,以得到该对比结果。
在本申请实施方式中,对目标数据以及对应数据的采集粒度为特性,对目标数据中的每个特性以及对应数据中的每个特性进行对比,使得到的对比结果更准确,后续对目标数据与对应数据的更新更准确。
结合本申请第一方面的第五种实施方式,在本申请第一方面的第六种实施方式中,该第一管理设备对目标数据与对应数据进行同步还可以包括:
若该对比结果为目标数据中的目标特性下的子特性多于对应数据的对应特性下的子特性,则该第一管理设备可以确定以目标数据中的目标特性为准为对应数据下的对应特性进行更新,若该对比结果为目标数据中的目标特性下的子特性少于对应数据的对应特性下的子特性,则该第一管理设备可以确定以对应数据中的对应特性为准为目标数据下的目标特性进行更新。
在本申请实施方式中,可以由控制器根据对比结果确定对目标数据以及对应数据的同步方式,可以提高对目标数据与对应数据同步的效率,且在进行数据同步时,可以仅同步有差异的部分,进一步提高同步效率。
结合本申请第一方面的第五种实施方式,在本申请第一方面的第七种实施方式中,该第一管理设备对目标数据与对应数据进行同步还可以包括:
将该对比结果在该第一管理设备或其他显示设备的显示界面上显示,由用户根据显示的对比结果选择对目标数据与对应数据的同步方式,然后在该第一管理设备中输入选择的同步方式,该第一管理设备在接收输入信息后,由该第一管理设备对该目标数据与对应数据进行同步。
在本申请实施方式中,可以由用户根据显示界面显示的对比结果确定对目标数据与对应数据的同步方式,使同步方式更接近于实际需求,可以实现对目标数据与对应数据更灵活地同步。
结合本申请第一方面或本申请第一方面的第一种实施方式至本申请第一方面的第七种实施方式中的任一实施方式,在本申请第一方面的第八种实施方式中,该方法还可以包括:
该第一管理设备向该转发器发送解锁指令,该解锁指令用于至少该转发器解除该锁定状态,以使该转发器可以由除该第一管理设备外的其他管理设备管理。
在本申请实施方式中,若该第一管理设备无需再对转发器进行控制,则该第一管理设备可以向该转发器发送解锁指令,以使该转发器解除仅能由该第一管理设备进行控制的锁定状态,此时可以由其他管理设备向该转发器发送锁定指令并对该转发器进行控制,可以实现该转发器更灵活地被多个管理设备控制,且该多个管理设备可以以此对转发器进行控制,在每个管理设备对转发器进行控制时,都不受其他管理设备的干扰,可以更加保障管理设备与转发器的数据一致性。
结合本申请第一方面或本申请第一方面的第一种实施方式至本申请第一方面的第八种实施方式中的任一实施方式,在本申请第一方面的第九种实施方式中,在该第一管理设备对该目标数据与该对应数据进行同步之后,该方法还可以包括:
若该第一管理设备确定该目标数据与该转发器上的该对应数据不一致,则该第一管理设备通过该目标数据对该转发器上的该对应数据进行更新。
在第一管理设备对转发器之间进行数据同步后,该第一管理设备可以实现对该转发器正常的通信,若第一管理设备此后发现该第一管理设备的数据与该转发器的数据不一致,则该第一管理设备可以以该第一管理设备自身的数据为准对转发器的数据进行更新,以使该第一管理设备上的数据与该转发器上对应的数据保持一致。
结合本申请第一方面的第五种实施方式至本申请第一方面的第九种实施方式中的任一实施方式,在本申请第一方面的第十种实施方式中,该第一管理设备获取该目标数据中的每个特性以及该对应数据中对应中的每个特性,可以包括:
该第一管理设备根据yang数据模型,或树状结构获取该目标数据中的每个特性以及该对应数据中对应中的每个特性。
在本申请实施方式中,第一管理设备可以根据yang数据模型或树状结构模型对目标数据以及对应数据进行采集,后续可以通过yang数据模型以及树状结构模型对目标数据与对应数据进行差异比较,使差异比较的结果更准确。
本申请第二方面提供一种数据处理的方法,应用与多头管理场景,该多头管理场景为转发器由多个管理设备进行管理的场景,该多个管理设备可以包括至少一个第一管理设备,该方法可以包括:
转发器接收该多个管理设备中的第一管理设备发送的第一锁定指令;该转发器根据该第一锁定指令切换到第一锁定状态,该第一锁定状态为该转发器仅能由该第一管理设备控制的状态。
在本申请实施方式中,转发器接收第一管理设备发送的第一锁定指令后,可以根据该第一锁定指令切换到仅能由该第一管理设备控制的第一锁定状态,当转发器处于第一锁定状态时,该转发器仅能由该第一管理设备进行控制,因此可以避免其他管理设备对该第一管理设备与该转发器进行通信时的影响。
结合本申请第二方面,在本申请第二方面的第一种实施方式中,在转发器根据第一锁定指令切换到第一锁定状态之后,还可以包括:
该转发器接收该第一管理设备发送的更新信息,该更新信息可以是第一管理设备在进行数据同步时生成的;该转发器根据该更新信息对该转发器上对应数据进行更新,该对应数据为该转发器上与目标数据对应的数据,该目标数据为该第一管理设备上的数据。
在本申请实施方式中,当转发器处于仅能由第一管理设备控制的第一锁定状态时,第一管理设备可以对该第一管理设备上的目标数据与该转发器上与该目标数据对应的对应数据进行同步,因此,当对对应数据进行更新时,因转发器处于第一锁定状态,可以避免其他管理设备对第一管理设备对转发器进行控制时的干扰,进而提高该第一管理设备与该转发器的通信效率以及可靠性。
结合本申请第二方面,在本申请第二方面的第二种实施方式中,该转发器接收该多个管理设备中的第一管理设备发送的第一锁定指令,可以包括:
该转发器接收该第一管理设备发送的预置格式的锁定指令,该锁定指令中可以包括该加锁指示以及该第一管理设备的身份信息。该锁定指令可以是该第一管理设备按照预置的协议格式生成,该协议可以是netconf,该锁定指令中可以包括加锁指示以及该第一管理设备的身份信息,转发器可以根据该身份信息确定加锁源,然后可根据该身份信息以及该加锁指示切换到仅能由该第一管理设备控制的第一锁定状态,避免其他管理设备对第一管理设备与该转发器进行通信时的影响。
结合本申请第二方面的第二种实施方式,在本申请第二方面的第三种实施方式中,该转发器根据该第一加锁指令切换到第一锁定状态,可以包括:
该转发器根据该身份信息识别加锁源;该转发器根据该加锁源以及该第一加锁指示切换到该第一锁定状态。
该转发器可以根据锁定指令中的身份信息识别加锁源,该身份信息可以是第一管理设备的用户标识,确定加锁源后,可以根据第一加锁指示进行加锁,切换到仅能由第一管理设备控制的第一锁定状态,即实现第一管理设备对该转发器的加锁。因此可以避免其他管理设备对第一管理设备与转发器进行通信时的干扰。
结合本申请第二方面的第三种实施方式,在本申请第二方面的第四种实施方式中,在该转发器根据该加锁源以及该第一加锁指令切换到该第一锁定状态之后,还可以包括:
该转发器接收配置数据;该转发器判断发送该配置数据的设备的标识信息是否与该第一管理设备的身份信息匹配;若发送该配置数据的设备的标识信息与该第一管理设备的身份信息匹配,则该转发器保存该配置数据;若发送该配置数据的设备的标识信息与该第一管理设备的身份信息不匹配,则该转发器丢弃该配置数据,或对发送该配置数据的管理设备响应失败信息。
在本申请实施方式中,在转发器切换到第一锁定状态后,若转发器接收到一个配置数据,转发器可以对发送该配置数据的设备进行识别,若该发送该配置数据的设备为加锁源,则该转发器可以对该配置数据进行保存或其他相应操作,若该发送该配置数据的设备不为加锁源,则转发器可以无视或响应失败信息等,因此可以避免其他设备在转发器处于锁定状态时对转发器上的数据进行修改。
结合本申请第二方面或本申请第二方面的第一种实施方式至本申请第二方面的第四种实施方式中的任一实施方式,在本申请第二方面的第五种实施方式中,该方法还可以包括:
该转发器接收该第一管理设备发送的解锁指令,该转发器根据该解锁指令解除该第一锁定状态。
在该第一管理设备无需再对该转发器进行控制时,该第一管理设备可以向该转发器发送解锁指令,当转发器接收到该解锁指令时,可根据该解锁指令解除该第一锁定状态,该解锁指令也可以该第一管理设备通过解锁指令发送,该解锁指令除了可以包括该解锁指令,也可以包括该第一管理设备的身份信息,该转发器可以根据该身份信息确定解锁源。
结合本申请第二方面或本申请第二方面的第一种实施方式至本申请第二方面的第四种实施方式中的任一实施方式,在本申请第二方面的第六种实施方式中,该方法还可以包括:
当该转发器确定该第一管理设备在预置时间内无响应,或该转发器的所需数据不在该第一管理设备的管理范围内时,该转发器解除该第一锁定状态。
在本申请实施方式中,当第一管理设备在预置时间内无响应,例如,该第一管理设备宕机、断电或系统繁忙等,或该转发器所需的数据不在该第一管理设备的管理范围内时,该转发器可以强制解除该第一锁定状态,以使该转发器正常与其他管理设备通信,还可以避免转发器长时间处于闲置状态,避免网络资源浪费。
结合本申请第二方面的第六种实施方式,在本申请第二方面的第七种实施方式中,在该转发器解除该第一锁定状态之后,该方法还可以包括:
该转发器接收该多个管理设备中除该第一管理设备外的第二管理设备发送的第二锁定指令,该转发器根据该第二锁定指令切换到仅能由该第二管理设备控制的第二锁定状态。在该转发器处于该第二锁定状态时,该第二管理设备也可以对该第二管理设备上的数据与转发器上的数据进行同步。
本申请实施方式中,在转发器解除第一锁定状态后,转发器可以接收第二管理设备发送的第二锁定指令,然后转发器根据该第二锁定指令可以切换到第二锁定状态,在转发器处于第二锁定状态时,该转发器仅能由该第二管理设备控制,可以避免在第二管理设备与该转发器进行通信时被其他管理设备影响。
结合本申请第二方面或本申请第二方面的第一种实施方式至本申请第二方面的第七种实施方式中的任一实施方式,在本申请第二方面的第八种实施方式中,还可以包括:
若该转发器处于该第一锁定状态,则当该转发器接收到第三管理设备发送的第三锁定指令时,该转发器丢弃该第三锁定指令,或对发送该第三锁定指令的管理设备响应失败信息。
若转发器当前处于锁定状态,则当转发器接收到其他管理设备发送的锁定指令时,转发器可以无视、丢弃或响应失败信息等,以保障该转发器仅能由当前锁定该转发器的管理设备控制。
本申请实施例第三方面提供了管理设备,该管理设备具有实现上述第一方面数据处理的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
本申请实施例第四方面提供了转发器,该管理设备具有实现上述第一方面数据处理的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
本申请实施例第五方面提供一种管理设备,可以包括:
处理器、存储器、总线以及输入输出接口,该处理器、该存储器与该输入输出接口通过该总线连接;该存储器,用于存储程序代码;该处理器调用该存储器中的程序代码时执行本申请第一方面或第一方面任一实施方式提供的第一管理设备执行的步骤。
本申请实施例第六方面提供一种转发器,可以包括:
处理器、存储器、总线以及输入输出接口,该处理器、该存储器与该输入输出接口通过该总线连接;该存储器,用于存储程序代码;该处理器调用该存储器中的程序代码时执行本申请第二方面或第二方面任一实施方式提供的转发器执行的步骤。
本申请实施例第七方面提供一种通信系统,该通信系统包括至少两个管理设备以及转发器,该至少两个管理设备为执行本申请第一方面至第二方面中任一实施方式中的至少两个管理设备;该转发器为执行本申请第一方面至第二方面中任一实施方式中的转发器。
本申请实施例第八方面提供一种存储介质,需要说明的是,本发的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产口的形式体现出来,该计算机软件产品存储在一个存储介质中,用于储存为上述设备所用的计算机软件指令,其包含用于执行上述第一方面至第二方面中任一方面为管理设备或转发器所设计的程序。
该存储介质包括:U盘、移动硬盘、只读存储器(英文缩写ROM,英文全称:Read-Only Memory)、随机存取存储器(英文缩写:RAM,英文全称:Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例第九方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如本申请第一方面或第二方面任一可选实施方式中所述的方法。
在本申请实施例中,当转发器处理多头管理场景时,转发器由多个管理设备控制,当第一管理设备向转发器发送锁定指令时,转发器根据该锁定指令切换到仅能由该第一管理设备控制的锁定状态,可以避免在第一管理设备对转发器进行控制时被其他管理设备干扰。之后第一管理设备对自身的目标数据与转发器上的对应数据进行差异比较,且对该目标数据与对应数据进行数据同步,使该第一管理设备上的目标数据与该转发器上的对应数据保持一致, 因转发器处于仅能由该第一管理设备控制,不能被除该第一管理设备外的管理设备控制的锁定状态,因此,可以避免在第一管理设备进行差异比较以及数据同步时被其他管理设备干扰,更高效灵活地保障第一管理设备与转发器上的数据一致性。
附图说明
图1为本申请实施例中网络架构示意图;
图2为本申请实施例中数据示意图;
图3为本申请实施例中数据处理的方法的一个实施例示意图;
图4为本申请实施例中数据处理的方法的另一个实施例示意图
图5为本申请实施例中数据处理的方法的一个特性示意图;
图6为本申请实施例中数据处理的方法的另一个数据特性示意图;
图7为本申请实施例中数据处理的方法的另一个数据特性示意图;
图8为本申请实施例中数据处理的方法的另一个数据特性示意图;
图9为本申请实施例中数据处理的方法的一个数据对比示意图;
图10为本申请实施例中数据处理的方法的一个数据同步示意图;
图11为本申请实施例中管理设备的一个实施例示意图;
图12为本申请实施例中转发器的一个实施例示意图;
图13为本申请实施例中管理设备的另一个实施例示意图;
图14为本申请实施例中转发器的另一个实施例示意图。
具体实施方式
本申请提供一种数据处理的方法以及相关设备,用于在多头管理的场景下可以更高效灵活地实现管理设备与转发器的数据一致性,提高管理设备与转发器通信的可靠性。
SDN网络是一种可以由软件定义的网络架构,分离了传统网络中交换机的控制平面和数据转发平面,由集中式的管理设备统一管理网络中的转发器。该SDN网络可以包括转发器以及一个或多个用于管理转发器的管理设备。本申请具体网络架构图可以如图1所示,在本申请实施例中的网络架构中,转发器可以由多个管理设备管理,即多头管理场景,该多个管理设备可以包括至少一个控制器或其他一个或多个管理设备,控制器可以是敏捷控制器(agile controller,AC)。具体的管理方式可以是,以一个控制器为例,控制器可以通过为转发器下发数据,包括配置数据、转发数据等,然后控制器通过预置的协议格式与转发器进行数据通信,包括控制器控制转发器对数据进行转发等。在实际应用中,转发器可以由多个管理设 备控制,因此转发器上可能存在多个管理设备的数据,当一个控制器上的数据与转发器上的数据不一致时,转发器无法确定以控制器的数据为主还是以转发器上的数据为主,从而可能导致控制器与转发器的通信失败或转发器无法转发数据等。例如,如图2所示,控制器上的数据与转发器上的数据仅有一部分共有的数据相同,由于转发器可以由其他管理设备控制,其他管理设备可以修改转发器上的数据,因此导致控制器上的数据与转发器上的数据不一致,例如,转发器上的配置数据。为保障管理设备上的数据与转发器上的数据一致性,本申请实施例提供了数据处理的方法。请参阅图3,为本申请实施例提供的一种数据处理方法的一个流程示意图。
301、第一管理设备对转发器加锁;
第一管理设备对转发器加锁,具体的可以是第一管理设备向转发器发送锁定指令,例如,在第一管理设备需要对转发器进行控制时,首先向转发器发送锁定指令,对转发器进行加锁,使转发器处于仅能由该第一管理设备控制的第一锁定状态,此时转发器可以不接收或无视除该第一管理设备外的其他管理设备发送的指令或数据等,也可以回复通信失败或系统繁忙等信息,还可以仅开放查询接口,以供其他管理设备进行数据查询等,具体此处不作限定。锁定指令的具体方式可以参考下述图4所示实施例中步骤401的具体描述,本申请对此不限定,可以是其他的加锁方式。当该转发器处于第一锁定状态时,只能由该第一管理设备进行控制,其他管理设备不能对该转发器进行控制。因此,当第一管理设备对转发器进行控制时,例如,第一管理设备控制转发器对从该第一管理设备发送至用户设备的转发数据进行转发时。其他管理设备无法对该转发器进行控制,以避免其他管理设备修改转发器上的通信通道的配置数据,导致数据转发失败等。在多头管理的背景下,多个管理设备中的某个管理设备,如本实施例中的第一管理设备,例如某一SDN控制器,在转发器进行锁定后,其他管理设备不能够对该转发设备进行管理,从而使该第一管理设备在对转发器进行控制时不受其他管理设备的干扰,进而提高第一管理设备与转发器进行通信的效率以及可靠性。
302、第一管理设备进行差异比较;
当第一管理设备向转发器发送锁定,使转发器处于第一锁定状态后,第一管理设备确定自身的目标数据,以及采集转发器上与该目标数据对应的对应数据,并对该目标数据与对应数据进行差异比较,得到对比结果。第一管理设备可根据该对比结果以及预设的同步方式对目标数据与该对应数据进行同步,或由用户根据该第一管理设备通过用户界面呈现给用户的该对比结果确定对目标数据与该对应数据进行同步的同步方式。
其中,第一管理设备采集转发器上的对应数据的方式可以是通过yang模型采集,或也可以是通过树结构采集等,具体的实现方式参考下面图4至图8所示的实施例的具体描述。
303、第一管理设备与转发器进行数据同步;
在第一管理设备进行差异比较,得到对比结果后,第一管理设备与转发器之间进行数据同步,其中上面提到的预设的同步方式可以包括第一管理设备根据对比结果确定以目标数据为准对对应数据更新或以对应数据为准对目标数据更新等。当然,如上所述,在另外的实施方式中也可以包括由用户根据对比结果确定同步方式,例如由用户确定以目标数据为准对对应数据更新,或以对应数据为准对目标数据更新等。
因此,本申请实施例中,在第一管理设备对转发器进行加锁后,第一管理设备与转发器之间进行数据同步,此时可以不受其他管理设备的干扰,使第一管理设备与转发器之间的数据保持一致性,提高第一管理设备与转发器之间通信的效率以及可靠性。在数据同步完成后,该第一管理设备还可以向转发器下发配置数据,以使该控制器与该转发器正常通信。
在完成第一管理设备与转发器之间的数据同步后,第一管理设备可以与转发器进行正常通信,包括第一管理设备控制转发器对发送至用户设备的数据进行转发,或转发器对用户设发送的数据进行转发等。
此外,若在第一管理设备与转发器进行数据同步后,若第一管理设备确定第一管理设备上的数据与该转发器上的数据不一致,则第一管理设备可以以该第一管理设备上的数据对转发器上的数据进行更新。具体的可以参考下述图10所示的实施例的具体描述。
304、第一管理设备对转发器解锁;
在第一管理设备无需对转发器进行控制时,例如,该第一管理设备控制转发器向用户设备发送转发数据完成时,可以对转发器进行解锁。该第一管理设备对转发器解锁的具体方式可以是,该第一管理设备向转发器发送解锁指令,转发器在接收到解锁指令后,可以解除锁定状态。其中,解锁指令的具体方式可以参考下图4中所示实施例中步骤405的具体描述,本申请对此不限定,也可以是其他的解锁方式。当转发器解除锁定后,转发器可以接收该转发器范围内任何管理设备发送的信息或指令,以使其他管理设备根据需要对转发器进行加锁进而进行锁定控制,从而可以保障其他管理设备的正常通信,且通过该加锁解锁的切换,可以是转发器灵活地在多个管理设备间正常进行通信,提高转发器与其他管理设备进行通信的可靠性。可以理解,当其他管理设备都没有对该转发器进行锁定控制的情况下,该转发器处于接收多个管理设备控制的状态。各管理设备是否需要对转发器进行锁定是根据各管理设备于转发器进行数据交互的类型确定,若管理设备仅需要对该转发器上的数据进行查询,则该关联设备无需对该转发器进行查询,若该管理设备需要对该转发器进行控制或对管理设备上的数据与该转发器上的数据进行数据同步等,例如,控制转发器进行数据转发或控制转发器进行数据修改等,则该管理设备需要对该转发器进行加锁。
305、第二管理设备向转发器发送锁定指令;
在第一管理设备向转发器发送解锁指令后,转发器处于未锁定状态,此时,第二管理设备可以向转发器发送锁定指令,转发器可根据该第二管理设备发送的锁定指令,切换到仅能由该第二管理设备控制的第二锁定状态。此时,第二管理设备可以对该转发器进行控制,且不受其他管理设备的干扰。该第二管理设备也可以对该第二管理设备上的数据与该转发器上的数据进行差异比较,并基于该差异比较结果进行数据同步,使该第二管理设备上的数据与该转发器上的数据保持一致,当该第二管理设备为除控制器外的其他管理设备时,该第二管理设备也可以不进行差异比较,第二管理设备直接与该转发器进行通信等,具体此处不作限定。
306、第二管理设备向转发器发送解锁指令;
当第二管理设备无需再对转发器进行控制时,也需要向转发器发送解锁指令,以使转发器解除第二锁定状态。
307、第一管理设备向转发器发送锁定指令。
当转发器处于未锁定状态时,第一管理设备如需继续对该转发器进行控制,则第一管理设备需要重新向该转发器发送锁定指令,对转发器加锁后,才能继续与该转发器进行通信。例如,该第一管理设备需要重新通过该转发器向用户设备发送传输数据时,需要对该转发器进行控制,此时该第一管理设备可以向该转发器发送锁定指令,以使转发器切换到仅能由该第一管理设备控制的锁定状态。
应理解,在本申请实施例中,第一管理设备在对转发器进行控制时,对该转发器进行加锁,无需对转发器进行控制时,可以解除转发器的锁定状态,其中,加锁与解锁除了可以是本申请实施例中提供的具体加锁解锁步骤外,还可以是通过其他的方式进行加锁解锁。当转发器解除仅能由该第一管理设备控制的锁定状态后,该转发器可以由该第一管理设备重新进行加锁控制,也可以由第二管理设备进行加锁控制,具体此处不作限定,因此,步骤305至步骤307可以为可选步骤。
在本申请实施例中,当第一管理设备需要对转发器进行控制时,首先需要向转发器发送锁定指令,若转发器处于未锁定状态,则转发器可以切换到第一锁定状态,之后第一管理设备可以与转发器之间进行数据同步,保障第一管理设备与转发器之间数据的一致性。当第一管理设备无需对转发器进行控制时,可以向转发器发送解锁指令,解除转发器的第一锁定状态。此时,转发器可以正常接收其他管理设备的信息,可以由其他管理设备进行加锁以及控制。当转发器被加锁时,仅能由加锁的管理设备控制,当转发器未被加锁时,可以由其他设 备加锁后控制,因此转发器可以灵活地在各个管理设备之间进行切换,使转发器的多头管理场景可以正常通信以及工作。
前述对本申请实施例提供的数据处理的方法的流程进行了说明。下面对本申请实施中数据处理的方法进行更进一步地阐述,其中,以该第一管理设备为控制器为例进行说明,请参阅图4,本申请实施例汇总数据处理的方法的另一个实施例示意图,包括:
401、控制器向转发器发送锁定指令;
在控制器对转发器进行管理控制时,首先,控制器可以使用netconf协议向转发器发送锁定指令,在一个具体实施例中,该锁定指令中包括该控制器的身份信息以及加锁指示等,该控制器的身份信息可以是用户标识,即该控制器的标识,可以用于转发器识别加锁源,该加锁指示用于指示转发器切换到第一锁定状态。当该转发器处于第一锁定状态时,该转发器与该控制器之间建立有通信通道,转发器可以仅接收通过该通信通道发送的控制信息,即转发器仅可接收该控制器发送的控制信息,而不接收其他管理设备发送的控制信息。因此当转发器处于第一锁定状态时,该转发器只能由该控制器进行控制,可以避免当控制器对转发器进行控制时,转发器上的数据被其他管理设备修改,例如被其他控制器或管理服务器等修改,从而导致该控制器与转发器的通信错误或数据转发失败等情况。
402、转发器切换锁定状态;
在转发器接收到控制器发送的锁定指令时,该锁定指令中包括用户标识以及加锁指示,转发器可以根据该用户标识识别加锁源,若转发器当前处于未被锁定的状态,则转发器可以根据该加锁指示切换到仅能由该控制器控制的第一锁定状态。当该转发器处于仅能由该控制器控制的锁定状态时,转发器仅接收该控制器发送的控制信息,如果在这期间接收到其他管理设备,例如其他控制器或管理服务器,的控制信息时,转发器可以通过该用户标识确认该其他管理设备不是加锁源,从而可以丢弃该其他管理设备发送的控制信息或响应错误;此外,在转发器接收到控制器发送的锁定指令时,若转发器当前已处于锁定状态,即该转发器已被除该控制器外的其他管理设备控制,则该控制器当前无法对该转发器进行加锁,仅能在该转发器处于未锁定状态时该控制器才能对该转发器进行加锁。
403、控制器进行差异比较;
在控制器向转发器发送锁定指令,转发器切换到第一锁定状态时,转发器只能由控制器进行控制。控制器对控制器上的目标数据与转发器上的对应数据进行差异比较,得到差异比较的对比结果,该对比结果用于控制器确定目标数据与对应数据是否匹配。在一个具体的实施方式中,该控制器进行差异比较具体的步骤可以包括:
首先,控制器确定控制器上的目标数据,以及采集转发器上与目标数据对应的对应数据。其中,转发器可以提供数据查询接口,控制器可以使用该查询接口查询该转发器上与所述目标数据对应的对应数据。例如,控制器上包括与转发器进行通信的虚拟专用网络(Virtual Private Network,vpn)接口数据,则该转发器上也包括对应的vpn接口数据。此外,该目标数据与对应数据可以是其他配置数据或通信数据等。具体地,目标数据与对应数据的粒度可以是特性,例如,该特性可以是一个接口、模块等,该接口下可以包括多个子接口,或该模块下可以包括多个子模块等。目标数据与对应数据可以以yang模型呈现,也可以基于树的结构。例如,如图5所示,在对转发器上的对应数据进行采集时,目标数据与对应数据可以是接口管理(interface management,ifm)特性数据,例如,控制器与转发器上的接口数量、接口类型等,控制器以ifm特性为路径,对转发器上的ifm特性数据进行采集,ifm特性下的子特性为子节点,完成ifm特性的树结构采集。目标数据与对应数据可以是服务质量(quality of service,qos)特性数据,例如信道数据、地址数据等,如图6所示,对应数据在转发器的数据库中可以以树结构存储,则控制器以qos特性为路径进行对应数据的采集,每一个子节点都为qos特性下的子特性,采集该qos特性下的所有子节点,以完成qos特性的树结构的采集。此外,采集的起始节点除了可以是转发器数据库中的根节点,也可以是非根节点,例如,如图7所示,其中,A特性下的B特性与C特性分别为两个特性,可以以B特性或C特性为根节点,采集A特性下所有的子节点,以采集到完整的转发器的对应数据。因此,在实际应用中,控制器可以根据树结构进行对应数据的采集,能够采集到完整的对应数据,且效率高,准确性高。
然后,对控制器对自身的目标数据与转发器上与该目标数据对应的对应数据进行差异比较,若目标数据与对应数据的结构模型为树结构,则可以对目标数据的树结构与对应数据的树结构的子节点进行逐一遍历对比,在本申请实施例中,控制器可以对每个节点都进行对比,可以避免数据遗漏,使对比结果更准确。如图8所示,控制器对目标数据与对应数据,即控制器上的数据与转发器上的数据的树结构中的节点进行逐一广度遍历,可以得到差异比较的结果,即目标数据与对应数据的差异,例如,差异比较的结果可以是,如图9所示,目标数据的特性1的子特性多于对应数据的特性1的子特性,目标数据的特性2的子特性与对应数据的特性2的子特性一致,目标数据的特性3的子特性少于对应数据的特性3的子特,目标数据中的特性4的子特性与对应数据的特性4的子特性冲突等。然后由控制器确定目标数据与对应数据的同步方式,此外,若控制器包括显示界面,则可以在该显示界面中显示该对比结果,然后由用户选择对目标数据与对应数据的同步方式。
404、控制器与转发器进行数据同步;
在控制器进行差异比较,得到差异比较的对比结果后,若控制器通过该对比结果获知目标数据与对应数据不匹配,包括控制器与转发器上对应的数据不一致,或该控制器与该转发器上的数据不对应等,则控制器可以对目标数据与对应数据进行同步,使同步后的目标数据与对应数据匹配。在数据同步完成后,控制器还可以向转发器下发配置数据,以使该控制器与该转发器正常通信。进行数据同步的具体方式可以是,若以控制器上的数据为准对转发器上的数据进行更新,则控制器可以将更新信息发送至转发器,该更新信息可以是该控制器上的数据与该转发器上的数据有差异的部分,也可以是整个该控制器上的数据,具体此处不作限定。当转发器收到该更新信息后,可以将该更新信息保存至该转发器上,也可以是转发器根据该更新信息通过预置的方式对该转发器上的数据进行更新,具体此处不作限定。若以转发器上的数据为准对控制器上的数据进行更新,则控制器可以直接从转发器提供的数据查询接口中获取差异部分数据,然后将该差异部分数据保存至控制器,也可以是控制器获取转发器上所有与该控制器上的数据对应的数据,然后保存该所有与该控制器上的数据对应的数据等,具体此处不作限定。
一个具体的实施例中,上述同步过程可以参考图10,如图10所示,若目标数据中的特性1多于对应数据中的特性1,则控制器可以以目标数据中的特性1为准对对应数据中的特性1进行更新,使更新后的对应数据中的特性1与目标数据中的特性1保持一致。若目标数据中的特性2与对应数据中的特性2一致,则控制器可以不对目标数据与对应数据中的特性2进行更新。若目标数据中的特性3少于对应数据中的特性3,则控制器可以以对应数据中的特性3为准对目标数据中的特性3进行更新,使目标数据中的特性3与对应数据中的特性3保持一致。此外,若目标数据中的特性4与对应数据中的特性4冲突,则可以对目标数据或对应数据中的特性4进行标记,对目标数据中的特性4与对应数据中的特性4暂不处理,或以目标数据中的特性4对对应数据中的特性4进行更新,或者以对应数据中的特性4对目标数据中的特性4进行更新等。通过控制器根据预设的同步方式自动确定对目标数据与对应数据的同步方式,例如,针对不同特性的同步方式可以不同,从而可以提高对目标数据与对应数据进行同步的准确性,以及控制器的工作效率。在具体实施例中,该预设的同步方式可以包括,对于有冲突的数据,可以由控制器下发替换报文,以使转发器上的对应数据与控制器上的目标数据一致;对于控制器多出的数据,可以由控制器下发创建报文,由转发器添加该控制器多出的数据;对于转发器多出的数据,可以由控制器下发删除报文,以删除转发器上多出的数据;也可以是控制器直接下发替换报文,以目标数据为准更新对应数据等。
在另外的实施方式中,还可以是,在控制器上,或其他显示设备上显示差异比较的对比结果,由用户根据该对比结果选择同步方式,然后控制器可以接收用户的输入信息,然后由 该控制器或该转发器根据用户选择的同步方式对该目标数据与该对应数据进行同步。例如,可以在控制器或其他显示设备上显示如图9所示的界面,用户可以选择以对应数据中的特性1为准对目标数据中的特性1进行更新,或以目标数据中的特性3为准对对应数据中的特性3进行更新等。通过用户选择确定对目标数据与对应数据的同步方式,可以更灵活地确定目标数据与对应数据的更新方式,更贴近与实际需求。
此外,在控制器进行差异对比以及数据同步之后,若由于其他原因,例如,转发器重启,没有保存配置数据,转发器与控制器之间的网络故障,转发器自身繁忙等原因,导致转发器上的对应数据与控制器上的目标数据不一致,则可以以控制器上的目标数据为准对转发器上的对应数据进行更新,若由于控制器的原因导致控制器上的目标数据与转发器上的对应数据不一致时,也可以是以转发器上的数据为准对控制器上的目标数据进行更新。
405、转发器强制解锁;
在控制器与转发器进行数据同步后,控制器可以正常控制转发器进行通信,例如,控制器可以控制转发器向与该转发器连接的终端设备转发数据。当控制器无需再对转发器进行控制器时,可以向转发器发送解锁指令,使转发器解除锁定状态,解除锁定状态后转发器可以由其他管理设备进行控制。也可以是转发器进行强制解锁,例如,当控制器异常,包括宕机、断电或系统繁忙的原因,长时间未对转发器发送信息或回应,则转发器可以进行强制解锁,解除转发器的第一锁定状态,然后转发器可以与第二管理设备进行通信,接收第二管理设备的锁定指令等。其中,若由控制器向转发器发送解锁指令解锁,具体的解锁步骤可以是,控制器向转发器发送解锁指令,该解锁指令可以包括该控制器的身份信息以及解锁指示,该身份信息可以是用户标识,即该控制器的标识,转发器可以根据该用户标识与加锁源的用户标识进行对比,若该用户标识与加锁源的标识一致,则该转发器可以根据该解锁指示解除该第一锁定状态,若该用户标识与加锁源的标识不一致,则转发器可以不进行锁定状态解除。在本申请实施例中,当控制器在预置时间内未向转发器发送信息,或转发器所需数据不在该控制器的管理范围内时,转发器可直接解除锁定状态,之后该转发器可以与第二管理设备进行通信,避免因控制器长时间无回应而降低转发器的通信效率。转发器直接解除锁定状态后,若控制器正常工作,则控制器可以感知转发器解除由该控制器进行控制的锁定状态,若控制器需要向转发器发送数据,则该控制器需要重新对该转发器进行加锁,重新锁定后才能继续进行数据传输。例如,若控制器长时间对转发器无回应,而此时第二管理设备在等待对转发器进行控制,则可直接解除转发器的第一锁定状态,使第二管理设备可以向转发器发送锁定指令,降低第二管理设备的等待时长,以及提高第二管理设备与转发器的通信效率。而另一种情况为,转发器所需的数据不在该控制器的管理范围内,若该转发器所需的数据在第二管 理设备的管理范围内时,可以解除转发器的第一锁定状态,由第二管理设备对转发器进行加锁,然后转发器通过该第二管理设备获取该转发器所需的数据,提高该转发器的工作效率。
在控制器向转发器发送解锁指令后,转发器解除锁定状态,或转发器强制解锁后,若控制器需要再次控制转发器,则控制器需要重新向转发器发送锁定指令,使转发器重新处于锁定状态,并进行差异对比与数据同步,之后控制器才能对转发器进行控制。
406、第二管理设备向转发器发送锁定指令;
当转发器解除第一锁定状态时,也可以由除控制器外的第二管理设备向转发器发送锁定指令,具体的实施方式可以参考上述图4所示实施例中的步骤401,以使转发器处于被第二管理设备控制的锁定状态。该第二管理设备可以是包括命令行界面(command-line interface,CLI)的终端设备,也可以是其他网络管理设备,此外,该第二管理设备也可以是一个控制器。具体地,当该第二管理设备为一个包括CLI的终端设备,可以由用户或其他网管设备在CLI中输入控制指令,然后由该包括CLI的终端设备执行该指令,当转发器处于被该包括CLI的终端设备的锁定状态时,转发器仅能由该包括CLI的终端设备控制,包括仅能由该包括CLI的终端设备对该转发器上的数据进行修改,而除该包括CLI的终端设备外的管理设备无法对该转发器上的数据进行修改,以此避免转发器在与包括CLI的终端设备进行通信时,被除该包括CLI的终端设备外的其他管理设备修改数据,进而导致该转发器与该包括CLI的终端设备通信失败或数据转发失败等情况。
407、转发器切换锁定状态;
转发器在接收到第二管理设备发送的锁定指令后,可根据该锁定指令识别出加锁源为该第二管理设备,然后根据该锁定指令中的加锁指示切换至第二锁定状态,当该转发器处于第二锁定状态时,该转发器仅接收该第二管理设备的控制信息,例如,数据同步信息,配置数据等。
应理解,当该第二管理设备为除控制器外的管理设备时,该第二管理设备在向转发器发送锁定指令,以对转发器进行加锁后,该第二管理设备可以进行数据的差异比较与数据同步,也可以直接对该转发器进行控制,具体此处不作限定。
408、第二管理设备向转发器发送解锁指令。
当第二管理设备无需对转发器进行控制时,该第二管理设备可以向转发器发送解锁指令,以解除转发器仅能由该第二管理设备控制的第二锁定状态。
应理解,除了可以由第二管理设备向转发器发送解锁指令解除转发器的锁定状态外,也可以由转发器进行强制解锁,然后由其他管理设备通过另外的通道给转发器下发锁定指令以及配置,然后由其他管理设备控制转发器。例如,当用户发现控制器由于断电被关闭,或控 制器长时间无响应等情况,此时转发器仍然处于被控制器控制的锁定状态,那么,转发器可以进行强制解锁,解除控制器的控制,然后由其他管理设备对转发器进行加锁,由其他管理设备控制转发器。
409、转发器解除锁定状态;
转发器在接收到第二管理设备发送的解锁指令后,解除第二锁定状态,即转发器此时可以接收其他管理设备发送的锁定指令。
410、控制器向转发器发送锁定指令;
当转发器解除第二锁定状态后,若控制器需要对转发器进行控制,则控制器需要重新对该转发器发送锁定指令,以使该转发器切换为仅由该控制器控制的锁定状态,之后再进行数据同步以及数据传输等。
在本申请实施例中,在控制器对转发器进行管理控制时,首先,控制器向转发器发送锁定指令,对转发器进行加锁,使转发器处于仅能由控制器控制的锁定状态,防止在控制器与转发器进行通信时其他管理设备对转发器上的数据进行篡改,避免由于其他管理设备对转发器上的对应数据的修改导致的控制器上的目标数据与转发器上的对应数据不一致的问题,之后,控制器对目标数据与对应数据进行差异比较,并对目标数据与对应数据进行数据同步,使控制器上的目标数据与转发器上的转发数据保持一致,然后控制器与转发器可以进行通信,转发器由控制器控制。当控制器无需再对转发器进行控制时,可以向转发器发送解锁指令,以解除转发器的锁定状态,此时,可以由其他管理设备锁定转发器并进行控制与通信,可以避免该其他设备在与该转发器进行通信时数据被修改。
以一个具体的实施例为例,当前网络中包括一个控制器,一个转发器,以及一个网管设备,该控制器与网管设备都可以对转发器进行控制,当控制器需要对该转发器进行控制时,为避免网管设备对转发器进行控制,首先该控制器可以向该转发器发送锁定指令,以使转发器处于仅能由该控制器控制的锁定状态,此时网管设备无法控制转发器,无法对转发器上的配置数据进行修改。该控制器与该转发器之间建立有管理通道。当该转发器处于锁定状态后,控制器对目标数据,例如自身的目标配置数据,与转发器上对应数据,例如对应配置数据,进行差异比较可以是以数据中的特性为粒度,若该目标配置数据与该对应配置数据不一致,则控制器可以对该目标配置数据与对应配置数据进行更新,控制器可以以目标配置数据对该对应配置数据进行更新,也可以是以转发器上的对应配置数据对目标配置数据进行更新,以使该目标配置数据与该对应配置数据保持一致,避免因该目标配置数据与该对应配置数据不一致导致该控制器无法控制该转发器。若在控制器控制转发器时,控制器处于断电状态,转发器很长一段时间没有收到与控制器的通信数据,则此时可以转发器自动进行强制解锁,或 由转发器响应用户操作进行强制解锁等,即解除控制器对转发器的锁定状态,当控制器重新正常工作后,可以获取到转发器的状态。然后可以由网管设备通过另外的管理通道向该转发器发送锁定指令锁定转发器,以及下发网管设备的配置数据等。若控制器一直处于正常工作的状态,则控制器在无需对转发器进行控制器时,可以向该转发器发送解锁指令,以解除对转发器的锁定。之后可以由网管设备向转发器发送锁定指令,以使转发器处于由网管设备控制的锁定状态,之后网管设备对转发器进行控制以及正常通信等。
前述对本申请实施例中数据处理的方法进行了详细说明,下面对本申请实施例提供的装置进行说明,请参阅图11,本申请实施例中管理设备的一种实施例示意图,包括:
发送单元1101,用于向转发器发送锁定指令,该锁定指令用于指示该转发器切换为第一锁定状态,该第一锁定状态为该转发器仅由该第一管理设备控制的状态。具体用于实现前述图3对应的实施例中的步骤301以及前述图4对应的实施例步骤401中第一管理设备的具体实施步骤;
对比单元1102,用于对目标数据与对应数据进行差异比较,以得到对比结果,该目标数据为该第一管理设备上的数据,该对应数据为该转发器上的数据。具体用于实现前述图3对应的实施例中的步骤302以及前述图4对应的实施例步骤403中第一管理设备的具体实施步骤;
同步单元1103,用于若通过该对比结果确定该目标数据与该对应数据不匹配,对该目标数据与该对应数据进行同步,以使该目标数据与该对应数据匹配,具体用于实现前述图3对应的实施例中的步骤303以及前述图4对应的实施例步骤404中第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,
该发送单元1101,具体用于向该转发器发送预置格式的锁定指令,该锁定指令中包括加锁指示以及该第一管理设备的身份信息,该身份信息用于该转发器确定锁定源头,以实现前述图4对应的实施例步骤401中的第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,
该同步单元1103,具体用于根据该对比结果确定以该目标数据为准对该对应数据进行更新,或,以该对应数据为准对该目标数据进行更新,具体用于实现前述图3对应的实施例中的步骤301以及前述图4对应的实施例步骤401中的第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,该同步单元1103,具体还用于:
获取输入信息,该输入信息为该管理设备响应用户操作得到;
根据该输入信息对该目标数据与该对应数据进行更新;
具体用于实现前述图3对应的实施例中的步骤303以及前述图4对应的实施例步骤404中的第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,该管理设备还包括:
显示界面1104,用于显示差异比较的对比结果,具体用于实现前述图3对应的实施例中的步骤301以及前述图4对应的实施例步骤403中第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,该对比单元1102,具体用于:
获取该目标数据中的每个特性以及该对应数据中对应中的每个特性;
对该目标数据中的每个特性以及该对应数据中对应的每个特性进行对比,以得到该对比结果,具体用于实现前述图3对应的实施例中的步骤302以及前述图4对应的实施例步骤403中的第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,
该发送单元1101,还用于向该转发器发送解锁指令,该解锁指令用于至少该转发器解除该锁定状态,以使该转发器可以由除该第一管理设备外的其他管理设备管理,具体用于实现前述图3对应的实施例步骤304中的第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,
该同步单元1103,还用与在该同步单元对该目标数据与该对应数据进行同步之后,若该目标数据与该转发器上的该对应数据不一致,则通过该目标数据对该转发器上的该对应数据进行更新,具体用于实现前述图3对应的实施例中的步骤303以及前述图4对应的实施例步骤404中的第一管理设备的具体实施步骤。
可选地,在一些可能的实施方式中,
该对比单元1102,具体还用于根据Yang数据模型,或树状结构获取该目标数据中的每个特性以及该对应数据中对应中的每个特性,具体用于实现前述图3对应的实施例中的步骤302以及前述图4对应的实施例中的步骤403第一管理设备的具体实施步骤。
除了管理设备,本申请还提供了一种转发器,请参阅图12,本申请实施例中转发器的一种实施例示意图,包括:
接收单元1201,用于接收第一管理设备发送的第一锁定指令,具体用于实现前述图3对应的实施例中的步骤301以及前述图4对应的实施例中的步骤401转发器的具体实施步骤;
切换单元1202,用于根据该第一锁定指令切换到第一锁定状态,该第一锁定状态为该转发器仅能由该第一管理设备控制的状态,以使得该第一管理设备在该转发器处于该第一锁定状态时对对应数据以及目标数据进行同步,该目标数据为该第一管理设备上的数据,该对应 数据为该转发器上的数据,具体用于实现前述图3对应的实施例中的步骤301以及前述图4对应的实施例中的步骤402中转发器的具体实施步骤。
可选地,在一些可能的实施方式中,该转发器还包括:同步单元1205;
该接收单元1201,还用于接收该第一管理设备发送的更新信息;
该同步单元1205,还用于根据该更新信息对该转发器上对应数据进行更新,该对应数据为该转发器上与目标数据对应的数据,该目标数据为该第一管理设备上的数据;
具体用于实现前述图3对应的实施例中的步骤303以及前述图4对应的实施例中的步骤404中转发器的具体实施步骤。
可选地,在一些可能的实施方式中,
该接收单元1201,具体用于接收该第一管理设备发送的预置格式的锁定指令,该锁定指令中包括该锁定指令以及该第一管理设备的身份信息,具体用于实现前述图3对应的实施例中的步骤302以及前述图4对应的实施例中的步骤403中转发器的具体实施步骤。
可选地,在一些可能的实施方式中,该切换单元1202,具体用于:
根据该身份信息识别加锁源;
根据该加锁源以及该第一加锁指示切换到该第一锁定状态;
具体用于实现前述图3对应的实施例中的步骤301以及前述图4对应的实施例中的步骤402中转发器的具体实施步骤。
可选地,在一些可能的实施方式中,在该转发器根据该加锁源以及该第一加锁指令切换到该第一锁定状态之后,该同步单元1205,具体用于:
接收配置数据;
若发送该配置数据的设备的标识信息与该第一管理设备的身份信息匹配,则保存该配置数据;
若发送该配置数据的设备的标识信息与该第一管理设备的身份信息不匹配,则丢弃该配置数据,或对发送该配置数据的管理设备响应失败信息;
具体用于实现前述图3对应的实施例中的步骤303以及前述图4对应的实施例中的步骤404中转发器的具体实施步骤。
可选地,在一些可能的实施方式中,该转发器还包括:第一解锁单元1203;
该接收单元1201,还用于接收该第一管理设备发送的解锁指令,具体用于实现前述图3对应的实施例中的步骤304以及前述图4对应的实施例中的步骤405中转发器的具体实施步骤;
该第一解锁单元1203,用于根据该解锁指令解除该第一锁定状态。
可选地,在一些可能的实施方式中,该转发器还包括:
第二解锁单元1204,用于当该转发器确定该第一管理设备在预置时间内无响应,或该转发器的所需数据不在该第一管理设备的管理范围内时,解除该第一锁定状态,具体用于实现前述图4对应的实施例中的步骤405中转发器强制解锁的具体实施步骤。
可选地,在一些可能的实施方式中,
该接收单元1201,还用于接收第二管理设备发送的第二锁定指令,该第二管理设备为该多个管理设备中除该第一管理设备外的管理设备,具体用于实现前述图3对应的实施例中的步骤305以及前述图4对应的实施例中的步骤406中转发器的具体实施步骤;
该切换单元1202,还用于根据该第二锁定指令切换到第二锁定状态,该第二锁定状态为该转发器仅能由该第二管理设备控制的状态,具体用于实现前述图3对应的实施例中的步骤305以及前述图4对应的实施例中的步骤407中转发器的具体实施步骤。
可选地,在一些可能的实施方式中,
接收单元1201,还用于若转发器处于第一锁定状态,则当转发器接收到第三管理设备发送的第三锁定指令时,丢弃第三锁定指令,或对发送第三锁定指令的管理设备响应失败信息,具体用于实现前述图3对应的实施例中的步骤301、305、307以及前述图4对应的实施例中的步骤402、407中转发器的具体实施步骤。
图13是本申请实施例中管理设备的另一个实施例示意图,该管理设备1300可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1322(例如,一个或一个以上处理器)和存储器1332,一个或一个以上存储应用程序1342或数据1344的存储介质1330(例如一个或一个以上海量存储设备)。其中,存储器1332和存储介质1330可以是短暂存储或持久存储。存储在存储介质1330的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对管理设备中的一系列指令操作。更进一步地,中央处理器1322可以设置为与存储介质1330通信,在管理设备1300上执行存储介质1330中的一系列指令操作。
管理设备1300还可以包括一个或一个以上电源1326,一个或一个以上有线或无线网络接口1350,一个或一个以上输入输出接口1358,和/或,一个或一个以上操作系统1341,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
上述实施例图3至图10中由管理设备所执行的具体步骤可以基于该图13所示的管理设备结构。
图14是本申请实施例中转发器的另一个实施例示意图,该转发器1400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing  units,CPU)1422(例如,一个或一个以上处理器)和存储器1432,一个或一个以上存储应用程序1442或数据1444的存储介质1430(例如一个或一个以上海量存储设备)。其中,存储器1432和存储介质1430可以是短暂存储或持久存储。存储在存储介质1430的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对转发器中的一系列指令操作。更进一步地,中央处理器1422可以设置为与存储介质1430通信,在转发器1400上执行存储介质1430中的一系列指令操作。
转发器1400还可以包括一个或一个以上电源1426,一个或一个以上有线或无线网络接口1450,一个或一个以上输入输出接口1458,和/或,一个或一个以上操作系统1441,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
上述实施例图3至图10中由转发器所执行的步骤可以基于该图14所示的转发器结构。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请图3至图10中各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only  Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (40)

  1. 一种数据处理的方法,其特征在于,应用与多头管理场景,所述多头管理场景为转发器由多个管理设备进行管理的场景,所述方法包括:
    所述多个管理设备中的第一管理设备向所述转发器发送锁定指令,所述锁定指令用于指示所述转发器切换为锁定状态,所述锁定状态为所述转发器仅由所述第一管理设备控制的状态;
    所述第一管理设备对目标数据与对应数据进行差异比较,以得到对比结果,所述目标数据为所述第一管理设备上的数据,所述对应数据为所述转发器上与所述目标数据对应的数据;
    若所述第一管理设备通过所述对比结果确定所述目标数据与所述对应数据不匹配,则所述第一管理设备对所述目标数据与所述对应数据进行同步,以使所述目标数据与所述对应数据匹配。
  2. 根据权利要求1所述的方法,其特征在于,所述锁定指令中包括加锁指示以及所述第一管理设备的身份信息,所述身份信息用于所述转发器确定加锁源,所述加锁指示用于指示所述转发器切换为所述锁定状态。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一管理设备对所述目标数据与所述对应数据进行同步,包括:
    所述第一管理设备根据所述对比结果确定以所述目标数据为准对所述对应数据进行更新,或,以所述对应数据为准对所述目标数据进行更新。
  4. 根据权利要求1或2所述的方法,其特征在于,所述第一管理设备对所述目标数据与所述对应数据进行同步,还包括:
    所述第一管理设备获取输入信息,所述输入信息为所述第一管理设备响应用户操作得到;
    所述第一管理设备根据所述输入信息对所述目标数据与所述对应数据进行更新。
  5. 根据权利要求4所述的方法,其特征在于,所述第一管理设备还包括显示界面,所述第一管理设备获取输入信息之前,所述方法还包括:
    所述第一管理设备在所述显示界面上显示所述对比结果。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述第一管理设备对目标数据与对应数据进行差异比较,以得到对比结果,包括:
    所述第一管理设备获取所述目标数据中的每个特性以及所述对应数据中对应中的每个特性;
    所述第一管理设备对所述目标数据中的每个特性以及所述对应数据中对应的每个特性进行对比,以得到所述对比结果。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一管理设备向所述转发器发送解锁指令,所述解锁指令用于至少所述转发器解除所述锁定状态,以使所述转发器可以由除所述第一管理设备外的其他管理设备管理。
  8. 根据权利要求1或2所述的方法,其特征在于,在所述第一管理设备对所述目标数据与所述对应数据进行同步之后,所述方法还包括:
    若所述第一管理设备确定所述目标数据与所述转发器上的所述对应数据不一致,则所述第一管理设备通过所述目标数据对所述转发器上的所述对应数据进行更新。
  9. 根据权利要求6所述的方法,其特征在于,所述第一管理设备获取所述目标数据中的每个特性以及所述对应数据中对应中的每个特性,包括:
    所述第一管理设备根据yang数据模型,或树状结构获取所述目标数据中的每个特性以及所述对应数据中对应中的每个特性。
  10. 一种数据处理的方法,其特征在于,应用与多头管理场景,所述多头管理场景为转发器由多个管理设备进行管理的场景,所述方法包括:
    所述转发器接收所述多个管理设备中的第一管理设备发送的第一锁定指令;
    所述转发器根据所述第一锁定指令切换到第一锁定状态,所述第一锁定状态为所述转发器仅能由所述第一管理设备控制的状态。
  11. 根据权利要求10所述的方法,其特征在于,在所述转发器根据所述第一锁定指令切换到第一锁定状态之后,所述方法还包括:
    所述转发器接收所述第一管理设备发送的更新信息,所述更新信息由所述第一管理设备对目标数据与对应数据进行同步得到,所述目标数据为所述第一管理设备上的数据,所述对应数据为所述转发器上与所述目标数据对应的数据;
    所述转发器根据所述更新信息对所述转发器上对应数据进行更新。
  12. 根据权利要求11所述的方法,其特征在于,所述第一锁定指令,包括第一加锁指示以及所述第一管理设备的身份信息。
  13. 根据权利要求12所述的方法,其特征在于,所述转发器根据所述第一加锁指令切换到第一锁定状态,包括:
    所述转发器根据所述身份信息识别加锁源;
    所述转发器根据所述加锁源以及所述第一加锁指示切换到所述第一锁定状态。
  14. 根据权利要求13所述的方法,其特征在于,在所述转发器根据所述加锁源以及所述第一加锁指令切换到所述第一锁定状态之后,所述方法还包括:
    所述转发器接收配置数据;
    若发送所述配置数据的设备的标识信息与所述第一管理设备的身份信息匹配,则所述转发器保存所述配置数据;
    若发送所述配置数据的设备的标识信息与所述第一管理设备的身份信息不匹配,则所述转发器丢弃所述配置数据,或对发送所述配置数据的管理设备响应失败信息。
  15. 根据权利要求10-14中任一项所述的方法,其特征在于,所述方法还包括:
    所述转发器接收所述第一管理设备发送的解锁指令;
    所述转发器根据所述解锁指令解除所述第一锁定状态。
  16. 根据权利要求10-14中任一项所述的方法,其特征在于,所述方法还包括:
    当所述转发器确定所述第一管理设备在预置时间内无响应,或所述转发器的所需数据不在所述第一管理设备的管理范围内时,所述转发器解除所述第一锁定状态。
  17. 根据权利要求16所述的方法,其特征在于,在所述转发器解除所述第一锁定状态之后,所述方法还包括:
    所述转发器接收第二管理设备发送的第二锁定指令,所述第二管理设备为所述多个管理设备中除所述第一管理设备外的管理设备;
    所述转发器根据所述第二锁定指令切换到第二锁定状态,所述第二锁定状态为所述转发器仅能由所述第二管理设备控制的状态。
  18. 根据权利要求10-17中任一项所述的方法,其特征在于,所述方法还包括:
    若所述转发器处于所述第一锁定状态,则当所述转发器接收到第三管理设备发送的第三锁定指令时,所述转发器丢弃所述第三锁定指令,或对发送所述第三锁定指令的管理设备响应失败信息。
  19. 一种管理设备,其特征在于,应用与多头管理场景,所述多头管理场景为转发器由多个管理设备进行管理的场景,所述管理设备包括:
    发送单元,用于向所述转发器发送锁定指令,所述锁定指令用于指示所述转发器切换为第一锁定状态,所述第一锁定状态为所述转发器仅由所述第一管理设备控制的状态;
    对比单元,用于对目标数据与对应数据进行差异比较,以得到对比结果,所述目标数据为所述第一管理设备上的数据,所述对应数据为所述转发器上与所述目标数据对应的数据;
    同步单元,用于若通过所述对比结果确定所述目标数据与所述对应数据不匹配,对所述 目标数据与所述对应数据进行同步,以使所述目标数据与所述对应数据匹配。
  20. 根据权利要求19所述的管理设备,其特征在于,
    所述锁定指令中包括加锁指示以及所述第一管理设备的身份信息,所述身份信息用于所述转发器确定加锁源,所述加锁指示用于指示所述转发器切换为所述锁定状态。
  21. 根据权利要求19或20所述的管理设备,其特征在于,所述同步单元,具体用于:
    根据所述对比结果确定以所述目标数据为准对所述对应数据进行更新,或,以所述对应数据为准对所述目标数据进行更新。
  22. 根据权利要求19或20所述的管理设备,其特征在于,所述同步单元,具体还用于:
    获取输入信息,所述输入信息为所述管理设备响应用户操作得到;
    根据所述输入信息对所述目标数据与所述对应数据进行更新。
  23. 根据权利要求22所述的管理设备,其特征在于,所述管理设备还包括:
    显示界面,用于显示所述对比结果。
  24. 根据权利要求19-23中任一项所述的管理设备,其特征在于,所述对比单元,具体用于:
    获取所述目标数据中的每个特性以及所述对应数据中对应中的每个特性;
    对所述目标数据中的每个特性以及所述对应数据中对应的每个特性进行对比,以得到所述对比结果。
  25. 根据权利要求19-24中任一项所述的管理设备,其特征在于,
    所述发送单元,还用于向所述转发器发送解锁指令,所述解锁指令用于至少所述转发器解除所述锁定状态,以使所述转发器可以由除所述第一管理设备外的其他管理设备管理。
  26. 根据权利要求19或20所述的管理设备,其特征在于,所述同步单元,还用于在所述同步单元对所述目标数据与所述对应数据进行同步之后,若所述目标数据与所述转发器上的所述对应数据不一致,则通过所述目标数据对所述转发器上的所述对应数据进行更新。
  27. 根据权利要求24所述的管理设备,其特征在于,所述对比单元,具体还用于:
    根据Yang数据模型,或树状结构获取所述目标数据中的每个特性以及所述对应数据中对应中的每个特性。
  28. 一种转发器,其特征在于,应用与多头管理场景,所述多头管理场景为所述转发器由多个管理设备进行管理的场景,所述转发器包括:
    接收单元,用于接收所述多个管理设备中的第一管理设备发送的第一锁定指令;
    切换单元,用于根据所述第一锁定指令切换到第一锁定状态,所述第一锁定状态为所述 转发器仅能由所述第一管理设备控制的状态。
  29. 根据权利要求28所述的转发器,其特征在于,所述转发器还包括:同步单元;
    所述接收单元,还用于接收所述第一管理设备发送的更新信息;
    所述同步单元,还用于根据所述更新信息对所述转发器上对应数据进行更新,所述对应数据为所述转发器上与目标数据对应的数据,所述目标数据为所述第一管理设备上的数据。
  30. 根据权利要求29所述的转发器,其特征在于,
    所述第一锁定指令中包括第一加锁指示以及所述第一管理设备的身份信息。
  31. 根据权利要求30所述的转发器,其特征在于,所述切换单元,具体用于:
    根据所述身份信息识别加锁源;
    根据所述加锁源以及所述第一加锁指示切换到所述第一锁定状态。
  32. 根据权利要求31所述的转发器,其特征在于,在所述转发器根据所述加锁源以及所述第一加锁指令切换到所述第一锁定状态之后,所述同步单元,具体用于:
    接收配置数据;
    若发送所述配置数据的设备的标识信息与所述第一管理设备的身份信息匹配,则保存所述配置数据;
    若发送所述配置数据的设备的标识信息与所述第一管理设备的身份信息不匹配,则丢弃所述配置数据,或对发送所述配置数据的管理设备响应失败信息。
  33. 根据权利要求28-32中任一项所述的转发器,其特征在于,所述转发器还包括:第一解锁单元;
    所述接收单元,还用于接收所述第一管理设备发送的解锁指令;
    所述第一解锁单元,用于根据所述解锁指令解除所述第一锁定状态。
  34. 根据权利要求28-32中任一项所述的转发器,其特征在于,所述转发器还包括:
    第二解锁单元,用于当所述转发器确定所述第一管理设备在预置时间内无响应,或所述转发器的所需数据不在所述第一管理设备的管理范围内时,解除所述第一锁定状态。
  35. 根据权利要求34所述的转发器,其特征在于,
    所述接收单元,还用于接收第二管理设备发送的第二锁定指令,所述第二管理设备为所述多个管理设备中除所述第一管理设备外的管理设备;
    所述切换单元,还用于根据所述第二锁定指令切换到第二锁定状态,所述第二锁定状态为所述转发器仅能由所述第二管理设备控制的状态。
  36. 根据权利要求28-35中任一项所述的转发器,其特征在于,
    所述接收单元,还用于若所述转发器处于所述第一锁定状态,则当所述转发器接收到第 三管理设备发送的第三锁定指令时,丢弃所述第三锁定指令,或对发送所述第三锁定指令的管理设备响应失败信息。
  37. 一种管理设备,其特征在于,包括:
    处理器和存储器;
    所述存储器中存储有程序代码;
    所述处理器调用所述存储器中的程序代码时执行权利要求1-9中任一项所述方法的步骤。
  38. 一种转发器,其特征在于,包括:
    处理器和存储器;
    所述存储器中存储有程序代码;
    所述处理器调用所述存储器中的程序代码时执行权利要求10-18中任一项所述方法的步骤。
  39. 一种通信系统,其特征在于,所述通信系统包括至少一个管理设备与转发器,所述至少一个管理设备用于执行如权利要求1-9中任一项所述第一管理设备执行的步骤,所述转发器用于执行如权利要求10-18中任一项所述转发器执行的步骤。
  40. 一种计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1-18中任一项所述的方法。
PCT/CN2019/079536 2018-03-26 2019-03-25 一种数据处理的方法以及相关设备 WO2019184877A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19775975.6A EP3761604B1 (en) 2018-03-26 2019-03-25 Lock-based synchronisation of data between an sdn forwarder and an sdn controller in a network management scenario involving multiple controllers
US17/030,168 US11477067B2 (en) 2018-03-26 2020-09-23 Packet transmission method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810253225.6A CN110365719B (zh) 2018-03-26 2018-03-26 一种数据处理的方法以及相关设备
CN201810253225.6 2018-03-26

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/030,168 Continuation US11477067B2 (en) 2018-03-26 2020-09-23 Packet transmission method and apparatus

Publications (1)

Publication Number Publication Date
WO2019184877A1 true WO2019184877A1 (zh) 2019-10-03

Family

ID=68059281

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/079536 WO2019184877A1 (zh) 2018-03-26 2019-03-25 一种数据处理的方法以及相关设备

Country Status (4)

Country Link
US (1) US11477067B2 (zh)
EP (1) EP3761604B1 (zh)
CN (2) CN110365719B (zh)
WO (1) WO2019184877A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852191A (zh) * 2005-09-28 2006-10-25 华为技术有限公司 多控制设备的家庭网络协作方法
CN104378299A (zh) * 2014-11-20 2015-02-25 杭州华三通信技术有限公司 流表项处理方法以及装置
US20160020989A1 (en) * 2014-04-10 2016-01-21 Level 3 Communications, Llc Proxy of Routing Protocols to Redundant Controllers
CN106341353A (zh) * 2015-07-10 2017-01-18 中兴通讯股份有限公司 资源处理方法及装置

Family Cites Families (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8161081B2 (en) * 2001-03-16 2012-04-17 Michael Philip Kaufman System and method for generating automatic user interface for arbitrarily complex or large databases
US7885981B2 (en) * 2000-10-31 2011-02-08 Michael Philip Kaufman System and method for generating automatic user interface for arbitrarily complex or large databases
US9495652B1 (en) * 2003-06-23 2016-11-15 Daniel M. Cook Autonomic discrete business activity management method
US7941521B1 (en) * 2003-12-30 2011-05-10 Sap Ag Multi-service management architecture employed within a clustered node configuration
US10333731B2 (en) * 2005-06-09 2019-06-25 Whirlpool Corporation Methods and apparatus for communicatively coupling internal components within appliances, and appliances with external components and accessories
CA2611527A1 (en) * 2005-06-09 2006-12-21 Whirlpool Corporation Software architecture system and method for communication with, and management of, at least one component within a household appliance
US9252977B2 (en) * 2005-11-03 2016-02-02 B.S.D. Crown Ltd Method and system for an uncompromising connection from a computing device having information storage like email server to a wireless mobile device
US8390456B2 (en) * 2008-12-03 2013-03-05 Tego Inc. RFID tag facility with access to external devices
US8386593B1 (en) * 2008-07-17 2013-02-26 NetBrain Technologies Inc. Computer aided network engineering system, apparatus, and method
US9578182B2 (en) * 2009-01-28 2017-02-21 Headwater Partners I Llc Mobile device and service management
US10264138B2 (en) * 2009-01-28 2019-04-16 Headwater Research Llc Mobile device and service management
US10027711B2 (en) * 2009-11-20 2018-07-17 Alert Enterprise, Inc. Situational intelligence
JP5386745B2 (ja) * 2010-03-25 2014-01-15 株式会社日立製作所 ネットワーク監視サーバ及びネットワーク監視システム
CN102594852B (zh) * 2011-01-04 2016-03-30 中国移动通信集团公司 数据访问方法、节点及系统
US9401772B2 (en) * 2011-01-28 2016-07-26 Nec Corporation Communication system, control device, forwarding node, communication control method, and program
CN102103518B (zh) * 2011-02-23 2013-11-13 运软网络科技(上海)有限公司 一种在虚拟化环境中管理资源的系统及其实现方法
US9241044B2 (en) * 2013-08-28 2016-01-19 Hola Networks, Ltd. System and method for improving internet communication by using intermediate nodes
US10200258B2 (en) * 2014-08-14 2019-02-05 Juniper Networks, Inc. Transaction integrity for network services configuration
CN105530115B (zh) * 2014-10-23 2019-10-22 华为技术有限公司 一种实现操作管理维护功能的方法及装置
CN104731943B (zh) * 2015-03-31 2019-09-13 华为技术有限公司 一种服务器和数据处理方法
CN106332067B (zh) * 2015-06-19 2020-02-21 华为技术有限公司 防止无线网络中直径信令攻击的方法、装置和系统
CN105933327A (zh) * 2016-06-08 2016-09-07 北京奇虎科技有限公司 一种应用的解锁方法、装置和设备
GB2563887B (en) * 2017-06-28 2019-12-25 Advanced Risc Mach Ltd Masking of architectural state associated with a realm
KR20200023376A (ko) * 2017-06-28 2020-03-04 에이알엠 리미티드 메모리 영역 로킹
US10021765B1 (en) * 2017-08-01 2018-07-10 Kleverness Incorporated Intelligent switch device and central control system thereof
US10908602B2 (en) * 2017-08-02 2021-02-02 Strong Force Iot Portfolio 2016, Llc Systems and methods for network-sensitive data collection
US10162968B1 (en) * 2017-11-30 2018-12-25 Mocana Corporation System and method for securely updating a registered device using a development system and a release management system operated by an update provider and an update publisher
US11177974B2 (en) * 2020-01-27 2021-11-16 International Business Machines Corporation Consistent provision of member node group information on virtual overlay network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852191A (zh) * 2005-09-28 2006-10-25 华为技术有限公司 多控制设备的家庭网络协作方法
US20160020989A1 (en) * 2014-04-10 2016-01-21 Level 3 Communications, Llc Proxy of Routing Protocols to Redundant Controllers
CN104378299A (zh) * 2014-11-20 2015-02-25 杭州华三通信技术有限公司 流表项处理方法以及装置
CN106341353A (zh) * 2015-07-10 2017-01-18 中兴通讯股份有限公司 资源处理方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3761604A4

Also Published As

Publication number Publication date
EP3761604A1 (en) 2021-01-06
CN110365719B (zh) 2021-10-01
CN114070857A (zh) 2022-02-18
CN110365719A (zh) 2019-10-22
US20210006452A1 (en) 2021-01-07
EP3761604B1 (en) 2024-01-24
US11477067B2 (en) 2022-10-18
EP3761604A4 (en) 2021-04-21

Similar Documents

Publication Publication Date Title
WO2018024121A1 (zh) 一种网络功能nf管理方法及nf管理设备
WO2020119625A1 (zh) 光纤割接方法、装置、sdn控制器、系统及存储介质
EP2590362A1 (en) Method and apparatus for topology discovery
JP2019057905A (ja) イーサネット(登録商標)スイッチ用のロールベースの自動構成システム及び方法
CN107577780A (zh) 一种数据中心云资源同步方法和装置
US11038898B2 (en) Slow protocol packet processing method and related apparatus
WO2023184983A1 (zh) 用于空调直连控制的方法、装置、系统及存储介质
CN106411574B (zh) 一种管理控制方法和装置
CN112003943A (zh) 语音数据同步方法和装置
WO2020010906A1 (zh) 操作系统os批量安装方法、装置和网络设备
WO2019184877A1 (zh) 一种数据处理的方法以及相关设备
CN107404507B (zh) 一种sdn资源的处理方法及装置
CN110851186A (zh) 网络设备重启的方法、装置、电子设备及可读存储介质
CN112218321A (zh) 主备链路切换方法、装置、通信设备和存储介质
JP4673532B2 (ja) マルチマネージャ環境における包括アライメントプロセス
KR101581510B1 (ko) 다중 제어장치를 구비한 환경에서 제어장치의 제어 권한 변경 방법
US11907253B2 (en) Secure cluster pairing for business continuity and disaster recovery
WO2022095769A1 (zh) 组播业务设计方法、服务器及存储介质
CN107248935B (zh) 一种网管发现并监控网元的系统及方法
WO2019179392A1 (zh) 报文的生成方法及相关设备
US8352592B2 (en) Controlling emission of events from managed systems to external management systems
WO2023071494A1 (zh) 信息恢复方法、装置、电子设备和存储介质
JP6838444B2 (ja) 情報処理装置、情報処理装置制御方法及び情報処理装置制御プログラム
WO2014040409A1 (zh) 路由管理的方法和节点
EP2890053A1 (en) DS domain generating method and system

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: 19775975

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019775975

Country of ref document: EP

Effective date: 20201002