CN111835555A - Data recovery method and device and readable storage medium - Google Patents

Data recovery method and device and readable storage medium Download PDF

Info

Publication number
CN111835555A
CN111835555A CN202010496522.0A CN202010496522A CN111835555A CN 111835555 A CN111835555 A CN 111835555A CN 202010496522 A CN202010496522 A CN 202010496522A CN 111835555 A CN111835555 A CN 111835555A
Authority
CN
China
Prior art keywords
state
data
control device
main control
standby
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010496522.0A
Other languages
Chinese (zh)
Inventor
赵海亮
原野
亓娜
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN202010496522.0A priority Critical patent/CN111835555A/en
Publication of CN111835555A publication Critical patent/CN111835555A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Hardware Redundancy (AREA)

Abstract

The embodiment of the invention provides a data recovery method, a data recovery device and a readable storage medium. The method comprises the following steps: by acquiring a first state of a main control device and a second state of a standby main control device, if one of the first state and the second state is an active state and the other state is a standby state, recovering data on at least one of the main control device and the standby main control device according to the consistency of the data on the main control device, the data on the standby main control device and the data on the network management server, so that the data on the main control device is consistent with the data on the standby main control device, and therefore, after the main control device in a normal working mode fails, the video networking service can be continuously carried out through the other main control device, and the normal operation of the video networking service is ensured.

Description

