CN110022228B - Server switching method, device and system and readable storage medium - Google Patents

Server switching method, device and system and readable storage medium Download PDF

Info

Publication number
CN110022228B
CN110022228B CN201910177275.5A CN201910177275A CN110022228B CN 110022228 B CN110022228 B CN 110022228B CN 201910177275 A CN201910177275 A CN 201910177275A CN 110022228 B CN110022228 B CN 110022228B
Authority
CN
China
Prior art keywords
server
main
standby
standby server
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910177275.5A
Other languages
Chinese (zh)
Other versions
CN110022228A (en
Inventor
孙亮亮
方小帅
李云鹏
沈军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201910177275.5A priority Critical patent/CN110022228B/en
Publication of CN110022228A publication Critical patent/CN110022228A/en
Application granted granted Critical
Publication of CN110022228B publication Critical patent/CN110022228B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Abstract

The invention provides a server switching method, a device and a system and a readable storage medium, and relates to the technical field of video networking. In the method, the standby server sends an online confirmation message to the main cooperative conversion server, determines that the main cooperative conversion server is in an offline state under the condition that a response message returned by the main cooperative conversion server is not received, and then switches to a working state. The main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server. Therefore, the standby server enters a working state when the main cooperative conversion server is offline, and can provide services instead of the main cooperative conversion server during the offline period of the main cooperative conversion server, so that the problem of service interruption caused by the fact that the main cooperative conversion server enters an offline state due to faults is solved.

Description

Server switching method, device and system and readable storage medium
Technical Field
The present invention relates to the field of video networking technologies, and in particular, to a server switching method, device, system, and readable storage medium.
Background
With the continuous development of video networking technology, videos in video networking are more and more, and data generally need to be stored in order to ensure the security of the data.
In the prior art, data is usually stored in a main cooperative server, for example, a monitoring terminal stores an acquired monitoring video into the main cooperative server, so that the terminal can perform data interaction with the main cooperative server. However, the master collaboration server may fail and enter an offline state, so that the master collaboration server cannot interact with other terminals, thereby causing service interruption.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a server switching method, apparatus, system and readable storage medium that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a server switching method, which is applied to a standby server in a video network, and the method includes:
sending an online confirmation message to a main cooperation server;
under the condition that a response message returned by the main cooperative transmission server is not received, determining that the main cooperative transmission server is in an off-line state;
switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
Optionally, the determining that the master cooperative server is in an offline state when the response message returned by the master cooperative server is not received includes:
continuously sending heartbeat confirmation messages to the main coordination and transformation server at preset time intervals;
if the response message returned by the main cooperative transmission server to the N heartbeat confirmation messages is not received, confirming that the main cooperative transmission server is in an off-line state; and the response messages returned for the N heartbeat confirmation messages are continuously sent by the main corotation server, wherein N is an integer not less than 2.
Optionally, the method further includes:
when the number of times of receiving the response message reaches a first preset number of times, acquiring data stored on the main transfer server;
and performing synchronous updating operation on the data stored in the standby server based on the data stored in the main cooperative conversion server, so that the data stored in the standby server is consistent with the data stored in the main cooperative conversion server.
Optionally, the method further includes:
when the number of times of executing the synchronous updating operation reaches a second preset number of times, acquiring a program version number of the main corotation server;
if the program version number of the main transfer server is not consistent with the degree version number of the standby server, sending a program upgrading instruction to the main transfer server; the program upgrading instruction is used for indicating the main coordination server to send the installation package of the currently configured program to the standby server;
receiving the installation package sent by the main cooperative conversion server;
and updating the version of the program configured on the standby server based on the installation package.
Optionally, the method further includes:
sending fault reminding information to a user to remind the user to maintain the main cooperative server so as to enable the main cooperative server to enter an online state;
the fault reminding information is used for indicating that the main cooperative server fails.
In order to solve the above problem, an embodiment of the present invention further discloses a server switching method, where the method is applied to a master collaboration server in a video network, and the method includes:
receiving an online confirmation message sent by a standby server;
if the main cooperative rotation server is in a working state, returning a response message to the standby server so as to confirm that the main cooperative rotation server is in an off-line state and switch to the working state under the condition that the standby server does not receive the response message;
the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
Optionally, the receiving the online confirmation message sent by the standby server includes:
receiving heartbeat confirmation messages continuously sent to the main coordinating and rotating server by the standby server at preset time intervals;
accordingly, the returning a response message to the standby server includes:
and returning an acknowledgement message respectively for each heartbeat acknowledgement message which is continuously sent.
Optionally, the standby server is further configured to send a fault notification message to a user after confirming that the main cooperative server is in an offline state, so as to notify the user to maintain the main cooperative server, so that the main cooperative server enters an online state;
accordingly, the method further comprises:
after the main cooperative conversion server enters an online state, acquiring data stored on the standby server;
based on the data stored in the standby server, performing synchronous updating operation on the data stored in the main cooperative conversion server;
after the synchronous updating operation is completed, sending a standby instruction to the standby server; the standby instruction is used for indicating the standby server to be switched from a working state to a standby state;
and after the standby server enters the standby state, switching to the working state.
In order to solve the above problem, an embodiment of the present invention further discloses a server switching method, which is applied to a system including a standby server and a main coordination server in a video network, and the method includes:
the standby server sends an online confirmation message to the main auxiliary transfer server;
the main auxiliary conversion server receives an online confirmation message sent by the standby server;
if the main cooperative conversion server is in a working state, the main cooperative conversion server returns a response message to the standby server;
the standby server determines that the main cooperative conversion server is in an off-line state when not receiving a response message returned by the main cooperative conversion server;
the standby server is switched to a working state;
the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
In order to solve the above problem, an embodiment of the present invention further discloses a server switching device, which is applied to a master assisted switching server in a video network, and the device includes:
the first sending module is used for sending an online confirmation message to the main auxiliary transfer server;
the first determining module is used for determining that the main cooperative server is in an off-line state under the condition that a response message returned by the main cooperative server is not received;
the first switching module is used for switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
Optionally, the first determining module is configured to:
continuously sending heartbeat confirmation messages to the main coordination and transformation server at preset time intervals;
if the response message returned by the main cooperative transmission server to the N heartbeat confirmation messages is not received, confirming that the main cooperative transmission server is in an off-line state; and the response messages returned for the N heartbeat confirmation messages are continuously sent by the main protocol conversion server, wherein N is an integer not less than 2.
Optionally, the apparatus further comprises:
the first obtaining module is used for obtaining the data stored on the main transfer server when the times of receiving the response message reach a first preset time;
and the first updating module is used for carrying out synchronous updating operation on the data stored in the standby server based on the data stored in the main cooperative conversion server so as to ensure that the data stored in the standby server is consistent with the data stored in the main cooperative conversion server.
Optionally, the apparatus further comprises:
the second obtaining module is used for obtaining the program version number of the main cooperative server when the number of times of executing the synchronous updating operation reaches a second preset number of times;
the second sending module is used for sending a program upgrading instruction to the main corotation server if the program version number of the main corotation server is inconsistent with the degree version number of the standby server; the program upgrading instruction is used for indicating the main transfer server to send an installation package of a currently configured program to the standby server;
the first receiving module is used for receiving the installation package sent by the main coordination server;
and the upgrading module is used for upgrading the version of the program configured on the standby server based on the installation package.
Optionally, the apparatus further comprises:
the third sending module is used for sending fault reminding information to a user to remind the user to maintain the main cooperative server so as to enable the main cooperative server to enter an online state;
the fault reminding information is used for indicating that the main cooperative server fails.
In order to solve the above problem, an embodiment of the present invention further discloses a server switching device, which is applied to a master assisted switching server in a video network, and the device includes:
the second receiving module is used for receiving the online confirmation message sent by the standby server;
the first returning module is used for returning a response message to the standby server if the main cooperative conversion server is in a working state, so that the standby server confirms that the main cooperative conversion server is in an offline state under the condition that the response message is not received and switches to the working state;
the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
Optionally, the second receiving module is configured to:
receiving heartbeat confirmation messages continuously sent to the main coordination and rotation server by the standby server at preset time intervals;
accordingly, the first return module is configured to:
and returning an acknowledgement message respectively for each heartbeat acknowledgement message which is continuously sent.
Optionally, the standby server is further configured to send a fault notification message to a user after confirming that the main cooperative server is in an offline state, so as to remind the user to maintain the main cooperative server, so that the main cooperative server enters an online state;
correspondingly, the device further comprises:
the third acquisition module is used for acquiring the data stored on the standby server after the main cooperative server enters an online state;
the second updating module is used for carrying out synchronous updating operation on the data stored in the main coordination server based on the data stored in the standby server;
a fourth sending module, configured to send a standby instruction to the standby server after the synchronous update operation is completed; the standby instruction is used for indicating the standby server to be switched from a working state to a standby state;
and the second switching module is used for switching to a working state after the standby server enters a standby state.
In order to solve the above problem, the embodiment of the present invention further discloses a server switching system, which is applied to a video network, and the system includes a standby server and a main cooperative server;
the standby server is used for sending an online confirmation message to the main cooperative conversion server;
the main coordination server is used for receiving an online confirmation message sent by the standby server;
if the main cooperative conversion server is in a working state, the main cooperative conversion server is used for returning a response message to the standby server;
the standby server is used for determining that the main cooperative conversion server is in an off-line state when a response message returned by the main cooperative conversion server is not received;
the standby server is used for switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server
In order to solve the above problem, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the server switching method as described above.
The embodiment of the invention has the following advantages:
the standby server sends an online confirmation message to the main cooperative conversion server, determines that the main cooperative conversion server is in an offline state under the condition that a response message returned by the main cooperative conversion server is not received, and then switches to a working state. The main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server. Therefore, the standby server enters a working state when the main cooperative conversion server is offline, and can provide services instead of the main cooperative conversion server during the offline period of the main cooperative conversion server, so that the problem of service interruption caused by the fact that the main cooperative conversion server enters an offline state due to faults is solved.
Drawings
FIG. 1 is a schematic diagram of a video networking of the present invention;
FIG. 2 is a schematic diagram of a hardware architecture of a node server according to the present invention;
fig. 3 is a schematic diagram of a hardware structure of an access switch of the present invention;
fig. 4 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention;
fig. 5 is a flowchart illustrating steps of a server switching method according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating steps of another server switching method according to an embodiment of the present invention;
fig. 7 is an interaction flowchart of another server switching method according to an embodiment of the present invention;
fig. 8 is a flowchart illustrating steps of a further server switching method according to an embodiment of the present invention;
fig. 9 is a block diagram of a server switching device according to an embodiment of the present invention;
fig. 10 is a block diagram of another server switching device provided in the embodiment of the present invention;
fig. 11 is a block diagram of a server switching system according to an embodiment of 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.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services such as high-definition video conferences, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mails, personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like into a system platform, and realizes high-definition quality video broadcast through a television or a computer.
To enable those skilled in the art to better understand the embodiments of the present invention, the following description is given of 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 video networking technology adopts Packet Switching 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, and realizes the seamless connection of a whole network switching type virtual circuit and a data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet exchange of the Ethernet, eliminates the Ethernet defect on the premise of full compatibility, and has end-to-end seamless connection of the whole network, direct connection with a user terminal and direct bearing of an IP data packet. The user data does not require any format conversion across the entire network. The video network is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the large-scale high-definition video real-time transmission of the whole network which can not be realized by the current Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video network and the unified video platform is different from the traditional server, the streaming media transmission of the video network and the unified video platform is established on the basis of connection orientation, the data processing capability of the video network and the unified video platform is irrelevant to 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, but also connected with a single user, a private network user or the sum of one network. 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:
an internet of view is a centrally controlled network structure, which may be of the tree, star, ring, etc. type, but on this basis a centralized control node is required in the network to control the entire network.
Fig. 1 is a schematic networking diagram of a video network according to the present invention, and as shown in fig. 1, the video network is divided into an access network and a metropolitan area 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 on the metro network part can be classified into 3 types: metropolitan area server, node switch, 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 controlled by a hierarchical centralized way, and the network controlled by the node server and the metropolitan area server can be in various structures such as a tree, a star, a ring and the like.
The access network part can form a unified video platform (the part in a 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:
fig. 2 is a schematic diagram of a hardware structure of a node server according to the present invention, as shown in fig. 2, the node server mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the packets coming from the network interface module 201, the cpu module 203 and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 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 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (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 204.
The access switch:
fig. 3 is a schematic diagram of a hardware structure of an access switch of the present invention, as shown in fig. 3, mainly including a network interface module (a downstream network interface module 301, an upstream network interface module 302), a switching engine module 303, and a CPU module 304;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the incoming data packet of the CPU module 304 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is close to full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues, which in this embodiment of the 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 queued packet counter is greater than zero.
The rate control module 308 is configured by the CPU module 304, and generates 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 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol gateway:
fig. 4 is a schematic diagram of a hardware structure of an ethernet coordination gateway according to the present invention, and as shown in fig. 4, the ethernet coordination gateway mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a code rate control module 408, an address table 406, a packet buffer 407, an MAC adding module 409, and an MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 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 deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2 byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol 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 byte, 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
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 the types of different datagrams, 64 bytes if various protocol packets, 32+1024=1056 bytes if single-multicast data packets, and certainly not limited to the above 2 types;
the CRC consists of 4 bytes and its calculation method follows 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., more than 2 connections between a node switch and a node server, between a node switch and a node switch, and between a node switch and a node server. However, the 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 the present 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 there are 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 0x0001. 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 all passively executed, which is different from label allocation of MPLS, which 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.
Based on the above characteristics of the video network, one of the core concepts of the embodiments of the present invention is provided, in which the standby server detects whether the main cooperative server is in an offline state by sending an online confirmation message to the main cooperative server, and if the main cooperative server is in the offline state, the standby server is switched to a working state to provide a service in place of the main cooperative server.
Fig. 5 is a flowchart of steps of a server switching method provided by an embodiment of the present invention, where the method is applied to a standby server in a video network, and as shown in fig. 5, the method includes:
and step 501, sending an online confirmation message to the master collaboration server.
In the embodiment of the invention, the standby server can be a server which is connected with the main cooperative server in advance, so that the standby server can interact with the main cooperative server in the subsequent steps. Specifically, the configuration may be performed based on the internet protocol addresses and port numbers of the standby server and the primary protocol server, so that a connection is established between the standby server and the primary protocol server.
Further, in order to timely replace the main cooperative server to provide services for other terminals when the main cooperative server fails, in the embodiment of the present invention, the standby server may send an online confirmation message to the main cooperative server to confirm whether the main cooperative server is in an offline state.
Step 502, under the condition that the response message returned by the master cooperative server is not received, determining that the master cooperative server is in an off-line state.
In the embodiment of the present invention, if the primary coordination server is not in the offline state, a response message is returned to the standby server after receiving the online confirmation message sent by the standby server, and correspondingly, if the primary coordination server is in the offline state, the primary coordination server cannot return the response message to the standby server.
Step 503, switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
In the embodiment of the present invention, if the standby server determines that the main cooperative server is in an offline state, correspondingly, in order to ensure that the service provided by the main cooperative server is not interrupted, at this time, the standby server may be switched to a working state, that is, a program configured on the standby server is run, so as to take over the service provided by the main cooperative server.
Further, the primary message number is an identifier indicating to which server the message sent by the terminal is to be sent in the video network, for example, assuming that the primary message number contained in the message sent by the terminal is 001, the message is sent to the server with the primary message number 001, and assuming that the primary message number contained in the message sent by the terminal is 002, the message is sent to the server with the primary message number 002. Correspondingly, because the main message numbers of the standby server and the main cooperation server are the same, when the main cooperation server is in an off-line state and the standby server is in a working state, the message sent to the main cooperation server by the terminal can be directly sent to the standby server, and further, because the data and the configured program stored in the standby server are the same, the standby server can be switched to the working state to replace the main cooperation server to interact with other terminals so as to provide services for other terminals.
In summary, in the server switching method provided in the embodiment of the present invention, the standby server sends the online confirmation message to the main cooperative server, and determines that the main cooperative server is in the offline state when the response message returned by the main cooperative server is not received, and then switches to the working state. The main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server. Therefore, the standby server enters a working state when the main cooperative conversion server is offline, and can provide services instead of the main cooperative conversion server during the offline period of the main cooperative conversion server, so that the problem of service interruption caused by the fact that the main cooperative conversion server enters an offline state due to faults is solved.
Fig. 6 is a flowchart of steps of another server switching method provided in an embodiment of the present invention, where the method is applied to a master collaboration server in a video network, and as shown in fig. 6, the method includes:
and 601, receiving an online confirmation message sent by the standby server.
In the embodiment of the invention, the main cooperative conversion server can be connected with the standby server in advance, so that the standby server can send the online confirmation message to the main cooperative conversion server. Accordingly, the primary collaboration server may receive the online confirmation message sent by the backup server. The online confirmation message may be used to confirm whether the master collaboration server is in an offline state.
Step 602, if the primary coordination rotation server is in a working state, returning a response message to the standby server, so that the standby server confirms that the primary coordination rotation server is in an offline state and switches to the working state under the condition that the response message is not received; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
In the embodiment of the invention, the main cooperation server returns a response message to the standby server when in the working state, so that the standby server can indicate that the main cooperation server is not in the off-line state, correspondingly, if the main cooperation server is in the off-line state, the standby server cannot return the response message to the standby server after receiving the on-line confirmation message sent by the standby server, so that the standby server can confirm whether the main cooperation server is in the off-line state or not by whether receiving the response message or not, and can switch to the working state when the main cooperation server is in the off-line state, further, the standby server can replace the main cooperation server to interact with other terminals by switching to the working state, and provides services consistent with the services provided by the main cooperation server for other terminals.
In summary, in another server switching method provided in the embodiments of the present invention, the primary coordination server may receive an online confirmation message sent by the standby server, and if the primary coordination server is in the working state, return a response message to the standby server, so that the standby server confirms that the primary coordination server is in the offline state under the condition that the response message is not received, and switch to the working state, where a primary message number, stored data, and a configured program of the standby server are the same as a primary message number, stored data, and a configured program of the primary coordination server. Therefore, the main cooperation server provides a basis for confirming whether the standby server is in the offline state or not by sending the response message, so that the standby server can timely enter the working state when the main cooperation server is in the offline state, the service is provided by replacing the main cooperation server during the offline state of the main cooperation server, and the problem of service interruption caused by the fact that the main cooperation server enters the offline state due to faults is solved.
Fig. 7 is an interaction flowchart of another server switching method provided in an embodiment of the present invention, where the method is applied in a video network, and as shown in fig. 7, the method includes:
and 701, the standby server sends an online confirmation message to the main transfer server.
In this step, the standby server may continuously send heartbeat confirmation messages to the main corotation server at a preset time interval, where the preset time interval may be preset according to an actual requirement, for example, the preset time interval may be 10 seconds, that is, the standby server may contact and send heartbeat confirmation messages to the main corotation server every 10 seconds, for example, the standby server may send a heartbeat confirmation message at 1 minute 10 seconds, send a heartbeat confirmation message at 1 minute 20 seconds, send a heartbeat confirmation message at 1 minute 30 seconds, and so on.
Step 702, the primary coordination and transformation server receives an online confirmation message sent by the standby server.
Accordingly, the master auxiliary rotation server may receive heartbeat confirmation messages continuously sent by the standby server to the master auxiliary rotation server at preset time intervals.
And 703, if the main cooperative transmission server is in a working state, the main cooperative transmission server returns a response message to the standby server.
In this step, if the master collaboration server is in a working state, the master collaboration server may return a confirmation message for each heartbeat confirmation message that is continuously sent, so as to indicate that the master collaboration server is not in an offline state.
Step 704, the standby server determines that the primary cooperative server is in an offline state when not receiving the response message returned by the primary cooperative server.
In an actual application scenario, the master cooperative rotation server may have a situation that a response message is not successfully returned to the standby server due to an error in message transmission, and at this time, if a response message returned by the master cooperative rotation server for a certain heartbeat acknowledgment message is not directly received, it is determined that the master cooperative rotation server is in an offline state, and a problem of misjudgment may occur. Therefore, this step can be realized by the following substep (1):
substep (1): if the standby server does not receive a response message returned by the main cooperation server to the N heartbeat confirmation messages, the main cooperation server is confirmed to be in an off-line state; and the response messages returned to the N heartbeat confirmation messages are continuously sent by the main protocol conversion server.
Specifically, N may be an integer not less than 2, and a specific value of N may be preset according to actual conditions, for example, N may be 3. In the embodiment of the invention, when the main cooperative rotation server does not return response messages to a plurality of continuous heartbeat confirmation messages, the main cooperative rotation server is determined to be in an off-line state, so that the possibility of misjudgment can be reduced, and the accuracy of determination operation can be improved.
Step 705, the standby server switches to a working state.
Specifically, the implementation manner of this step may refer to step 503, which is not described herein again in this embodiment of the present invention.
Further, after the standby server is switched to the operating state, the standby server needs to provide a service based on the data and the configured program stored in the standby server instead of the main transfer server, and in an actual application scenario, the data and the configured program stored in the main transfer server are often changed. The specific standby server can update the stored data through the following substeps (1) to (2):
substep (1): and when the times of receiving the response message by the standby server reach a first preset time, acquiring the data stored on the main cooperative conversion server.
In this step, the first preset number of times may be set according to an actual requirement, for example, the first preset number of times may be 20, and the first preset number of times may also be 30, which is not limited in this embodiment of the present invention, and of course, in another optional embodiment of the present invention, a time interval may also be used as a standard for updating data, for example, data stored in the main transfer server may be obtained once every 7 days to update data.
Further, the standby server may transmit a data acquisition request to the primary cooperative server based on a connection channel with the primary cooperative server, and accordingly, the primary cooperative server may transmit the stored data to the standby server after receiving the data acquisition request.
Substep (2): and the standby server performs synchronous updating operation on the data stored on the standby server based on the data stored on the main cooperative conversion server so as to enable the data stored on the standby server to be consistent with the data stored on the main cooperative conversion server.
In this step, the standby server may compare the acquired data with data stored in itself one by one, store data that is not stored in the standby server in the acquired data to the standby server, and delete data that is not stored in the standby server in the acquired data, so that the standby server and the main transfer server store the same data.
In the embodiment of the invention, the synchronous updating operation is carried out by acquiring all the data stored in the main transfer server and the auxiliary transfer server, so that the consistency of the data stored in the standby server and the data stored in the main transfer server can be ensured after the synchronous updating operation is carried out based on the data. It should be noted that, in an actual application scenario, in order to reduce the amount of data to be transmitted, the primary coordination server may also transmit the changed data to the standby server, and the standby server performs a synchronous update operation on the stored data only according to the changed data, which is not limited in this embodiment of the present invention.
Further, the standby server may implement the procedure of updating the configuration through the following substeps (3) to (6):
substep (3): and when the number of times of executing the synchronous updating operation reaches a second preset number of times, acquiring the program version number of the main corotation server.
In this step, the second preset number may be set according to an actual requirement, for example, the second preset number may be 10, and the second preset number may also be 15, which is not limited in this embodiment of the present invention, and in another optional embodiment of the present invention, a time interval may also be used as a standard for updating data, for example, the program version number of the master rotation server may be obtained once every 15 days, so as to perform program updating.
Further, the standby server may send a version number acquisition request to the primary cooperative server based on a connection channel with the primary cooperative server, and accordingly, the primary cooperative server may send the version number of the currently running program to the standby server after receiving the version number acquisition request.
Substep (4): and if the program version number of the main cooperative rotation server is not consistent with the degree version number of the standby server, sending a program upgrading instruction to the main cooperative rotation server.
In an actual application scenario, version numbers of programs of different versions are not used, and after a program configured on the main cooperative rotation server is updated each time, a program version number on the main cooperative rotation server correspondingly changes, so that if the program version number of the main cooperative rotation server is consistent with the degree version number of the standby server, it can be considered that the program configured on the standby server is the same as the program configured on the main cooperative rotation server, otherwise, if the program version number of the main cooperative rotation server is inconsistent with the degree version number of the standby server, it can be considered that the program configured on the standby server is different from the program configured on the main cooperative rotation server, at this time, a program upgrade instruction can be sent to the main cooperative rotation server, where the program upgrade instruction can be used to instruct the main cooperative rotation server to send an installation package of a currently configured program to the standby server.
Substep (5): and receiving the installation package sent by the main cooperation server.
In the embodiment of the present invention, after receiving the program upgrade instruction, the primary coordination server may send the installation package of the currently configured program to the standby server, and accordingly, the standby server may receive the installation package, so as to upgrade the program configured on the standby server.
Substep (6): and updating the version of the program configured on the standby server based on the installation package.
In this step, the standby server may parse the installation package, and then upgrade the currently configured program on the standby server by using the installation file in the parsed installation package, thereby ensuring that the program configured on the standby server is consistent with the program configured on the main cooperative server. It should be noted that, after upgrading the currently configured program, the standby server may be restarted in order to ensure that the upgrading operation is valid, and accordingly, after being restarted, the standby server may enter a standby state, that is, enter a state of detecting whether the main cooperative rotation server is in an offline state, and switch to an operating state when the main cooperative rotation server is in the offline state.
In the embodiment of the invention, the data stored in the standby server and the configured program are synchronously updated, so that the standby server can normally provide services for other terminals when replacing the main cooperation server to provide services, and the service quality is ensured.
Step 706, the standby server sends a fault reminding message to a user to remind the user to maintain the main cooperative server, so that the main cooperative server enters an online state.
In this step, the fault reminding information may be used to indicate that the main turning server fails, specifically, the standby server may send the fault reminding information to a preset user operation platform based on a preset data center server, for example, an Mserver server, so as to show that the main turning server fails to work to a user through the user operation platform, and of course, the standby server may also directly send the fault reminding information to an electronic device of the user, for example, a mobile phone. Furthermore, after the user receives the fault reminding information and knows that the main cooperative server fails, the user can maintain and restart the main cooperative server so that the main cooperative server enters an online state and can be put into use again.
It should be noted that, in the embodiment of the present invention, the execution sequence of the above steps is not unique, for example, step 706 may be placed after step 704 and before step 705, that is, the standby server may send the fault notification information to the user first after determining that the main coordination server is in the offline state, so that the main coordination server can be maintained in time, and then switch to the working state, and certainly, step 706 is placed after step 705, that is, after determining that the main coordination server is in the offline state, the standby server will switch to the working state first, and then send the fault notification information to the user, so that the main coordination server can be replaced to the fastest extent, and then the time for service interruption provided by the main coordination server is reduced to the greatest extent, and the service efficiency is ensured.
And 707, after the main coordination server enters an online state, acquiring data stored in the standby server.
Accordingly, in this step, the master cooperative conversion server may obtain the data stored on the standby server after entering the online state. Specifically, the main cooperative server may send a data acquisition request to the standby server, and accordingly, the standby server may send the stored data to the main cooperative server after receiving the data acquisition request.
Step 708, the primary coordination server performs a synchronous update operation on the data stored in the primary coordination server based on the data stored in the standby server.
Specifically, an implementation manner of the synchronous update operation performed by the primary and secondary rotation servers based on the acquired data is the same as that of the synchronous update operation performed by the standby server based on the acquired data in the sub-step (2), and reference may be made to the sub-step (2), which is not described herein again in the embodiment of the present invention. In the embodiment of the invention, the data stored in the main cooperative conversion server is synchronously updated, so that the main cooperative conversion server can normally provide service for other terminals after entering the working state again, and the service quality is ensured.
Step 709, after the primary coordination server completes the synchronous updating operation, sending a standby instruction to the standby server.
In this step, since the primary and backup servers have the same primary message number, if both are in a working state at the same time, when the terminal sends a message to the primary and backup servers based on the primary message number, the message may be repeatedly responded, and thus a problem of message processing confusion occurs.
Step 710, the main coordination server switches to a working state after the standby server enters a standby state.
In this step, the master cooperative transmission server may implement switching to the working state by running a program configured on the master cooperative transmission server. It should be noted that, in an actual application scenario, generally, the program configured on the standby server is not updated, and therefore, in the embodiment of the present invention, after the main transfer server enters the online state, the data on the main transfer server may be updated only before entering the working state, and of course, in another optional embodiment of the present invention, after the main transfer server enters the online state, the program configured on the main transfer server may be updated synchronously by interacting with the standby server before entering the working state, so as to ensure that the main transfer server and the standby server are consistent, which is not limited in the embodiment of the present invention.
In summary, in another server switching method provided in the embodiments of the present invention, the standby server sends an online confirmation message to the main cooperative server, the main cooperative server returns a response message in response to the received online confirmation message, and the standby server determines that the main cooperative server is in an offline state when the response message returned by the main cooperative server is not received, and then switches to the working state. The main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server. Therefore, the standby server enters a working state when the main cooperative conversion server is offline, and can provide services instead of the main cooperative conversion server during the offline period of the main cooperative conversion server, so that the problem of service interruption caused by the fact that the main cooperative conversion server enters an offline state due to faults is solved.
Fig. 8 is a flowchart of steps of another server switching method provided in an embodiment of the present invention, where the method is applied to a system including a standby server and a primary collaboration server in a video network, as shown in fig. 8, the method includes:
step 801, the standby server sends an online confirmation message to the main transfer server.
Specifically, the implementation manner of this step may refer to step 501, which is not described herein again in this embodiment of the present invention.
And step 802, the main coordination and transformation server receives an online confirmation message sent by the standby server.
Specifically, the implementation manner of this step may refer to step 601, which is not described herein again in this embodiment of the present invention.
Step 803, if the primary cooperative forwarding server is in a working state, the primary cooperative forwarding server returns a response message to the standby server.
Specifically, the implementation manner of this step may refer to step 602, which is not described herein again in this embodiment of the present invention.
Step 804, the standby server determines that the main cooperative server is in an offline state when not receiving the response message returned by the main cooperative server.
Specifically, the implementation manner of this step may refer to step 502 described above, and details of the embodiment of the present invention are not described herein.
Step 805, the standby server is switched to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
Specifically, the implementation manner of this step may refer to step 503, which is not described herein again in this embodiment of the present invention.
In summary, in another server switching method provided in the embodiments of the present invention, the standby server sends an online confirmation message to the main coordination server, the main coordination server returns a response message for the received online confirmation message, and the standby server determines that the main coordination server is in an offline state when the standby server does not receive the response message returned by the main coordination server, and then switches to the working state. The main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server. Therefore, the standby server enters a working state when the main cooperative conversion server is offline, and can provide services instead of the main cooperative conversion server during the offline period of the main cooperative conversion server, so that the problem of service interruption caused by the fact that the main cooperative conversion server enters an offline state due to faults is solved.
Fig. 9 is a block diagram of a server switching apparatus, where the apparatus 90 is applied to a standby server in a video network, and as shown in fig. 9, the apparatus 90 includes:
a first sending module 901, configured to send an online acknowledgement message to a master assisted forwarding server;
a first determining module 902, configured to determine that the master cooperative server is in an offline state when a response message returned by the master cooperative server is not received;
a first switching module 903 for switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
Optionally, the first determining module 902 is configured to:
continuously sending heartbeat confirmation messages to the main coordination and transformation server at preset time intervals;
if no response message returned by the main cooperative transmission server to the N heartbeat confirmation messages is received, confirming that the main cooperative transmission server is in an off-line state; and the response messages returned for the N heartbeat confirmation messages are continuously sent by the main protocol conversion server, wherein N is an integer not less than 2.
Optionally, the apparatus 90 further comprises:
the first obtaining module is used for obtaining the data stored on the main cooperative server when the times of receiving the response message reach a first preset time;
and the first updating module is used for carrying out synchronous updating operation on the data stored in the standby server based on the data stored in the main cooperative conversion server so as to ensure that the data stored in the standby server is consistent with the data stored in the main cooperative conversion server.
Optionally, the apparatus 90 further comprises:
the second obtaining module is used for obtaining the program version number of the main cooperative server when the number of times of executing the synchronous updating operation reaches a second preset number of times;
the second sending module is used for sending a program upgrading instruction to the main corotation server if the program version number of the main corotation server is inconsistent with the degree version number of the standby server; the program upgrading instruction is used for indicating the main transfer server to send an installation package of a currently configured program to the standby server;
the first receiving module is used for receiving the installation package sent by the main transfer server;
and the upgrading module is used for upgrading the version of the program configured on the standby server based on the installation package.
Optionally, the apparatus 90 further comprises:
the third sending module is used for sending fault reminding information to a user to remind the user to maintain the main cooperative server so as to enable the main cooperative server to enter an online state;
the fault reminding information is used for indicating that the main cooperative server fails.
In summary, the server switching apparatus provided in the embodiments of the present invention may send an online confirmation message to the master cooperative server, determine that the master cooperative server is in an offline state when a response message returned by the master cooperative server is not received, and then switch to an operating state. The main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server. Therefore, the standby server enters a working state when the main cooperative conversion server is offline, and can provide services instead of the main cooperative conversion server during the offline period of the main cooperative conversion server, so that the problem of service interruption caused by the fact that the main cooperative conversion server enters an offline state due to faults is solved.
Fig. 10 is a block diagram of another server switching apparatus provided in an embodiment of the present invention, where the apparatus 100 is applied to a master collaboration server in a video network, and as shown in fig. 10, the apparatus 100 includes:
a second receiving module 1001, configured to receive an online confirmation message sent by the standby server;
a first returning module 1002, configured to return a response message to the standby server if the main cooperative rotation server is in a working state, so that the standby server confirms that the main cooperative rotation server is in an offline state and switches to the working state when the standby server does not receive the response message;
the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server.
Optionally, the second receiving module 1001 is configured to:
receiving heartbeat confirmation messages continuously sent to the main coordinating and rotating server by the standby server at preset time intervals;
accordingly, the first returning module 1002 is configured to:
and respectively returning an acknowledgement message for each heartbeat acknowledgement message which is continuously sent.
Optionally, the standby server is further configured to send a fault notification message to a user after confirming that the main cooperative server is in an offline state, so as to notify the user to maintain the main cooperative server, so that the main cooperative server enters an online state;
accordingly, the apparatus 100 further comprises:
the third acquisition module is used for acquiring the data stored on the standby server after the main cooperative server enters an online state;
the second updating module is used for carrying out synchronous updating operation on the data stored in the main coordinating and rotating server based on the data stored in the standby server;
a fourth sending module, configured to send a standby instruction to the standby server after the synchronous update operation is completed; the standby instruction is used for indicating the standby server to be switched from a working state to a standby state;
and the second switching module is used for switching to a working state after the standby server enters a standby state.
In summary, another server switching apparatus provided in the embodiments of the present invention may receive an online confirmation message sent by a standby server, and if the main coordination server is in an operating state, return a response message to the standby server, so that the standby server confirms that the main coordination server is in an offline state when the response message is not received, and switch to the operating state, where a main message number, stored data, and a configured program of the standby server are the same as those of the main coordination server. Therefore, the main cooperation server provides a basis for confirming whether the standby server is in the offline state or not by sending the response message, so that the standby server can timely enter the working state when the main cooperation server is in the offline state, the service is provided by replacing the main cooperation server during the offline state of the main cooperation server, and the problem of service interruption caused by the fact that the main cooperation server enters the offline state due to faults is solved.
Fig. 11 is a block diagram of a server switching system provided by an embodiment of the present invention, where the system 110 is applied in a video network, and as shown in fig. 11, the system 110 includes a standby server 1101 and a main collaboration server 1102;
the standby server 1101 is configured to send an online acknowledgement message to the primary coordination server 1102;
the primary coordination server 1102 is configured to receive an online confirmation message sent by the standby server 1101;
if the primary coordination server 1102 is in a working state, the primary coordination server 1102 is configured to return a response message to the standby server 1101;
the standby server 1101 is configured to determine that the master cooperative server 1102 is in an offline state when a response message returned by the master cooperative server 1102 is not received;
the standby server 1101 is configured to switch to a working state; the primary message number, stored data, and configured program of the backup server 1101 are the same as the primary message number, stored data, and configured program of the primary collaboration server 1102.
In summary, in the server switching system provided in the embodiments of the present invention, the standby server sends the online confirmation message to the main coordination server, the main coordination server returns the response message for the received online confirmation message, and the standby server determines that the main coordination server is in the offline state when the standby server does not receive the response message returned by the main coordination server, and then switches to the working state. The main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server. Therefore, the standby server enters the working state when the main cooperative rotation server is offline, and can provide services instead of the main cooperative rotation server during the offline period of the main cooperative rotation server, so that the problem of service interruption caused by the fact that the main cooperative rotation server enters the offline state due to failure is solved.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The 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 embodiment of the server switching method, 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 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 will be appreciated by one of skill in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The server switching method, device, system and readable storage medium provided by the present invention are introduced in detail above, and a specific example is applied in the present document to explain the principle and the implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (17)

1. A server switching method is applied to a standby server in a video network, and comprises the following steps:
sending an online confirmation message to the main coordination server;
under the condition that a response message returned by the main cooperative conversion server is not received, determining that the main cooperative conversion server is in an off-line state;
switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server;
when the number of times of executing synchronous updating operation reaches a second preset number of times, acquiring a program version number of the main corotation server;
if the program version number of the main cooperative conversion server is not consistent with the degree version number of the standby server, a program upgrading instruction is sent to the main cooperative conversion server; the program upgrading instruction is used for indicating the main coordination server to send the installation package of the currently configured program to the standby server;
receiving the installation package sent by the main cooperative conversion server;
and updating the version of the program configured on the standby server based on the installation package.
2. The method according to claim 1, wherein the determining that the master collaboration server is in an offline state in a case where a response message returned by the master collaboration server is not received comprises:
continuously sending heartbeat confirmation messages to the main corotation server at preset time intervals;
if the response message returned by the main cooperative transmission server to the N heartbeat confirmation messages is not received, confirming that the main cooperative transmission server is in an off-line state; and the response messages returned for the N heartbeat confirmation messages are continuously sent by the main protocol conversion server, wherein N is an integer not less than 2.
3. The method of claim 2, further comprising:
when the number of times of receiving the response message reaches a first preset number of times, acquiring data stored on the main cooperative conversion server;
and carrying out synchronous updating operation on the data stored in the standby server based on the data stored in the main cooperative conversion server so as to enable the data stored in the standby server to be consistent with the data stored in the main cooperative conversion server.
4. The method of claim 1, further comprising:
sending fault reminding information to a user to remind the user to maintain the main cooperative server so that the main cooperative server enters an online state;
the fault reminding information is used for indicating that the main cooperative server fails.
5. A server switching method is applied to a main protocol conversion server in a video network, and comprises the following steps:
receiving an online confirmation message sent by a standby server;
if the main cooperative rotation server is in a working state, returning a response message to the standby server so as to confirm that the main cooperative rotation server is in an off-line state and switch to the working state under the condition that the standby server does not receive the response message;
the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server;
when the number of times of executing synchronous updating operation reaches a second preset number, sending a program version number of a main cooperative rotation server to a standby server so that the standby server sends a program upgrading instruction to the main cooperative rotation server if the program version number of the main cooperative rotation server is judged to be inconsistent with the degree version number of the standby server;
and sending an installation package of the currently configured program to the standby server according to the program upgrading instruction, so that the standby server performs version upgrading on the program configured on the standby server based on the installation package.
6. The method of claim 5, wherein receiving the online confirmation message sent by the standby server comprises:
receiving heartbeat confirmation messages continuously sent to the main coordination and rotation server by the standby server at preset time intervals;
accordingly, the returning a response message to the standby server includes:
and returning an acknowledgement message respectively for each heartbeat acknowledgement message which is continuously sent.
7. The method of claim 5, wherein the backup server is further configured to send a fault notification message to a user after confirming that the main transfer server is in an offline state, so as to remind the user to perform maintenance on the main transfer server, so that the main transfer server enters an online state;
correspondingly, the method further comprises:
after the main cooperative conversion server enters an online state, acquiring data stored on the standby server;
based on the data stored in the standby server, performing synchronous updating operation on the data stored in the main cooperative conversion server;
after the synchronous updating operation is completed, sending a standby instruction to the standby server; the standby instruction is used for indicating the standby server to be switched from a working state to a standby state;
and after the standby server enters the standby state, switching to the working state.
8. A server switching method is applied to a video network, and the method is applied to a system comprising a standby server and a main cooperative conversion server in the video network, and the method comprises the following steps:
the standby server sends an online confirmation message to the main cooperative conversion server;
the main coordination transfer server receives an online confirmation message sent by the standby server;
if the main cooperative conversion server is in a working state, the main cooperative conversion server returns a response message to the standby server;
the standby server determines that the main cooperative conversion server is in an off-line state when not receiving a response message returned by the main cooperative conversion server;
the standby server is switched to a working state;
the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server;
when the number of times of executing synchronous updating operation reaches a second preset number of times, the standby server acquires the program version number of the main corotation server;
if the program version number of the main cooperative rotation server is not consistent with the degree version number of the standby server, the standby server sends a program upgrading instruction to the main cooperative rotation server; the program upgrading instruction is used for indicating the main transfer server to send an installation package of a currently configured program to the standby server;
the standby server receives the installation package sent by the main cooperative conversion server;
and based on the installation package, the standby server carries out version upgrading on the program configured on the standby server.
9. A server switching apparatus, applied to a standby server in a video network, the apparatus comprising:
the first sending module is used for sending an online confirmation message to the main coordination and conversion server;
the first determining module is used for determining that the master cooperative server is in an off-line state under the condition that a response message returned by the master cooperative server is not received;
the first switching module is used for switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server;
the second obtaining module is used for obtaining the program version number of the main corotation server when the number of times of executing the synchronous updating operation reaches a second preset number of times;
the second sending module is used for sending a program upgrading instruction to the main corotation server if the program version number of the main corotation server is inconsistent with the degree version number of the standby server; the program upgrading instruction is used for indicating the main coordination server to send the installation package of the currently configured program to the standby server;
the first receiving module is used for receiving the installation package sent by the main coordination server;
and the upgrading module is used for upgrading the version of the program configured on the standby server based on the installation package.
10. The apparatus of claim 9, wherein the first determining module is configured to:
continuously sending heartbeat confirmation messages to the main coordination and transformation server at preset time intervals;
if the response message returned by the main cooperative transmission server to the N heartbeat confirmation messages is not received, confirming that the main cooperative transmission server is in an off-line state; and the response messages returned for the N heartbeat confirmation messages are continuously sent by the main protocol conversion server, wherein N is an integer not less than 2.
11. The apparatus of claim 10, further comprising:
the first obtaining module is used for obtaining the data stored on the main cooperative server when the times of receiving the response message reach a first preset time;
and the first updating module is used for carrying out synchronous updating operation on the data stored in the standby server based on the data stored in the main cooperative conversion server so as to enable the data stored in the standby server to be consistent with the data stored in the main cooperative conversion server.
12. The apparatus of claim 9, further comprising:
the third sending module is used for sending fault reminding information to a user to remind the user to maintain the main cooperative server so as to enable the main cooperative server to enter an online state;
the fault reminding information is used for indicating that the main cooperative server fails.
13. A server switching apparatus, applied to a master collaboration server in a video network, the apparatus comprising:
the second receiving module is used for receiving the online confirmation message sent by the standby server;
the first returning module is used for returning a response message to the standby server if the main cooperative conversion server is in a working state, so that the standby server confirms that the main cooperative conversion server is in an offline state under the condition that the response message is not received and switches to the working state;
the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server;
when the number of times of executing synchronous updating operation reaches a second preset number of times, sending a program version number of a main cooperative rotation server to a standby server so that the standby server sends a program upgrading instruction to the main cooperative rotation server if judging that the program version number of the main cooperative rotation server is inconsistent with the degree version number of the standby server;
and sending an installation package of the currently configured program to the standby server according to the program upgrading instruction, so that the standby server performs version upgrading on the program configured on the standby server based on the installation package.
14. The apparatus of claim 13, wherein the second receiving module is configured to:
receiving heartbeat confirmation messages continuously sent to the main coordinating and rotating server by the standby server at preset time intervals;
accordingly, the first return module is configured to:
and respectively returning an acknowledgement message for each heartbeat acknowledgement message which is continuously sent.
15. The apparatus of claim 13, wherein the backup server is further configured to send a failure notification message to a user after confirming that the main transfer server is in an offline state, so as to remind the user to perform maintenance on the main transfer server, so that the main transfer server enters an online state;
correspondingly, the device further comprises:
the third acquisition module is used for acquiring the data stored on the standby server after the main cooperative server enters an online state;
the second updating module is used for carrying out synchronous updating operation on the data stored in the main coordination server based on the data stored in the standby server;
the fourth sending module is used for sending a standby instruction to the standby server after the synchronous updating operation is finished; the standby instruction is used for indicating the standby server to be switched from a working state to a standby state;
and the second switching module is used for switching to a working state after the standby server enters a standby state.
16. A server switching system is characterized in that the system is applied to a video network and comprises a standby server and a main cooperative server;
the standby server is used for sending an online confirmation message to the main cooperative conversion server;
the main coordination server is used for receiving an online confirmation message sent by the standby server;
if the main cooperative conversion server is in a working state, the main cooperative conversion server is used for returning a response message to the standby server;
the standby server is used for determining that the main cooperative conversion server is in an off-line state when a response message returned by the main cooperative conversion server is not received;
the standby server is used for switching to a working state; the main message number, the stored data and the configured program of the standby server are the same as those of the main cooperation server;
when the number of times of executing the synchronous updating operation reaches a second preset number of times, the standby server is used for acquiring the program version number of the main cooperative conversion server;
if the program version number of the main transfer server is not consistent with the degree version number of the standby server, the standby server is used for sending a program upgrading instruction to the main transfer server; the program upgrading instruction is used for indicating the main transfer server to send an installation package of a currently configured program to the standby server;
the standby server is used for receiving the installation package sent by the main cooperative conversion server;
and the standby server is used for upgrading the version of the program configured on the standby server based on the installation package.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the server switching method according to any one of claims 1 to 8.
CN201910177275.5A 2019-03-08 2019-03-08 Server switching method, device and system and readable storage medium Active CN110022228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910177275.5A CN110022228B (en) 2019-03-08 2019-03-08 Server switching method, device and system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910177275.5A CN110022228B (en) 2019-03-08 2019-03-08 Server switching method, device and system and readable storage medium

Publications (2)

Publication Number Publication Date
CN110022228A CN110022228A (en) 2019-07-16
CN110022228B true CN110022228B (en) 2022-11-04

Family

ID=67189421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910177275.5A Active CN110022228B (en) 2019-03-08 2019-03-08 Server switching method, device and system and readable storage medium

Country Status (1)

Country Link
CN (1) CN110022228B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110690990B (en) * 2019-09-02 2022-06-21 视联动力信息技术股份有限公司 Server upgrading method and device, electronic equipment and storage medium
CN110971479B (en) * 2019-10-08 2022-03-25 视联动力信息技术股份有限公司 Server detection method, device and system based on video network
CN111064618B (en) * 2019-12-20 2023-02-03 北京华胜天成科技股份有限公司 Method, device, equipment and storage medium for realizing high availability of server
CN111200521B (en) * 2019-12-27 2023-10-13 视联动力信息技术股份有限公司 Video networking service recovery method, server, electronic equipment and storage medium
CN111209059B (en) * 2020-01-14 2023-03-03 中国北方车辆研究所 Embedded software multi-version control system and method
CN111885103A (en) * 2020-06-12 2020-11-03 视联动力信息技术股份有限公司 Resource processing method, server, electronic device, and storage medium
CN111800476A (en) * 2020-06-14 2020-10-20 洪江川 Data processing method based on big data and cloud computing and cloud big data server
CN112911335B (en) * 2021-02-03 2022-05-27 烽火通信科技股份有限公司 Service scheduling method based on video coding, video server and set top box
CN116170286B (en) * 2023-04-25 2023-09-15 陕西盛禾汇达网络科技有限公司 Block chain-based network security server and control system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965369A (en) * 2017-11-22 2018-12-07 北京视联动力国际信息技术有限公司 A kind of method for pushing and system of server state

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158693B (en) * 2014-08-27 2018-04-13 乐视网信息技术(北京)股份有限公司 The disaster-tolerant backup method and system of data service
CN105471622B (en) * 2015-11-12 2019-03-01 武汉噢易云计算股份有限公司 A kind of high availability method and system of the control node active-standby switch based on Galera
CN105553701A (en) * 2015-12-11 2016-05-04 国网青海省电力公司 Distribution network adjustment and control system and control method thereof
US10552271B2 (en) * 2017-07-31 2020-02-04 International Business Machines Corporation Switching servers without interrupting a client command-response queue
CN108566312A (en) * 2017-12-29 2018-09-21 美的集团股份有限公司 Off-line checking method, device and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965369A (en) * 2017-11-22 2018-12-07 北京视联动力国际信息技术有限公司 A kind of method for pushing and system of server state

Also Published As

Publication number Publication date
CN110022228A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110022228B (en) Server switching method, device and system and readable storage medium
CN108880851B (en) Configuration updating method and interaction system
CN109561072B (en) Link detection method and system
CN108881895B (en) Troubleshooting method and equipment based on video networking
CN109729388B (en) Method and device for switching video networking servers
CN110557319B (en) Message processing method and device based on video network
CN110166363B (en) Multicast link monitoring method and device
CN110445639B (en) Hot standby method and device for server
CN110336710B (en) Terminal testing method, system and device and storage medium
CN110690989A (en) Service data transmission method, device and computer readable storage medium
CN110830817A (en) Video transcoding capacity adjusting method and video transcoding server
CN110650169A (en) Terminal equipment upgrading method and device
CN110445701B (en) Business object processing method and device and storage medium
CN110719433B (en) Method and device for displaying online state of terminal, electronic equipment and storage medium
CN110493319B (en) Data synchronization method, system and device
CN110519335B (en) Data link removing method and system based on video network
CN110120937B (en) Resource acquisition method, system, device and computer readable storage medium
CN110808896B (en) Data transmission method and device, electronic equipment and storage medium
CN110099307B (en) Node connection method, video network and computer readable storage medium
CN110224853B (en) Control system
CN110365930B (en) Data processing method and device
CN112511787A (en) Conference implementation method, device, equipment and readable storage medium
CN110113553B (en) Method and device for processing video telephone
CN110475160B (en) Method and device for transmitting video data across video network
CN111225241A (en) Communication method and device

Legal Events

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