Data recovery method and device and readable storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a data recovery method, apparatus, and readable storage medium.
Background
The video networking is an important milestone for network development, is a higher-level form of the Internet, is a real-time network, can realize the real-time transmission of full-network high-definition videos which cannot be realized by the existing Internet, and pushes a plurality of Internet applications to high-definition video. And the user can realize communication connection between internet terminals through the video network.
With the rapid development of video networking services, video networking client groups are also rapidly grown, and it is important to provide stable, reliable and safe video networking services. The main control equipment in the video network is a management core of the autonomous cloud, and the realized functions mainly comprise management and registration of the equipment in the autonomous cloud, realization of video network service logic inside and among the autonomous clouds, communication with a management network of the video network to realize higher-level management and the like. If a master device in some autonomous clouds fails, the failure may include a software failure and/or a due failure, which may cause the visual networking service to fail.
Disclosure of Invention
The embodiment of the invention provides a data recovery method, a data recovery device and a readable storage medium, which are used for solving the problem that the video networking service is paralyzed when a main control device in an autonomous cloud breaks down.
In a first aspect of the embodiments of the present invention, a data recovery method is provided, which is executed in a network management server, and includes:
acquiring a first state of a main master control device and a second state of a standby master control device;
if one of the first state and the second state is an active state and the other state is a standby state, restoring data on at least one of the main control device and the standby main control device according to the consistency of the data on the main control device, the data on the standby main control device and the data on the network management server, so that the data on the main control device is consistent with the data on the standby main control device.
In a second aspect of the embodiments of the present invention, there is provided a data recovery apparatus, configured in a network management server, including:
the acquisition module is used for acquiring a first state of the main master control equipment and a second state of the standby master control equipment;
and if one of the first state and the second state is an active state and the other state is a standby state, restoring data on at least one of the main control device and the standby main control device according to the consistency of the data on the main control device, the data on the standby main control device and the data on the network management server, so that the data on the main control device is consistent with the data on the standby main control device.
In a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and the computer program, when being executed by a processor, implements the steps of the data recovery method described above.
In a fourth aspect of the present invention, there is provided a data recovery apparatus, comprising a processor, a memory, and a computer program stored on the memory and operable on the processor, wherein the computer program, when executed by the processor, implements the steps of the data recovery method described above.
Aiming at the prior art, the invention has the following advantages:
in the data recovery method provided in the embodiment of the present invention, by obtaining a first state of a main master device and a second state of a standby master device, if one of the first state and the second state is an active state and the other state is a standby state, data on at least one of the main master device and the standby master device is recovered according to a situation of consistency of data on the main master device, data on the standby master device, and data on the network management server, so that the data on the main master device is consistent with the data on the standby master device, and consistency of core data on the main master device and the standby master device can be ensured to a certain extent, so that after a failure occurs in a master device in a normal operating mode, a video networking service can be continued through the other master device, and the normal operation of the video networking service is ensured.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a system architecture diagram of a data recovery method provided in an embodiment of the present invention;
fig. 2 is a view network topology tree structure diagram provided in the embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of a data recovery method according to an embodiment of the present invention;
FIG. 4 is a state diagram provided in an embodiment of the present invention;
fig. 5 is a schematic diagram of a configuration signaling transmission provided in an embodiment of the present invention;
fig. 6 is a schematic diagram of query signaling transmission provided in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present invention;
FIG. 8 is a networking schematic of a video network of the present invention;
FIG. 9 is a diagram of a hardware architecture of a node server according to the present invention;
fig. 10 is a schematic diagram of a hardware structure of an access switch of the present invention;
fig. 11 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
It should be understood that the specific embodiments described herein are merely illustrative of the invention, but do not limit the invention to only some, but not all embodiments.
Referring to fig. 1, fig. 1 is a system architecture diagram of a data recovery method provided in an embodiment of the present invention. The system comprises a network management server, a main master control device and a standby master control device, and in practical application, one of the master control devices is ensured to be in an active state, and the other master control device is ensured to be in a standby state. The number of the master devices in the standby state may be plural, and a system including two master devices is described as an example.
For a clearer understanding of the present invention, a view-networking topology tree structure is introduced herein. The overall network structure of the video networking is made up of a number of interconnected substructures called autonomous clouds. Autonomous clouds exhibit a distinct hierarchy when interconnected. Each autonomous cloud can be connected with a plurality of autonomous clouds on the next layer from the top autonomous cloud, the autonomous clouds on the lower layer are connected with the autonomous clouds on the next layer, all the autonomous clouds are connected layer by layer in the mode to form a complete video network, the hierarchical structure is a standard tree structure, and the whole video network is a tree formed by autonomous cloud nodes.
For example, referring to fig. 2, fig. 2 is a view network topology tree structure diagram provided in the embodiment of the present invention. The autonomous cloud 1 is used as a father node, the autonomous clouds 2 and 3 are child nodes of the autonomous cloud 1, the autonomous clouds 4 and 5 are child nodes of the autonomous cloud 2, and the autonomous clouds 6 and 7 are child nodes of the autonomous cloud 3. In order to ensure the reliability of the video networking service, each autonomous cloud can be provided with two main control devices, two branch control devices are arranged under each main control device, core data of the video networking is stored in the main control devices, and after one main control device is down, the video networking service can be continuously performed by using the other main control device, so that the reliable operation of the video networking service is ensured. Aiming at the aspect of protecting core data of the video network, the method is completed by the cooperation of a network management server and two pieces of main control equipment.
In order to ensure that one of the master control devices fails, after the master control device is switched to the other master control device, the video networking service can be normally performed through the other master control device, and the network management server needs to perform signaling interaction with the master control device and the standby master control device, so that the core data on the master control device and the core data on the standby master control device are kept consistent. The core data may be, for example, core data such as "registration information", "grouping information", "forwarding route", and "upgrade file information" of a terminal device, a sub-control device, a main control device, and the like. The registration information includes, for example, a terminal device number, a type, address information, and the like. If the registration information of a terminal device on two main control devices is inconsistent or the main control device that normally works currently (for example, the device that normally works currently is the main control device) has the registration information of the terminal device, and the other standby main control device (standby main control device) does not have the registration information of the terminal device, after the main control device fails to switch to the standby main control device, the standby main control device will not accept the service initiated by the terminal device to the standby main control device because the standby main control device does not have the registration information of the terminal device or is inconsistent with the registration information of the terminal device on the main control device that normally works previously. Therefore, it is necessary to ensure that the registration information of the terminal device on the main control device is consistent with the registration information of the terminal device on the standby control device. Similarly, it is necessary to ensure the consistency of various core data on the two master control devices as much as possible to ensure the normal operation of the video networking service after the master control device with the fault is switched to another master control device.
In the prior art, after the network management server is connected with one master control device, how the network management server interacts with the two master control devices is adopted in this embodiment, so that the consistency of core data of the two master control devices is ensured. First, it is summarized that the interaction between the network management server and the main control device can be summarized as two types of signaling: set signaling and query signaling. The network management server can complete the control of the whole video connection service by controlling the main control equipment. For example, the network management server tells the master control devices to adjust the network bandwidth to 100Mb/s by setting signaling, and in the case of two master control devices, if one master control device is in an active state and one master control device is in a standby state, the network management server will send the setting signaling to both the two master control devices to allow the two master control devices to adjust simultaneously, so as to ensure that the bandwidth information of the two master control devices is consistent, and a policy for allowing the two master control devices to adjust their own core data simultaneously is called a "dual-sending" policy. Therefore, the network management server can also ask the master control device "how large the network bandwidth is now? In order to avoid that the time required for the master control device in the standby state to return the query result is long, the query efficiency is improved, and meanwhile, because the mechanism provided by the embodiment can ensure the consistency of the core data on the two master control devices, in the embodiment, a query signaling is firstly sent to the master control device in the active state, and the master control device in the active state returns the query result to the network management server, and this strategy is called as a single-sending strategy. If the master control equipment in the active state returns a failure query result, the network management server sends a query signaling to the master control equipment in the standby state, and the strategy is called as a round robin single sending strategy.
For example, a network management client sends a setting signaling to a network management server, the network management server sends the setting signaling to a main control device and a standby main control device at the same time, the main control device and the standby main control device analyze the setting signaling after receiving the setting signaling to obtain parameter information in the setting signaling, and respectively write the parameter information into respective local files, if the main control device succeeds in writing, a writing success result can be sent to the network management server, and if the writing fails, a writing failure result can be sent to the network management server.
The network management server can send a query signaling to the active main control equipment in the main control equipment and the standby main control equipment, acquire the core data set by the set signaling before, receive the query signaling by the active main control equipment, compile the core data stored in the file into signaling parameters in a certain format, and send the signaling parameters as a result to the network management server. If the master control device in the active state returns the failure query result, the network management server can send a query signaling to the master control device in the standby state, that is, the above-mentioned "polling single-shot" strategy is adopted.
For a detailed description of embodiments of the present invention, reference is made to FIG. 3. Referring to fig. 3, fig. 3 is a flowchart of steps of a data recovery method provided in an embodiment of the present invention, where the method may be executed in a network management server, and the method of the present embodiment includes the following steps:
step 301, acquiring a first state of a master control device and a second state of a standby master control device.
After the network management server establishes communication connection with the main master control device and the standby master control device, the two master control devices may send their current states to the network management server in heartbeat response, and the network management server may obtain the current states of the two master control devices through the received heartbeat response, for example, the obtained current state of the main master control device is a first state, and the obtained current state of the standby master control device is a second state.
Step 302, if one of the first state and the second state is an active state and the other state is a standby state, recovering data on at least one of the main control device and the standby main control device according to a consistency condition of data on the main control device, data on the standby main control device, and data on the network management server, so that the data on the main control device is consistent with the data on the standby main control device.
The network management server can also send a hash value acquisition instruction to the main control device and the standby main control device to acquire the hash value of the data on the main control device and the hash value of the data on the standby main control device, and the hash value of the data on the main control device is compared with the hash value of the data on the standby main control device, so that the consistency of the data on the main control device, the data on the standby main control device and the data on the network management server can be determined. The data on the main master control device and the data on the standby master control device may be core data. It should be noted that each type of core data has a corresponding hash value, and the master control device and the network management server can calculate the hash value of their own core data. The core data may be, for example, one of "registration information", "packet information", "forwarding route", "user account information", and "upgrade file information" of the device. The equipment comprises main control equipment, sub-control equipment, terminal equipment and the like. The registration information is, for example, a device number of the terminal, a type of the terminal, and the like, an address of the terminal, and the like. If the registration information of the terminal devices on the two main control devices is inconsistent (for example, the registration information of the terminal device 1 is not present on the main control device in the standby state at this time), after the main control device in the active state fails, the main control device in the standby state is converted from the standby state to the active state, but because the registration information of the terminal device 1 is not present at this time, the main control device in the active state at this time may reject the network access instruction of the terminal device 1, for example. If the upgrade file information is inconsistent, after the active master control device fails, the standby master control device is switched to the active state from the standby state, so that the current version of the active master control device is not the expected version at the moment, and the service cannot be performed. For example, if the upgrade file information of the two main control devices is inconsistent, the version of the main control device in the active state is a new version, the new version is a version in which some bugs in the original version are eliminated, and the version of the main control device in the standby state is still the original version, after the main control device in the standby state is switched to, the bugs of the original version of the standby main control device still exist, which may affect the service quality or cause the service to be unable to be performed normally. Therefore, there is a need to ensure consistency of the same type of core data on both master devices.
It should be noted that the master control device and the standby master control device may also carry the hash value of the respective core data in the heartbeat response sent to the network management server. That is, the heartbeat response sent by the master control device to the network management server includes the first hash value, and the heartbeat response sent by the slave control device to the network management server includes the second hash value.
The first state may be any one of a waiting state, an active state, a standby state, an out-of-sync state, and a down state. The second state may also be any one of a wait state, an active state, a standby state, an out-of-sync state, and a down state. The main control device is used as the current device, and the standby main control device is used as the opposite terminal device to explain the various states. The standby state is used for indicating that the current equipment is synchronous with the opposite-end equipment and the current equipment is in a standby working mode, the active state is used for indicating that the current equipment and the opposite-end equipment are successfully synchronous and the current equipment is in a normal working mode, the standby state is used for indicating that the current equipment and the opposite-end equipment are successfully synchronous and the current equipment is in the standby working mode, the out-of-step state is used for indicating that the current equipment and the opposite-end equipment are failed in synchronization and the current equipment is in the normal working mode, and the down state is used for indicating that software and hardware of the current equipment have faults and the current equipment cannot normally work.
The first state and the second state may constitute a total of 25 combinations. Referring to fig. 4, fig. 4 is a schematic diagram of a state provided in the embodiment of the present invention. For example, the first state constitutes a temporary state when the first state is a waiting state and the second state is a down state, the first state and the second state constitute an abnormal state when both the first state and the second state are standby states, the first state and the second state constitute an abnormal state when both the first state and the second state are active states, and the first state and the second state constitute a temporary state when both the first state and the second state are waiting states. Other states of the composition can be referred to fig. 4, and are not described in a word, and it should be noted that, in all the combined states composed of the first state and the second state, the combined states other than the first valid state and the second valid state are regarded as invalid states. The temporary state indicates that the system is restored to a normal state after a period of time (i.e., the normal state indicates that one master control device is in an active state and the other master control device is in a standby state), the temporary state belongs to a transition state, and the temporary state is also abnormal if the system is in the temporary state for a long time. When both master devices are in a standby state, or both are in an active state, or both are in an out-of-sync state, it means that both master devices may fail, requiring manual intervention. If one of the first state and the second state is an active state and the other state is a standby state, recovering data on at least one of the main control device and the standby main control device according to the consistency of the data on the main control device, the data on the standby main control device and the data on the network management server. As shown in fig. 4, if the first state of the first state and the second state is the active state and the second state is the standby state, or the first state of the first state and the second state is the standby state and the second state is the active state, both the first state and the second state are the first active state.
According to the consistent condition of the data on the main control device, the data on the standby main control device and the data on the network management server, the data on at least one of the main control device and the standby main control device can be recovered in the following way:
if the data on the network management server is inconsistent with the first data on the main control equipment in the active state and the data on the network management server is consistent with the second data on the main control equipment in the standby state, sending a recovery signaling to the main control equipment in the active state, so that the main control equipment in the active state replaces the first data by the data on the network management server included in the recovery signaling, and the data on the main control equipment is consistent with the data on the standby main control equipment.
In the data recovery method provided in this embodiment, by obtaining the first state of the main master device and the second state of the standby master device, if one of the first state and the second state is an active state and the other state is a standby state, the data on at least one of the main master device and the standby master device is recovered according to the consistency of the data on the main master device, the data on the standby master device, and the data on the network management server, so that the data on the main master device is consistent with the data on the standby master device, thereby ensuring the consistency of the data on the main master device and the standby master device to a certain extent, and thus after the main master device in the normal working mode fails, the video networking service can be continued through the other master device, and the video networking service can be ensured to be performed normally.
After the step 301 of obtaining the first state of the master control device and the second state of the standby master control device, the method may further include the following steps:
sending a setting signaling to both the main master control device and the standby master control device under the condition that the first state and the second state form an effective state, wherein the effective state comprises a first effective state and a second effective state, the first effective state represents that one of the first state and the second state is an active state and the other state is a standby state, and the second effective state represents that one of the first state and the second state is an out-of-step state and the other state is a down state;
and outputting prompt information when the first state and the second state form an invalid state, wherein the invalid state is other than the valid state.
Referring to fig. 4, the valid states include a first valid state and a second valid state, where the second valid state indicates that one of the first state and the second state is an out-of-synchronization state, and the other is a down state.
For example, referring to fig. 5, fig. 5 is a schematic diagram illustrating a configuration signaling provided in an embodiment of the present invention. When the first state and the second state form a first effective state, namely one state is an active state, and the other state is a standby state, a dual-transmission strategy is adopted, namely setting signaling is transmitted to both the two main control devices. The purpose of the double-sending strategy is to change the data of the two main control devices at the same time, so that the probability of data inconsistency on the two main control devices can be reduced to a certain extent, the probability of data inconsistency between the main control device in an active state and the data on the network management server can be reduced, and the execution of subsequent recovery strategies can be reduced. For example, a setting signaling is sent to the main control device and the standby control device at the same time, so as to synchronize the registration information on the network management server to the two main control devices at the same time, thereby ensuring that the registration information on the two main control devices is consistent.
If it is determined that the first state and the second state form an invalid state after the first state and the second state are obtained in step 301, a setting signaling is not sent to any one of the main control device and the standby main control device, so that signaling overhead can be reduced, the probability of setting failure can be reduced, and a prompt message can be output to prompt a user, and the content of the prompt message can be respective state information of the two main control devices. It should be noted that, in the invalid state, the setting signaling is not sent to any one of the main control devices, so that it can be ensured that the data on the two main control devices are not modified, and the consistency of the data on the two main control devices is ensured to a certain extent.
Optionally, according to a consistent condition of data on the main master control device, data on the standby master control device, and data on the network management server, recovering data on at least one of the main master control device and the standby master control device may be implemented in the following manner:
if the data on the network management server is inconsistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, sending a recovery signaling to both the main control equipment in the active state and the main control equipment in the standby state, so that the main control equipment in the active state replaces the first data by the data on the network management server included in the recovery signaling, and the main control equipment in the standby state replaces the second data by the data on the network management server included in the recovery signaling; alternatively, the first and second electrodes may be,
if the data on the network management server is inconsistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, sending a recovery signaling to the main control equipment in the active state, so that the main control equipment in the active state replaces the first data with the data on the network management server included in the recovery signaling, and recovering the second data on the main control equipment in the standby state through the data on the main control equipment in the active state under the condition of successfully recovering the first data.
When the first data is successfully recovered, the second data on the master control device in the standby state is recovered through the data on the master control device in the active state, so that the data on the master control device in the active state can be synchronized to the master control device in the standby state more quickly. Because the data on the main control equipment is stored in a file form, and the data on the network management server is stored in a database form, when the network management server sends a recovery signaling to the main control server, the data in the database needs to be formed into information which can be identified by the main control server according to a certain format, and then the information is sent to the main control server by using a set signaling, so that if the data volume of the data which needs to be recovered is large, the time consumption is long. If the network management server successfully recovers the first data on the main control device in the active state after sending the recovery signaling to the main control server in the active state, if the network management server recovers the second data on the main control device in the standby state by sending the setting signaling to the main control device in the standby state, a longer time is needed, so that in order to save the recovery time, the network management server recovers the second data on the main control device in the standby state by the data on the main control device in the active state under the condition that the network management server successfully recovers the first data, and the network management server can acquire the data on the main control device in the active state and recover the acquired data in the form of a file on the main control device in the active state to the main control device in the standby state. It should be noted that, the network management server is adopted to obtain the data on the active main control device, and recover the obtained data in the form of files on the active main control device to the standby main control device, instead of directly returning the data on the standby main control device by the active main control device, so that the pressure of the active main control device can be reduced.
Optionally, the method may further include recovering a consistent condition of data on at least one of the main master control device and the standby master control device according to data on the main master control device, data on the standby master control device, and data on the network management server, and may also be implemented in the following manner:
if the data on the network management server is consistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, sending a recovery signaling to the main control equipment in the standby state so that the main control equipment in the standby state adopts the data on the network management server included in the recovery signaling to replace the second data; alternatively, the first and second electrodes may be,
and if the data on the network management server is consistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, recovering the second data on the main control equipment in the standby state through the first data on the main control equipment in the active state.
Optionally, before recovering the second data on the master control device in the standby state through the first data on the master control device in the active state, the method may further include the following steps:
judging whether the state of the main master control device and the state of the standby master control device are unchanged in N heartbeat cycles and whether first data on the main master control device is inconsistent with second data on the standby master control device in the Nth heartbeat cycle, wherein N is a preset numerical value;
if the state of the main master control device and the state of the standby master control device are kept unchanged in N heartbeat cycles and the first data on the main master control device is inconsistent with the second data on the standby master control device in the Nth heartbeat cycle, reading the first data on the active master control device and sending the read first data to the standby master control device, so that the standby master control device replaces the second data with the received first data.
It should be noted that, when the first state and the second state form a second valid state, that is, one of the states is an out-of-synchronization state, and the other state is a down state, the setting signaling is sent to both the two main control devices (in the case that the setting signaling is sent to both the two main control devices, the main control device in the down state cannot receive the setting signaling), or the setting signaling is sent only to the main control device in the out-of-synchronization state. For example, the master control device is in an out-of-step state, and the standby master control device is in a down state, under such a condition, the network management server only sends a setting signaling to the master control device, and after receiving the setting signaling, the master control device returns a success if the core data in the setting signaling is successfully written, and returns a failure if the core data in the setting signaling is failed to be written.
It should be noted that, when the first state and the second state form the first valid state, the setting signaling is sent to both the two main control devices. After sending the setting signaling to both the two main control devices, if the main control device and the standby main control device receive the setting signaling, and if the return results of the two main control devices are different, the core data on the two main control devices are inconsistent.
For example, the master control device in the active state returns a success, and the master control device in the standby state returns a failure; or the master control device in the active state fails to return, and the master control device in the standby state succeeds to return, so that the core data on the two master control devices are inconsistent. When the return results of the two main control devices are different, the network management server does not process the data temporarily, but judges whether the data on the network management server is the same as the data of the main control device in the active state or not and judges whether the data on the network management server is the same as the data on the main control device in the standby state or not in a mode of acquiring the hash values of the data on the two main control devices.
For example, when the hash value of the data on the active main control device is different from the hash value of the data on the network management server, it may be determined that the data on the active main control device is different from the data on the network management server. For example, when the first state and the second state form a first effective state, a setting signaling is sent to the main control device and the standby control device, and the results returned by the two control devices are different, the network management server does not process the setting signaling, but obtains the hash values of the data on the two control devices at a later stage, and if the hash value of the control device in the active state is different from the hash value of the data on the network management server, a recovery signaling can be sent to the control device in the active state, so as to synchronize the data on the network management server to the control device in the active state. The obtained hash values of the data on the two main control devices and the hash value of the data on the network management server are both hash values of current data, and the hash values can be changed when the data are changed.
After the data of the main control device in the active state is the same as the data on the network management server, if the hash value of the data of the main control device in the standby state is the same as the hash value of the data on the network management server, the main control device in the standby state does not need to execute any action, and at the moment, the data on the two main control devices are kept consistent. If the hash value of the data of the master control device in the standby state is different from the hash value of the data on the network management server, a step of synchronizing the data on the master control device in the active state to the master control device in the standby state needs to be executed, that is, the network management server reads the data from the master control device in the active state and sends the read data to the master control device in the standby state, and the master control device in the standby state replaces local data with the received data sent by the network management server, so that the data on the master control device in the active state and the data on the master control device in the standby state are kept consistent. It should be noted that, in order to reduce the burden of the master control devices, core data is not directly synchronized between the two master control devices, but the core data is read from the master control device in the active state by the network management server, and the read core data is sent to the master control device in the standby state. The core data of the two main control devices are stored in a file format, the network management server can directly read the core data of the file format of the main control device in the active state and send the core data to the main control device in the standby state, and the main control device in the standby state directly adopts the core data of the file format to replace the previous core data.
When the first state and the second state form a second effective state, after sending a setting signaling to the master control device in the out-of-synchronization state, if the master control device in the out-of-synchronization state is converted into an active state, the master control device in the down state is converted into a standby state, and under the condition, if the data on the master control device in the active state is different from the data on the network management server, a recovery signaling is also sent to the master control device in the active state. After the recovery signaling is sent, after the data of the main control device in the active state is the same as the data on the network management server, if the hash value of the data of the main control device in the standby state is the same as the hash value of the data on the network management server, the main control device in the standby state does not need to execute any action, and at the moment, the data on the two main control devices are kept consistent. If the hash value of the data of the master control device in the standby state is different from the hash value of the data on the network management server, a step of synchronizing the data on the master control device in the active state to the master control device in the standby state needs to be executed.
For example, when the first state and the second state form a second valid state, the master control device in the out-of-synchronization state is converted into an active state, and after the master control device in the down state is normal, the master control device enters the standby state. The network management server checks that the hash value of the data on the active main control device is different from the hash value of the data on the standby main control device, it can be determined that the data on the active main control device is different from the data on the standby main control device, the network management server does not immediately use the data on the active main control device to restore the data on the standby main control device, but waits for N heartbeat cycles (for example, waits for 10 heartbeat cycles, one heartbeat cycle is equal to 1 second), if the states of the two main control devices do not transfer within the N heartbeat cycles (i.e. the state of the original active main control device is the active state, and the original standby main control device is the standby state), and the hash values of the core data on the two main control devices are still inconsistent, the network management server reads the core data on the main control equipment in the active state and sends the read core data to the main control equipment in the standby state, the 'hysteresis recovery' is meaningful in practice, and misoperation caused by 'boundary effect' (unstable state and frequent switching) of the working state can be prevented. "hysteretic recovery" refers to waiting a predetermined period of time before performing recovery (i.e., a recovery process that is to recover core data from a master device in an active state to a master device in a standby state). For example, if the master device that was switched from the down state to the standby state again switched from the standby state to the down state within N heartbeat cycles, the recovery action cannot be performed. If the hash values of the core data on the two main control devices are the same in the N heartbeat cycles, the 'hysteresis recovery' is not executed after the N heartbeat cycles are reached.
When the first state and the second state form a first effective state, after the network management server sends a setting signaling to the two main control devices, the network management server obtains hash values of core data on the two main control devices, finds that the hash value of the core data of the main control device in the active state is the same as the hash value of the core data on the network management server, and the hash value of the core data of the main control device in the active state is different from the hash value of the core data of the main control device in the standby state (due to network transmission, the main control device in the standby state receives the core data late, so that the written data late causes the hash values of the core data on the two main control devices to be different), and executes the 'hysteresis recovery' strategy.
By executing a 'hysteresis recovery' strategy, the consistency of the core data on the two main control devices can be further improved, so that after one main control device fails, the core data on the other main control device is consistent with the core data on the failed main control device, and the video networking service can be ensured to continue.
Optionally, the method may further include the following steps:
when the first state and the second state form a first effective state, sending a query signaling to the main control equipment in an active state; receiving a query response sent by the main control equipment in an active state; if the query response indicates that the query fails, sending a query signaling to the master control device in the standby state, wherein the first valid state indicates that one of the first state and the second state is an active state and the other state is a standby state; alternatively, the first and second electrodes may be,
and when the first state and the second state form a second effective state, sending a query signaling to the main control equipment in the out-of-synchronization state, wherein the second effective state indicates that one of the first state and the second state is the out-of-synchronization state and the other state is the down state.
It should be noted that, referring to fig. 6, fig. 6 is a schematic diagram of sending query signaling provided in the embodiment of the present invention. When the first state and the second state constitute a first valid state, if the master device is the master device in the active state, the inquiry process shown by the solid line in fig. 6 is performed. And if the network management server receives the failure response result sent by the main master control device, the network management server and the standby master control device can execute the inquiry process shown by the dotted line in fig. 6. Failure is only implied if the standby master also returns a failure.
And when the first state and the second state form a second effective state, sending a query signaling to the main control equipment in the out-of-step state, and not sending the query signaling to the main control equipment in the down state. For example, if the main master control device is in an out-of-step state and the standby master control device is in a down state, the query signaling is sent to the main master control device, and the query signaling is not sent to the standby master control device.
When the first state and the second state form an invalid state, no query signaling is sent to any one of the main control device and the standby main control device, and prompt information is output to prompt the state of each main control device of the user.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a data recovery device provided in an embodiment of the present invention, where the device 700 is disposed in a network management server, and includes:
an obtaining module 710, configured to obtain a first state of a main master device and a second state of a standby master device;
a recovering module 720, configured to recover data on at least one of the main master device and the standby master device according to a consistency of the data on the main master device, the data on the standby master device, and the data on the network management server if one of the first state and the second state is an active state and the other state is a standby state, so that the data on the main master device is consistent with the data on the standby master device.
In the data recovery method provided in this embodiment, by obtaining a first state of a main master device and a second state of a standby master device, if one of the first state and the second state is an active state and the other state is a standby state, data on at least one of the main master device and the standby master device is recovered according to a situation of consistency of data on the main master device, data on the standby master device, and data on the network management server, so that the data on the main master device is consistent with the data on the standby master device, and consistency of core data on the main master device and the standby master device can be ensured to a certain extent, so that after a master device in a normal operating mode fails, a video networking service can be continued through the other master device, and the normal operation of the video networking service is ensured.
Optionally, the recovery module 720 is specifically configured to send a recovery signaling to the master control device in the active state if the data on the network management server is inconsistent with the first data on the master control device in the active state and the data on the network management server is consistent with the second data on the master control device in the standby state, so that the master control device in the active state replaces the first data with the data on the network management server included in the recovery signaling.
Optionally, the recovering module 720 is specifically configured to send a recovering signaling to both the active main control device and the standby main control device if the data on the network management server is inconsistent with the first data on the active main control device and the data on the network management server is inconsistent with the second data on the standby main control device, so that the active main control device replaces the first data with the data on the network management server included in the recovering signaling, and the standby main control device replaces the second data with the data on the network management server included in the recovering signaling; alternatively, the first and second electrodes may be,
if the data on the network management server is inconsistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, sending a recovery signaling to the main control equipment in the active state, so that the main control equipment in the active state replaces the first data with the data on the network management server included in the recovery signaling, and recovering the second data on the main control equipment in the standby state through the data on the main control equipment in the active state under the condition of successfully recovering the first data.
Optionally, the recovery module 720 is specifically configured to send a recovery signaling to the master control device in the standby state if the data on the network management server is consistent with the first data on the master control device in the active state and the data on the network management server is inconsistent with the second data on the master control device in the standby state, so that the master control device in the standby state replaces the second data with the data on the network management server included in the recovery signaling; alternatively, the first and second electrodes may be,
and if the data on the network management server is consistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, recovering the second data on the main control equipment in the standby state through the first data on the main control equipment in the active state.
Optionally, the method further includes:
the judging module is used for judging whether the state of the main master control device and the state of the standby master control device are unchanged in N heartbeat cycles and whether first data on the main master control device is inconsistent with second data on the standby master control device in an Nth heartbeat cycle, wherein N is a preset value;
and the reading module is used for reading the first data on the main control equipment in the active state and sending the read first data to the main control equipment in the standby state if the state of the main control equipment and the state of the standby main control equipment in the N heartbeat cycles are kept unchanged and the first data on the main control equipment and the second data on the standby main control equipment are inconsistent, so that the main control equipment in the standby state adopts the received first data to replace the second data.
Optionally, the method further includes:
a sending module, configured to send a setting signaling to both the main master control device and the standby master control device when the first state and the second state form an active state, where the active state includes a first active state and a second active state, the first active state indicates that one of the first state and the second state is an active state and the other state is a standby state, and the second active state indicates that one of the first state and the second state is an out-of-synchronization state and the other state is a down state;
and the output module is used for outputting prompt information under the condition that the first state and the second state form an invalid state, wherein the invalid state is other states except the valid state.
Optionally, the sending module is further configured to send an inquiry signaling to the master control device in the active state when the first state and the second state form a first valid state; receiving a query response sent by the main control equipment in an active state; if the query response indicates that the query fails, sending the query signaling to the master control device in a standby state, wherein a first valid state indicates that one of the first state and the second state is an active state and the other state is a standby state; alternatively, the first and second electrodes may be,
and when the first state and the second state form a second effective state, sending the query signaling to the main control equipment in the out-of-step state, wherein the second effective state shows that one state of the first state and the second state is the out-of-step state and the other state is the down state.
In addition, an embodiment of the present invention further provides a data recovery apparatus, where the data recovery apparatus includes a processor, a memory, and a computer program that is stored in the memory and can be run on the processor, and when the computer program is executed by the processor, the computer program implements each process of the data recovery method embodiment of the foregoing embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the data recovery method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiment of the invention also provides a computer program, and the computer program can be stored on a cloud or a local storage medium. When being executed by a computer or a processor, the computer program is used for executing the corresponding steps of the data recovery method of the embodiment of the invention and for realizing the corresponding modules in the data recovery device according to the embodiment of the invention.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As is readily imaginable to the person skilled in the art: any combination of the above embodiments is possible, and thus any combination between the above embodiments is an embodiment of the present invention, but the present disclosure is not necessarily detailed herein for reasons of space.
The data recovery methods provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The structure required to construct a system incorporating aspects of the present invention will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the data recovery method according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network technology (network technology)
Network technology innovation in video networking has improved over traditional Ethernet (Ethernet) to face the potentially enormous video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network circuit Switching (circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server technology (Servertechnology)
The server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network security technology (Network security technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service innovation technology (Service innovation technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 5, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: servers, switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node servers, access switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 9, the system mainly includes a network interface module 901, a switching engine module 902, a CPU module 903, and a disk array module 904;
the network interface module 901, the CPU module 903, and the disk array module 904 all enter the switching engine module 902; the switching engine module 902 performs an operation of looking up the address table 905 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a corresponding queue of the packet buffer 906 based on the packet's steering information; if the queue of the packet buffer 906 is nearly full, discard; the switching engine module 902 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 904 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU 903 is mainly responsible for protocol processing with an access switch and a terminal (not shown), configuring an address table 905 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 904.
The access switch:
as shown in fig. 10, the network interface module (downstream network interface module 1001, upstream network interface module 1002), switching engine module 1003, and CPU module 1004 are mainly included;
wherein, the packet (uplink data) coming from the downlink network interface module 1001 enters the packet detection module 1005; the packet detection module 1005 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 1003, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 1002 enters the switching engine module 1003; the incoming data packet of the CPU module 1004 enters the switching engine module 1003; the switching engine module 1003 performs an operation of looking up the address table 1006 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 1003 goes from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 1007 in combination with the stream-id; if the queue of the packet buffer 1007 is nearly full, it is discarded; if the packet entering the switching engine module 1003 does not go from the downlink network interface to the uplink network interface, the data packet is stored into the queue of the corresponding packet buffer 1007 according to the guiding information of the packet; if the queue of the packet buffer 1007 is nearly full, it is discarded.
The switching engine module 1003 polls all packet buffer queues, which in this embodiment of the present invention is divided into two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate control module 1008 is configured by the CPU module 1004 to generate tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 1004 is mainly responsible for protocol processing with the node server, configuration of the address table 1006, and configuration of the code rate control module 1008.
Ethernet protocol gateway:
as shown in fig. 11, the system mainly includes a network interface module (a downlink network interface module 1101 and an uplink network interface module 1102), a switching engine module 1103, a CPU module 1104, a packet detection module 1105, a rate control module 1108, an address table 1106, a packet buffer 1107, a MAC adding module 1109, and a MAC deleting module 1110.
Wherein, the data packet coming from the downlink network interface module 1101 enters the packet detection module 1105; the packet detection module 1105 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deleting module 1110 subtracts MAC DA, MAC SA, length orframe type (2byte) and enters the corresponding receiving buffer, otherwise, discards the MAC;
the downlink network interface module 1101 detects the sending buffer of the port, and if there is a packet, acquires the ethernet MAC DA of the corresponding terminal according to the video network destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MACSA of the ethernet coordination gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved label (R) Payload CRC
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.

Claims (10)

1. A data recovery method is characterized in that the method is executed in a network management server and comprises the following steps:
acquiring a first state of a main master control device and a second state of a standby master control device;
if one of the first state and the second state is an active state and the other state is a standby state, restoring data on at least one of the main control device and the standby main control device according to the consistency of the data on the main control device, the data on the standby main control device and the data on the network management server, so that the data on the main control device is consistent with the data on the standby main control device.
2. The method according to claim 1, wherein the recovering data on at least one of the main master control device and the standby master control device according to the consistency of the data on the main master control device, the data on the standby master control device, and the data on the network management server comprises:
and if the data on the network management server is inconsistent with the first data on the main control equipment in the active state and the data on the network management server is consistent with the second data on the main control equipment in the standby state, sending a recovery signaling to the main control equipment in the active state so that the main control equipment in the active state adopts the data on the network management server included in the recovery signaling to replace the first data.
3. The method according to claim 1, wherein the recovering data on at least one of the main master control device and the standby master control device according to the consistency of the data on the main master control device, the data on the standby master control device, and the data on the network management server comprises:
if the data on the network management server is inconsistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, sending a recovery signaling to both the main control equipment in the active state and the main control equipment in the standby state, so that the main control equipment in the active state replaces the first data by adopting the data on the network management server included in the recovery signaling, and the main control equipment in the standby state replaces the second data by adopting the data on the network management server included in the recovery signaling; alternatively, the first and second electrodes may be,
if the data on the network management server is inconsistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, sending a recovery signaling to the main control equipment in the active state, so that the main control equipment in the active state replaces the first data with the data on the network management server included in the recovery signaling, and recovering the second data on the main control equipment in the standby state through the data on the main control equipment in the active state under the condition of successfully recovering the first data.
4. The method according to claim 1, wherein the recovering the consistency of the data on at least one of the main master control device and the standby master control device according to the data on the main master control device, the data on the standby master control device, and the data on the network management server comprises:
if the data on the network management server is consistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, sending a recovery signaling to the main control equipment in the standby state so that the main control equipment in the standby state adopts the data on the network management server included in the recovery signaling to replace the second data; alternatively, the first and second electrodes may be,
and if the data on the network management server is consistent with the first data on the main control equipment in the active state and the data on the network management server is inconsistent with the second data on the main control equipment in the standby state, recovering the second data on the main control equipment in the standby state through the first data on the main control equipment in the active state.
5. The method of claim 4, further comprising, prior to the recovering the second data on the master device in the standby state from the first data on the master device in the active state:
judging whether the state of the main master control device and the state of the standby master control device are kept unchanged in N heartbeat cycles and whether first data on the main master control device is inconsistent with second data on the standby master control device in an Nth heartbeat cycle, wherein N is a preset value;
if the state of the main master control device and the state of the standby master control device are kept unchanged in the N heartbeat cycles and the first data on the main master control device are inconsistent with the second data on the standby master control device in the Nth heartbeat cycle, reading the first data on the master control device in the active state, and sending the read first data to the master control device in the standby state, so that the master control device in the standby state adopts the received first data to replace the second data.
6. The method according to any one of claims 1 to 5, wherein after the obtaining the first state of the master control device and the second state of the standby master control device, the method further comprises:
sending a setting signaling to both the main master control device and the standby master control device when the first state and the second state form an active state, wherein the active state includes a first active state and a second active state, the first active state indicates that one of the first state and the second state is an active state and the other state is a standby state, and the second active state indicates that one of the first state and the second state is an out-of-synchronization state and the other state is a down state;
and outputting prompt information under the condition that the first state and the second state form an invalid state, wherein the invalid state is other than the valid state.
7. The method of any one of claims 1-5, further comprising:
when the first state and the second state form a first effective state, sending a query signaling to the main control equipment in an active state; receiving a query response sent by the main control equipment in an active state; if the query response indicates that the query fails, sending the query signaling to the master control device in a standby state, wherein a first valid state indicates that one of the first state and the second state is an active state and the other state is a standby state; alternatively, the first and second electrodes may be,
and when the first state and the second state form a second effective state, sending the query signaling to the main control equipment in the out-of-step state, wherein the second effective state shows that one state of the first state and the second state is the out-of-step state and the other state is the down state.
8. A data recovery device is characterized in that the data recovery device is arranged in a network management server and comprises:
the acquisition module is used for acquiring a first state of the main master control equipment and a second state of the standby master control equipment;
and if one of the first state and the second state is an active state and the other state is a standby state, restoring data on at least one of the main control device and the standby main control device according to the consistency of the data on the main control device, the data on the standby main control device and the data on the network management server, so that the data on the main control device is consistent with the data on the standby main control device.
9. A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements a data recovery method as claimed in any one of claims 1 to 7.
10. A data recovery device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data recovery method as claimed in any one of claims 1 to 7.
CN202010496522.0A 2020-06-03 2020-06-03 Data recovery method and device and readable storage medium Pending CN111835555A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010496522.0A CN111835555A (en) 2020-06-03 2020-06-03 Data recovery method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010496522.0A CN111835555A (en) 2020-06-03 2020-06-03 Data recovery method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111835555A true CN111835555A (en) 2020-10-27

Family

ID=72899238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010496522.0A Pending CN111835555A (en) 2020-06-03 2020-06-03 Data recovery method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111835555A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667270A (en) * 2020-12-23 2021-04-16 科大讯飞股份有限公司 Voice processing resource updating method, computer equipment and storage device
CN112969048A (en) * 2021-03-23 2021-06-15 海南视联通信技术有限公司 Video conference management and control method, system and device based on video networking
CN113079035A (en) * 2021-03-10 2021-07-06 视联动力信息技术股份有限公司 Equipment network access method, device, terminal equipment and storage medium
CN113301380A (en) * 2021-04-23 2021-08-24 海南视联通信技术有限公司 Service control method, device, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070183347A1 (en) * 2004-08-29 2007-08-09 Huawei Technologies Co., Ltd. Method for implementing dual-homing
US20120236823A1 (en) * 2011-03-18 2012-09-20 Kompella Vachaspati P System and method for failover handling at geo-redundant gateways
CN109842685A (en) * 2019-02-14 2019-06-04 视联动力信息技术股份有限公司 A kind of method of data synchronization and device
CN111200521A (en) * 2019-12-27 2020-05-26 视联动力信息技术股份有限公司 Video networking service recovery method, server, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070183347A1 (en) * 2004-08-29 2007-08-09 Huawei Technologies Co., Ltd. Method for implementing dual-homing
US20120236823A1 (en) * 2011-03-18 2012-09-20 Kompella Vachaspati P System and method for failover handling at geo-redundant gateways
CN109842685A (en) * 2019-02-14 2019-06-04 视联动力信息技术股份有限公司 A kind of method of data synchronization and device
CN111200521A (en) * 2019-12-27 2020-05-26 视联动力信息技术股份有限公司 Video networking service recovery method, server, electronic equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667270A (en) * 2020-12-23 2021-04-16 科大讯飞股份有限公司 Voice processing resource updating method, computer equipment and storage device
CN112667270B (en) * 2020-12-23 2024-02-13 科大讯飞股份有限公司 Updating method of voice processing resource, computer equipment and storage device
CN113079035A (en) * 2021-03-10 2021-07-06 视联动力信息技术股份有限公司 Equipment network access method, device, terminal equipment and storage medium
CN113079035B (en) * 2021-03-10 2024-05-10 视联动力信息技术股份有限公司 Equipment network access method and device, terminal equipment and storage medium
CN112969048A (en) * 2021-03-23 2021-06-15 海南视联通信技术有限公司 Video conference management and control method, system and device based on video networking
CN113301380A (en) * 2021-04-23 2021-08-24 海南视联通信技术有限公司 Service control method, device, terminal equipment and storage medium
CN113301380B (en) * 2021-04-23 2024-03-12 海南视联通信技术有限公司 Service management and control method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111835555A (en) Data recovery method and device and readable storage medium
CN110022228B (en) Server switching method, device and system and readable storage medium
CN108880851B (en) Configuration updating method and interaction system
CN111787349B (en) Data caching method, device, equipment and medium
CN109729388B (en) Method and device for switching video networking servers
CN109819062B (en) Method and device for accessing network by using virtual MAC address
CN110557319B (en) Message processing method and device based on video network
CN109672572B (en) Data transmission method and device
CN110120885B (en) Method and device for processing equipment state information
CN109714568B (en) Video monitoring data synchronization method and device
CN109151061B (en) Data storage method and device
CN110690989A (en) Service data transmission method, device and computer readable storage medium
CN111211982B (en) Data forwarding method and device, electronic equipment and storage medium
CN110166363B (en) Multicast link monitoring method and device
CN109587524B (en) Method and device for synchronizing video networking resources to Internet terminal
CN110688532B (en) Transaction management method and device
CN110830817A (en) Video transcoding capacity adjusting method and video transcoding server
CN110401846B (en) Data access method, device, system, equipment and medium based on video network
CN112073756B (en) Service control method, device, electronic equipment and readable storage medium
CN110808896B (en) Data transmission method and device, electronic equipment and storage medium
CN110493319B (en) Data synchronization method, system and device
CN110381029B (en) Monitoring resource synchronization method and device
CN110120937B (en) Resource acquisition method, system, device and computer readable storage medium
CN110099307B (en) Node connection method, video network and computer readable storage medium
CN109379222B (en) Method and system for comparing versions of core servers

Legal Events

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