CN110022228A - Server switching method, device, system and readable storage medium storing program for executing - Google Patents

Server switching method, device, system and readable storage medium storing program for executing Download PDF

Info

Publication number
CN110022228A
CN110022228A CN201910177275.5A CN201910177275A CN110022228A CN 110022228 A CN110022228 A CN 110022228A CN 201910177275 A CN201910177275 A CN 201910177275A CN 110022228 A CN110022228 A CN 110022228A
Authority
CN
China
Prior art keywords
server
main
main association
standby
turn
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.)
Granted
Application number
CN201910177275.5A
Other languages
Chinese (zh)
Other versions
CN110022228B (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a kind of server switching method, device, system and readable storage medium storing program for executing, it is related to regarding networking technology field.Standby server can turn server and be sent in line justification message to main association in this method, and in the case where not receiving main association and turning the response message of server return, determining that the main association turns server is that off-line state then can switch to working condition.Wherein, it is identical with main association to turn the main message number, the data of storage and the program of configuration of server for the main message number, the data of storage of the standby server and the program of configuration.In this way, standby server by it is main association turn servers off-line when, into working condition, it can be during main association turns servers off-line, turn server providing services instead of main association, and then main association is avoided to turn server since failure enters off-line state, the problem of caused service disruption.

Description

Server switching method, device, system and readable storage medium storing program for executing
Technical field
The present invention relates to view networking technology fields, more particularly to a kind of server switching method, device, system and readable Storage medium.
Background technique
It is more and more depending on the video in networking with the continuous development of view networking technology, in order to guarantee the safety of data, It is generally necessary to be saved to data.
It in the prior art, is usually to store data in main association to turn in server, for example, the prison that monitor terminal will acquire Video is controlled, stores to main association and turns in server, in this way, terminal, which can turn server with the main association, carries out data interaction.But it is main Association, which turns server, to break down, into off-line state, in this way, main association turns server and can not just be handed over other terminals Mutually, and then lead to service disruption.
Summary of the invention
In view of the above problems, it proposes the embodiment of the present invention and overcomes the above problem or at least partly in order to provide one kind A kind of server switching method, device, system and the readable storage medium storing program for executing to solve the above problems.
To solve the above-mentioned problems, the embodiment of the invention discloses a kind of server switching method, this method is applied to view Standby server in networking, this method comprises:
Turn server to main association and is sent in line justification message;
Do not receive it is described it is main association turn server return response message in the case where, determine it is described it is main association turn server For off-line state;
Switch to working condition;Main message number, the data of storage and the program of configuration of the standby server with it is described It is main to assist the main message number, the data of storage and the program of configuration that turn server identical.
Optionally, it is described do not receive it is described it is main association turn server return response message in the case where, determine described in It is off-line state that main association, which turns server, comprising:
Turn server to the main association with prefixed time interval and continuously transmits heartbeat acknowledgment messages;
If not receiving main assist turns the response message that server returns to N number of heartbeat acknowledgment messages, described in confirmation It is off-line state that main association, which turns server,;The response message returned to N number of heartbeat acknowledgment messages is that the main association turns server It continuously transmits, the N is the integer not less than 2.
Optionally, the method also includes:
When the number for receiving the response message reaches the first preset times, obtains the main association and turn to deposit on server The data of storage;
Turn the data stored on server based on the main association, the data stored on the standby server are synchronized Operation is updated, so that the data stored on the standby server turn the consistent of the data stored on server with the main association.
Optionally, the method also includes:
When the number for executing the synchronized update operation reaches the second preset times, obtains the main association and turn server Program version number;
If it is described it is main assist turn server program version number and the degree version number of the standby server it is inconsistent, to The main association turns server and sends program upgrade command;Described program upgrade command is used to indicate the main association and turns server and will work as The installation kit of the program of preceding configuration is sent to the standby server;
Receive the installation kit that the main association turns server transmission;
Based on the installation kit, edition upgrading is carried out to the program configured on the standby server.
Optionally, the method also includes:
Failure prompting message is sent to user, is repaired with reminding the user to turn server to the main association, so that The main association turns server and enters presence;
Wherein, the failure prompting message be used to indicate it is described it is main association turn server failure.
To solve the above-mentioned problems, the embodiment of the invention also discloses a kind of server switching method, this method is applied to Turn server depending on the main association in networking, this method comprises:
Receive the online confirmation message that standby server is sent;
If to turn server in running order for the main association, to the standby server returning response message, in order to For the standby server in the case where not receiving the response message, confirming that the main association turns server is off-line state, And switch to working condition;
Main message number, the data of storage and the program of configuration of the standby server and the main association turn the master of server The program of message number, the data of storage and configuration is identical.
Optionally, the online confirmation message for receiving standby server and sending, comprising:
It receives the standby server and the heartbeat confirmation that server continuously transmits is turned to the main association with prefixed time interval Message;
It is correspondingly, described to the standby server returning response message, comprising:
For each heartbeat acknowledgment messages continuously transmitted, a confirmation message is returned respectively.
Optionally, the standby server is also used to confirming that the main association turns server be Xiang Yong after off-line state Family sends failure prompting message, is repaired with reminding the user to turn server to the main association, so that the main association turns clothes Business device enters presence;
Correspondingly, the method also includes:
Turn to obtain the data stored on the standby server after server enters presence in the main association;
Based on the data stored on the standby server, the data for turning to store on server to the main association are synchronized Update operation;
After completing the synchronized update operation, Xiang Suoshu standby server sends standby command;The standby command It is used to indicate the standby server and standby mode is switched to by working condition;
After the standby server enters standby mode, working condition is switched to.
To solve the above-mentioned problems, the embodiment of the invention also discloses a kind of server switching method, this method is applied to System depending on turning server in networking including standby server and main association, this method comprises:
The standby server turns server to the main association and is sent in line justification message;
The main association turns server and receives the online confirmation message that standby server is sent;
If it is in running order that the main association turns server, the main association turns server and returns to the standby server Response message;
The standby server turns the response message of server return not receiving the main association, determines that the main association turns Server is off-line state;
The standby server switches to working condition;
Wherein, the main message number, the data of storage of the standby server and the program of configuration and the main association turn service The main message number of device, the data of storage and the program of configuration are identical.
To solve the above-mentioned problems, the embodiment of the invention also discloses a kind of server switching device, which is applied to Turn server depending on the main association in networking, which includes:
First sending module is sent in line justification message for turning server to main association;
First determining module, for do not receive it is described it is main association turn server return response message in the case where, really It is off-line state that the fixed main association, which turns server,;
First switching module, for switching to working condition;The main message number of the standby server, the data of storage and To turn the main message number, the data of storage and the program of configuration of server identical with the main association for the program of configuration.
Optionally, first determining module, is used for:
Turn server to the main association with prefixed time interval and continuously transmits heartbeat acknowledgment messages;
If not receiving main assist turns the response message that server returns to N number of heartbeat acknowledgment messages, described in confirmation It is off-line state that main association, which turns server,;The response message returned to N number of heartbeat acknowledgment messages is that the main association turns server It continuously transmits, the N is the integer not less than 2.
Optionally, described device further include:
First obtains module, when for reaching the first preset times in the number for receiving the response message, obtains institute It states main association and turns the data stored on server;
First update module, for turning the data stored on server based on the main association, on the standby server The data of storage synchronize update operation, so that the data stored on the standby server and the main association turn on server The data of storage it is consistent.
Optionally, described device further include:
Second obtains module, when for reaching the second preset times in the number for executing the synchronized update operation, obtains The main association turns the program version number of server;
Second sending module, if turning the degree of the program version number and the standby server of server for the main association Version number is inconsistent, then turns server to the main association and send program upgrade command;Described program upgrade command is used to indicate institute It states main association and turns server for the installation kit of the program of current-configuration, be sent to the standby server;
First receiving module turns the installation kit of server transmission for receiving the main association;
Upgraded module carries out edition upgrading to the program configured on the standby server for being based on the installation kit.
Optionally, described device further include:
Third sending module, for sending failure prompting message to user, to remind the user to turn clothes to the main association Business device repairs, so that the main association turns server and enters presence;
Wherein, the failure prompting message be used to indicate it is described it is main association turn server failure.
To solve the above-mentioned problems, the embodiment of the invention also discloses a kind of server switching device, which is applied to Turn server depending on the main association in networking, which includes:
Second receiving module, for receiving the online confirmation message of standby server transmission;
First return module is returned if it is in running order to turn server for the main association to the standby server Response message is returned, in order to which the standby server is not in the case where receiving the response message, confirms that the main association turns Server is off-line state, and switches to working condition;
Main message number, the data of storage and the program of configuration of the standby server and the main association turn the master of server The program of message number, the data of storage and configuration is identical.
Optionally, second receiving module, is used for:
It receives the standby server and the heartbeat confirmation that server continuously transmits is turned to the main association with prefixed time interval Message;
Correspondingly, first return module, is used for:
For each heartbeat acknowledgment messages continuously transmitted, a confirmation message is returned respectively.
Optionally, the standby server is also used to confirming that the main association turns server be Xiang Yong after off-line state Family sends failure prompting message, is repaired with reminding the user to turn server to the main association, so that the main association turns clothes Business device enters presence;
Correspondingly, described device further include:
Third obtains module, obtains the active service after server enters presence for turning in the main association The data stored on device;
Second update module, for turning on server to the main association based on the data stored on the standby server The data of storage synchronize update operation;
4th sending module, for after completing the synchronized update operation, Xiang Suoshu standby server to send standby Instruction;The standby command is used to indicate the standby server and switches to standby mode by working condition;
Second switching module, for switching to working condition after the standby server enters standby mode.
To solve the above-mentioned problems, the embodiment of the invention also discloses a kind of server switching system, which is applied to Depending in networking, which includes that standby server and main association turn server;
The standby server is sent in line justification message for turning server to the main association;
The main association turns server, for receiving the online confirmation message of standby server transmission;
If it is in running order that the main association turns server, the main association turns server, is used for the active service Device returning response message;
The standby server, for do not receive it is described it is main association turn server return response message, determine described in It is off-line state that main association, which turns server,;
The standby server, for switching to working condition;Main message number, the data of storage of the standby server And the program of configuration main assists that turn the main message number, the data of storage and the program of configuration of server identical with described
To solve the above-mentioned problems, the embodiment of the invention discloses computer readable storage mediums, described computer-readable Computer program is stored on storage medium, and such as above-mentioned server switching method is realized when the computer program is executed by processor The step of.
The embodiment of the present invention includes following advantages:
Standby server can turn server to main association and be sent in line justification message, turn server return not receiving main association Response message in the case where, determine this it is main association turn server be off-line state then can switch to working condition.Wherein, should Main message number, the data of storage and the program of configuration of standby server and the main number for assisting the main message number, storage that turn server According to and configuration program it is identical.It, can be with into working condition in this way, standby server is by when main association turns servers off-line During main association turns servers off-line, turn server providing services instead of main association, and then main association is avoided to turn server due to failure Into off-line state, the problem of caused service disruption.
Detailed description of the invention
Fig. 1 is a kind of networking schematic diagram of view networking of the invention;
Fig. 2 is a kind of hardware structural diagram of node server of the invention;
Fig. 3 is a kind of hardware structural diagram of access switch of the invention;
Fig. 4 is the hardware structural diagram that a kind of Ethernet association of the invention turns gateway;
Fig. 5 is a kind of step flow chart of server switching method provided in an embodiment of the present invention;
Fig. 6 is the step flow chart of another server switching method provided in an embodiment of the present invention;
Fig. 7 is the interaction diagrams of another server switching method provided in an embodiment of the present invention;
Fig. 8 is the step flow chart of another server switching method provided in an embodiment of the present invention;
Fig. 9 is a kind of block diagram of server switching device provided in an embodiment of the present invention;
Figure 10 is the block diagram of another server switching device provided in an embodiment of the present invention;
Figure 11 is a kind of block diagram of server switching system provided in an embodiment of the present invention.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
It is the important milestone of network Development depending on networking, is a real-time network, can be realized HD video real-time Transmission, Push numerous Internet applications to HD video, high definition is face-to-face.
Real-time high-definition video switching technology is used depending on networking, it can be such as high in a network platform by required service Clear video conference, Intellectualized monitoring analysis, emergency command, digital broadcast television, delay TV, the Web-based instruction, shows video monitoring Field live streaming, VOD program request, TV Mail, individual character records (PVR), Intranet (manages) channel by oneself, intelligent video Broadcast Control, information publication All be incorporated into a system platform etc. services such as tens of kinds of videos, voice, picture, text, communication, data, by TV or Computer realizes that high-definition quality video plays.
Embodiment in order to enable those skilled in the art to better understand the present invention is introduced to depending on networking below:
Depending on networking, applied portion of techniques is as described below:
Network technology (Network Technology)
Traditional ethernet (Ethernet) is improved depending on the network technology innovation networked, with potential huge on network Video flow.(Circuit is exchanged different from simple network packet packet switch (Packet Switching) or lattice network Switching), Streaming demand is met using Packet Switching depending on networking technology.Has grouping depending on networking technology Flexible, the simple and low price of exchange, is provided simultaneously with the quality and safety assurance of circuit switching, it is virtually electric to realize the whole network switch type The seamless connection of road and data format.
Switching technology (Switching Technology)
Two advantages of asynchronous and packet switch that Ethernet is used depending on networking eliminate Ethernet under the premise of complete compatible and lack It falls into, has the end-to-end seamless connection of the whole network, direct user terminal, directly carrying IP data packet.User data is in network-wide basis It is not required to any format conversion.It is the more advanced form of Ethernet depending on networking, is a real-time exchange platform, can be realized at present mutually The whole network large-scale high-definition realtime video transmission that networking cannot achieve pushes numerous network video applications to high Qinghua, unitizes.
Server technology (Server Technology)
It is different from traditional server, its Streaming Media depending on the server technology in networking and unified video platform Transmission be built upon it is connection-oriented on the basis of, data-handling capacity is unrelated with flow, communication time, single network layer energy Enough transmitted comprising signaling and data.For voice and video business, handled depending on networking and unified video platform Streaming Media Complexity many simpler than data processing, efficiency substantially increase hundred times or more than traditional server.
Reservoir technology (Storage Technology)
The ultrahigh speed reservoir technology of unified video platform in order to adapt to the media content of vast capacity and super-flow and Using state-of-the-art real time operating system, the programme information in server instruction is mapped to specific hard drive space, media Content is no longer pass through server, and moment is directly delivered to user terminal, and user waits typical time less than 0.2 second.It optimizes Sector distribution greatly reduces the mechanical movement of hard disc magnetic head tracking, and resource consumption only accounts for the 20% of the internet ad eundem IP, but The concurrent flow greater than 3 times of traditional disk array is generated, overall efficiency promotes 10 times or more.
Network security technology (Network Security Technology)
Depending on the structural design networked by servicing independent licence system, equipment and the modes such as user data is completely isolated every time The network security problem that puzzlement internet has thoroughly been eradicated from structure, does not need antivirus applet, firewall generally, has prevented black The attack of visitor and virus, structural carefree secure network is provided for user.
It services innovative technology (Service Innovation Technology)
Business and transmission are fused together by unified video platform, whether single user, private user or a net The sum total of network is all only primary automatic connection.User terminal, set-top box or PC are attached directly to unified video platform, obtain rich The multimedia video service of rich colorful various forms.Unified video platform is traditional to substitute with table schema using " menu type " Complicated applications programming, considerably less code, which can be used, can be realized complicated application, realize the new business innovation of " endless ".
Networking depending on networking is as described below:
It is a kind of central controlled network structure depending on networking, which can be Tree Network, Star network, ring network etc. class Type, but centralized control node is needed to control whole network in network on this basis.
Fig. 1 is a kind of networking schematic diagram of view networking of the invention, as shown in Figure 1, being divided into access net and metropolitan area depending on networking Net two parts.
The equipment of access mesh portions can be mainly divided into 3 classes: node server, access switch, terminal (including various machines Top box, encoding board, memory etc.).Node server is connected with access switch, and access switch can be with multiple terminal phases Even, and it can connect Ethernet.
Wherein, node server is the node that centralized control functions are played in access net, can control access switch and terminal. Node server can directly be connected with access switch, can also directly be connected with terminal.
Similar, the equipment of metropolitan area mesh portions can also be divided into 3 classes: metropolitan area server, node switch, node serve Device.Metropolitan area server is connected with node switch, and node switch can be connected with multiple node servers.
Wherein, node server is the node server for accessing mesh portions, i.e. node server had both belonged to access wet end Point, and belong to metropolitan area mesh portions.
Metropolitan area server is the node that centralized control functions are played in Metropolitan Area Network (MAN), can control node switch and node serve Device.Metropolitan area server can be directly connected to node switch, can also be directly connected to node server.
It can be seen that be entirely a kind of central controlled network structure of layering depending on networking network, and node server and metropolitan area The network controlled under server can be the various structures such as tree-shaped, star-like, cyclic annular.
Visually claim, access mesh portions can form unified video platform (part in virtual coil), and multiple unified videos are flat Platform can form view networking;Each unified video platform can be interconnected by metropolitan area and wide area depending on networking.
Classify depending on networked devices
1.1 embodiment of the present invention can be mainly divided into 3 classes: server depending on the equipment in networking, interchanger (including ether Net gateway), terminal (including various set-top boxes, encoding board, memory etc.).Depending on networking can be divided on the whole Metropolitan Area Network (MAN) (or National net, World Wide Web etc.) and access net.
1.2 equipment for wherein accessing mesh portions can be mainly divided into 3 classes: node server, access switch (including ether Net gateway), terminal (including various set-top boxes, encoding board, memory etc.).
The specific hardware structure of each access network equipment are as follows:
Node server:
Fig. 2 is a kind of hardware structural diagram of node server of the invention, as shown in Fig. 2, mainly connecing including network Mouth mold block 201, switching engine module 202, CPU module 203, disk array module 204;
Wherein, Network Interface Module 201, the Bao Jun that CPU module 203, disk array module 204 are come in enter switching engine Module 202;Switching engine module 202 look into the operation of address table 205 to the packet come in, to obtain the navigation information of packet; And the packet is stored according to the navigation information of packet the queue of corresponding pack buffer 206;If the queue of pack buffer 206 is close It is full, then it abandons;All pack buffer queues of 202 poll of switching engine mould, are forwarded: 1) port if meeting the following conditions It is less than to send caching;2) the queue package counting facility is greater than zero.Disk array module 204 mainly realizes the control to hard disk, including The operation such as initialization, read-write to hard disk;CPU module 203 is mainly responsible between access switch, terminal (not shown) Protocol processes, to address table 205 (including descending protocol packet address table, uplink protocol package address table, data packet addressed table) Configuration, and, the configuration to disk array module 204.
Access switch:
Fig. 3 is a kind of hardware structural diagram of access switch of the invention, as shown in figure 3, mainly connecing including network Mouth mold block (downstream network interface module 301, uplink network interface module 302), switching engine module 303 and CPU module 304;
Wherein, the packet (upstream data) that downstream network interface module 301 is come in enters packet detection module 305;Packet detection mould Whether mesh way address (DA), source address (SA), type of data packet and the packet length of the detection packet of block 305 meet the requirements, if met, It then distributes corresponding flow identifier (stream-id), and enters switching engine module 303, otherwise abandon;Uplink network interface mould The packet (downlink data) that block 302 is come in enters switching engine module 303;The data packet that CPU module 204 is come in enters switching engine Module 303;Switching engine module 303 look into the operation of address table 306 to the packet come in, to obtain the navigation information of packet; If the packet into switching engine module 303 is that downstream network interface is gone toward uplink network interface, in conjunction with flow identifier (stream-id) packet is stored in the queue of corresponding pack buffer 307;If the queue of the pack buffer 307 is close full, It abandons;If the packet into switching engine module 303 is not that downstream network interface is gone toward uplink network interface, according to packet Navigation information is stored in the data packet queue of corresponding pack buffer 307;If the queue of the pack buffer 307 is close full, Then abandon.
All pack buffer queues of 303 poll of switching engine module, are divided to two kinds of situations in embodiments of the present invention:
If the queue is that downstream network interface is gone toward uplink network interface, meets the following conditions and be forwarded: 1) It is less than that the port sends caching;2) the queue package counting facility is greater than zero;3) token that rate control module generates is obtained;
If the queue is not that downstream network interface is gone toward uplink network interface, meets the following conditions and is forwarded: 1) it is less than to send caching for the port;2) the queue package counting facility is greater than zero.
Rate control module 208 is configured by CPU module 204, to all downlink networks in programmable interval Interface generates token toward the pack buffer queue that uplink network interface is gone, to control the code rate of forwarded upstream.
CPU module 304 is mainly responsible for the protocol processes between node server, the configuration to address table 306, and, Configuration to rate control module 308.
Ethernet association turns gateway:
Fig. 4 is that a kind of Ethernet association of the invention turns the hardware structural diagram of gateway, as shown in figure 4, mainly including net Network interface module (downstream network interface module 401, uplink network interface module 402), switching engine module 403, CPU module 404, packet detection module 405, rate control module 408, address table 406, pack buffer 407 and MAC adding module 409, MAC are deleted Except module 410.
Wherein, the data packet that downstream network interface module 401 is come in enters packet detection module 405;Packet detection module 405 is examined Ethernet mac DA, ethernet mac SA, Ethernet length or frame type, the view networking mesh way address of measured data packet DA, whether meet the requirements depending on networking source address SA, depending on networking data Packet type and packet length, corresponding stream is distributed if meeting Identifier (stream-id);Then, MAC DA, MAC SA, length or frame type are subtracted by MAC removing module 410 (2byte), and enter corresponding receive and cache, otherwise abandon;
Downstream network interface module 401 detects the transmission caching of the port, according to the view of packet networking mesh if there is Bao Ze Address D A knows the ethernet mac DA of corresponding terminal, adds the ethernet mac DA of terminal, Ethernet assists the MAC for turning gateway SA, Ethernet length or frame type, and send.
The function that Ethernet association turns other modules in gateway is similar with access switch.
Terminal:
It mainly include Network Interface Module, Service Processing Module and CPU module;For example, set-top box mainly connects including network Mouth mold block, video/audio encoding and decoding engine modules, CPU module;Encoding board mainly includes Network Interface Module, video encoding engine Module, CPU module;Memory mainly includes Network Interface Module, CPU module and disk array module.
The equipment of 1.3 metropolitan area mesh portions can be mainly divided into 2 classes: node server, node switch, metropolitan area server. Wherein, node switch mainly includes Network Interface Module, switching engine module and CPU module;Metropolitan area server mainly includes Network Interface Module, switching engine module and CPU module are constituted.
2, networking data package definition is regarded
2.1 access network data package definitions
Access net data packet mainly include following sections: destination address (DA), source address (SA), reserve bytes, payload(PDU)、CRC。
As shown in the table, the data packet for accessing net mainly includes following sections:
DA SA Reserved Payload CRC
Wherein:
Destination address (DA) is made of 8 bytes (byte), and first character section indicates type (such as the various associations of data packet Discuss packet, multicast packet, unicast packet etc.), be up to 256 kinds of possibility, the second byte to the 6th byte is metropolitan area net address, Seven, the 8th bytes are access net address;
Source address (SA) is also to be made of 8 bytes (byte), is defined identical as destination address (DA);
Reserve bytes are made of 2 bytes;
The part payload has different length according to the type of different datagrams, is if it is various protocol packages 64 bytes are 32+1024=1056 bytes if it is single group unicast packets words, are not restricted to above 2 kinds certainly;
CRC is made of 4 bytes, and calculation method follows the Ethernet CRC algorithm of standard.
2.2 Metropolitan Area Network (MAN) packet definitions
The topology of Metropolitan Area Network (MAN) is pattern, may there is 2 kinds, connection even of more than two kinds, i.e. node switching between two equipment It can all can exceed that 2 kinds between machine and node server, node switch and node switch, node switch and node server Connection.But the metropolitan area net address of metropolitan area network equipment is uniquely, to close to accurately describe the connection between metropolitan area network equipment System, introduces parameter in embodiments of the present invention: label, uniquely to describe a metropolitan area network equipment.
(Multi-Protocol Label Switch, multiprotocol label are handed over by the definition of label and MPLS in this specification Change) label definition it is similar, it is assumed that between equipment A and equipment B there are two connection, then data packet from equipment A to equipment B just There are 2 labels, data packet also there are 2 labels from equipment B to equipment A.Label is divided into label, outgoing label, it is assumed that data packet enters The label (entering label) of equipment A is 0x0000, and the label (outgoing label) when this data packet leaves equipment A may reform into 0x0001.The networking process of Metropolitan Area Network (MAN) is to enter network process under centralized control, also means that address distribution, the label of Metropolitan Area Network (MAN) Distribution be all to be dominated by metropolitan area server, node switch, node server be all passively execute, this point with The label distribution of MPLS is different, and the distribution of the label of MPLS is the result that interchanger, server are negotiated mutually.
As shown in the table, the data packet of Metropolitan Area Network (MAN) mainly includes following sections:
DA SA Reserved Label Payload CRC
That is destination address (DA), source address (SA), reserve bytes (Reserved), label, payload (PDU), CRC.Its In, the format of label, which can refer to, such as gives a definition: label is 32bit, wherein high 16bit retains, only with low 16bit, its position Set is between the reserve bytes and payload of data packet.
Based on the above-mentioned characteristic of view networking, one of the core concepts of the embodiments of the present invention is proposed, is led to by standby server It crosses and turns server to main association and be sent in line justification message, detect main association and turn whether server is off-line state, if main association turns clothes Business device is off-line state, and standby server switches to working condition, turns server providing services to substitute the main association.
Fig. 5 is a kind of step flow chart of server switching method provided in an embodiment of the present invention, and this method is applied to view Standby server in networking, as shown in figure 5, this method comprises:
Step 501 turns server and is sent in line justification message to main association.
In the embodiment of the present invention, standby server, which can be, turns the server that server pre-establishes connection with main association, It is interacted in this way, standby server can turn server with main association in the next steps.Specifically, active service can be based on The Internet protocol address and port numbers that device and main association turn server are configured, and make to set up connection between the two.
It further, is it in order to when main association turns server fail, timely substitute main association to turn server His terminal provides service, and in the embodiment of the present invention, standby server can turn server to main association and be sent in line justification message, with Confirm that the main association turns whether server is off-line state.
Step 502, do not receive it is described it is main association turn server return response message in the case where, determine the main association Turning server is off-line state.
In the embodiment of the present invention, if main association turns server and is not on off-line state, standby server is being received After the online confirmation message sent, standby server returning response message will be given, correspondingly, if main association turns at server In off-line state, then main association turns server then without normal direction standby server returning response message, it is therefore, spare in this step Server can not receive it is main association turn server return response message in the case where, determine this it is main association turn server be from Linear state.
Step 503 switches to working condition;Main message number, the data of storage and the journey of configuration of the standby server To turn the main message number, the data of storage and the program of configuration of server identical with the main association for sequence.
In the embodiment of the present invention, if standby server determines that the main association turns server and is in off-line state, correspondingly, being The service that the main association of guarantee turns server offer is not interrupted, at this point, standby server can switch to working condition, that is, operation The program configured on the standby server, and then take over main association and turn server providing services.
Further, which is depending on being used to indicate which server is the message of terminal transmission will be sent in networking Mark, it is exemplary, it is assumed that terminal send message in include main message number be 001, then the message can be sent to master disappear The server that breath number is 001, it is assumed that the main message number for including in the message that terminal is sent is 002, then the message can be sent to The server that main message number is 002.It is identical with main association to turn the main message number of server accordingly, due to standby server, therefore, Turn server in main association and be in off-line state, when standby server is in running order, terminal is sent to main association and turns server Message can be sent directly to standby server, further, since the data of the two storage and the program of configuration are identical, Standby server can be realized the main association of substitution and turn server and interact with other terminals by switching to working condition, for it He provides service at terminal.
In conclusion a kind of server switching method provided in an embodiment of the present invention, standby server can turn clothes to main association Business device be sent in line justification message, do not receive it is main association turn server return response message in the case where, determine the main association Turning server is that off-line state then can switch to working condition.Wherein, the main message number of the standby server, storage number According to and the program of configuration assist that turn the main message number, the data of storage and the program of configuration of server identical with main.In this way, spare clothes Business device, can be during main association turns servers off-line, instead of main association into working condition by when main association turns servers off-line Turn server providing services, and then main association is avoided to turn server since failure enters off-line state, caused service disruption is asked Topic.
Fig. 6 is the step flow chart of another server switching method provided in an embodiment of the present invention, and this method is applied to Turn server depending on the main association in networking, as shown in fig. 6, this method comprises:
Step 601 receives the online confirmation message that standby server is sent.
In the embodiment of the present invention, main association turns server and can establish with standby server in advance to connect, in this way, spare clothes Business device can turn server to main association and be sent in line justification message.Correspondingly, main association, which turns server, can receive standby server The online confirmation message sent.Wherein, which can be used to confirm that the main association turns whether server is offline shape State.
If it is in running order that step 602, the main association turn server, disappear to the standby server returning response Breath confirms that the main association turns server and is in order to which the standby server is not in the case where receiving the response message Off-line state, and switch to working condition;The main message number of the standby server, the program of the data of storage and configuration and institute It is identical to state main message number, the data of storage and the program of configuration that main association turns server.
In the embodiment of the present invention, main association turns server by when in running order, to standby server returning response Message can show oneself to be not in off-line state to standby server, correspondingly, if main association turns server and is in offline shape State, then standby server returning response message can not be just given after the online confirmation message for receiving standby server transmission, In this way, standby server can with by whether receive response message, to confirm that main association turns whether server is in off-line state, And when main association turns server and be in off-line state, working condition is switched to, further, due to standby server and main association turn The main message number of server is identical, and the data of the two storage and the program of configuration are identical, and therefore, standby server is by switching to Working condition can be realized the main association of substitution and turn server and interact with other terminals, provides for other terminals and main association turn takes The service of service-conformance provided by business device.
In conclusion another kind server switching method provided in an embodiment of the present invention, main association, which turns server, be can receive The online confirmation message that standby server is sent is returned to standby server and is rung if to turn server in running order for main association Message is answered, in order to which standby server is not in the case where receiving response message, confirming that main association turns server is off-line state, And switch to working condition, wherein main message number, the data of storage and the program of configuration of the standby server and main association turn clothes The main message number of device, the data of storage and the program of configuration of being engaged in are identical.In this way, main association, which turns server, passes through transmission response message, Its foundation for whether being in off-line state is confirmed to provide for standby server, and standby server is allowed to turn service in main association When device is in off-line state, working condition is timely entered, and then is realized during main association turns servers off-line, turns clothes instead of main association The problem of device of being engaged in provides service, and then main association is avoided to turn server since failure enters off-line state, caused service disruption.
Fig. 7 is the interaction diagrams of another server switching method provided in an embodiment of the present invention, and this method is applied to In networking, as shown in fig. 7, this method comprises:
Step 701, the standby server turn server to main association and are sent in line justification message.
In this step, standby server can with prefixed time interval to it is main association turn server continuously transmit heartbeat confirmation disappear Breath, wherein the prefixed time interval can be to be preset according to actual needs, exemplary, which can be 10 seconds, that is, standby server can turn server contact to main association every 10 seconds and send heartbeat acknowledgment messages, for example, spare clothes Business device can send a heartbeat acknowledgment messages when 1 point and 10 seconds, and a heartbeat confirmation is sent when at 1 point and 20 seconds Message sends heartbeat acknowledgment messages, etc. when 1 point and 30 seconds.
Step 702, the main association turn server and receive the online confirmation message that standby server is sent.
Correspondingly, main association, which turns server, can receive standby server to turn server continuous to main association with prefixed time interval The heartbeat acknowledgment messages of transmission.
If step 703, the main association turn, server is in running order, and the main association turns server to the spare clothes Business device returning response message.
In this step, if to turn server in running order for main association, then main association turn server can be for continuously transmitting Each heartbeat acknowledgment messages, respectively return a confirmation message, off-line state is not in indicate oneself with this.
Step 704, the standby server are not receiving the case where main association turns the response message of server return Under, determining that the main association turns server is off-line state.
In practical application scene, main association turns server it is possible that because message transmission goes wrong, without success The case where to standby server returning response message, at this point, if directly turning server for some heart not receiving main association In the case where jumping the response message that confirmation message returns, determining that main association turns server is off-line state, it is possible that erroneous judgement The problem of.Therefore, this step can be realized by following sub-steps (1):
Sub-step (1): if standby server does not receive main association and turns the response that server returns to N number of heartbeat acknowledgment messages Message, then confirming that main association turns server is off-line state;The response message returned to N number of heartbeat acknowledgment messages is that main association turns What server continuously transmitted.
Specifically, N can be the integer not less than 2, the specific value of N can be to be preset according to the actual situation, example Such as, N can be 3.In the embodiment of the present invention, turns server in main association and do not disappear to continuous multiple heartbeat acknowledgment messages returning responses When breath, then determining that main association turns server is off-line state, can reduce the possibility for occurring judging by accident, and then determining operation can be improved Accuracy.
Step 705, the standby server switch to working condition.
Specifically, the implementation of this step is referred to above-mentioned steps 503, this will not be repeated here for the embodiment of the present invention.
Further, it after switching to working condition due to standby server, needs based on storing in standby server Data and the program of configuration turn server providing services to substitute main association, and in practical application scene, main association turns to deposit in server The data of storage and the program of configuration often change, exemplary, as terminal and main association turn the interaction of server, main association Turn to store on server more and more, further, turns the program that configures on server to optimize main association, staff can Edition upgrading can be carried out to the program of configuration, therefore, in the embodiment of the present invention, standby server can to the data of storage and The program of configuration is updated.Specific standby server can be realized to update by following sub-steps (1)~sub-step (2) and be deposited The data of storage:
Sub-step (1): standby server is obtained when the number for receiving the response message reaches the first preset times The main association turns the data stored on server.
In this step, which can be sets according to actual needs, and exemplary, which can Think 20, which may be 30, and the embodiment of the present invention is not construed as limiting this, certainly, of the invention another It, can also be using time interval as the standard of more new data, for example, primary obtain can be executed every 7 days in alternative embodiment Main association turns the data stored on server, to carry out data update.
Further, standby server can based on and main association turn interface channel between server, turn service to main association Device sends data acquisition request, and correspondingly, main association turns server can be after receiving the data acquisition request, by the number of storage According to being sent to standby server.
Sub-step (2): standby server turns the data stored on server based on the main association, to the standby server The data of upper storage synchronize update operation, so that the data stored on the standby server and the main association turn server The data of upper storage it is consistent.
In this step, the data that the data that standby server can will acquire are stored with itself are compared one by one, will The data not stored in standby server in the data of acquisition are stored to standby server, will not occurred in the data of acquisition Standby server in the data that store delete so that standby server and main association turn the data server storage.
In the embodiment of the present invention, update operation is synchronized by obtaining all data that main association turns to store in server, It may insure after synchronizing update operation based on the data, the data and main association stored on standby server turn on server The data of storage it is consistent.Certainly, it should be noted that in practical application scene, in order to reduce the data volume of transmission, main association turns The data of change can also be sent to standby server by server, standby server according only to change data to the number of storage Operation is updated according to synchronizing, the embodiment of the present invention is not construed as limiting this.
Further, standby server can realize the journey for updating configuration by following sub-steps (3)~sub-step (6) Sequence:
Sub-step (3): when the number for executing the synchronized update operation reaches the second preset times, the main association is obtained Turn the program version number of server.
In this step, which can be sets according to actual needs, and exemplary, which can Think 10, which may be 15, and the embodiment of the present invention is not construed as limiting this, certainly, of the invention another It, can also be using time interval as the standard of more new data, for example, can execute and once obtain every 15 days in alternative embodiment The main program version number assisted and turn server is taken, to carry out program update.
Further, standby server can based on and main association turn interface channel between server, turn service to main association Device sends version number's acquisition request, and correspondingly, main association turns server can be after receiving version number's acquisition request, will be current The version number of the program of operation is sent to standby server.
Sub-step (4): it newly states main assist and turns the degree version number of the program version number of server and the standby server not Unanimously, then turn server to the main association and send program upgrade command.
In practical application scene, the version number of the program of different editions does not have to, and turns to configure on server to main association every time It is correspondingly, main to assist the program version number turned on server that accordingly change after program is updated, therefore, if It is main to assist the program version number for turning server consistent with the degree version number of standby server, it may be considered that matching on standby server The program set assists the program that turns to configure on server identical with main, whereas if it is main assist turn the program version number of server with it is standby It is inconsistent with the degree version number of server, it may be considered that the program configured on standby server turns to match on server with main association The program set is not identical, at this point it is possible to which turning server to main association sends program upgrade command, wherein the program upgrade command can Turn server for the installation kit of the program of current-configuration to be used to indicate main association, is sent to standby server.
Sub-step (5): the installation kit that the main association turns server transmission is received.
In the embodiment of the present invention, main association turns server can will be currently configured after receiving the program upgrade command The installation kit of program be sent to standby server, correspondingly, standby server can receive the installation kit, to realize to spare The program configured on server is upgraded.
Sub-step (6): being based on the installation kit, carries out edition upgrading to the program configured on the standby server.
In this step, standby server can be parsed the installation kit, then using in the installation kit after parsing The program that installation file upgrades the program being currently configured on standby server, and then ensures to configure on standby server Assist the program for turning to configure on server consistent with main.It should be noted that standby server the program to current-configuration into After row upgrading, in order to ensure updating operation can come into force, standby server can be restarted, correspondingly, after restarting, Standby server can enter standby mode, that is, enter the main association of detection and turn whether server is off-line state, and turn clothes in main association Business device switches to the state of working condition when being off-line state.
In the embodiment of the present invention, synchronized more by the program to the data and configuration that are stored on standby server Newly, it can be ensured that standby server normally can provide service when the main association of substitution turns server providing services for other terminals, Guarantee service quality.
Step 706, the standby server send failure prompting message to user, to remind the user to the main association Turn server to repair, so that the main association turns server and enters presence.
In this step, failure prompting message can serve to indicate that main association turns server failure, specifically, active service Device can be based on preset data center server, for example, Mserver server, failure prompting message is sent to preset User's operation platform, to show that main association turns server and breaks down to user by the user's operation platform, certainly, active service Failure prompting message can also be directly sent on the electronic equipment of user by device, for example, mobile phone, the embodiment of the present invention to this not It limits.Further, user receives failure prompting message, after knowing that main association turns server failure, can turn to main association Server, which repairs, restarts, so that main association turns server and enters presence, can put back into.
It should be noted that the execution sequence of above-mentioned each step is not unique, for example, step in the embodiment of the present invention 706 can be placed on after step 704, before step 705, that is, it is offline that standby server, which can turn server determining main association, After state, failure prompting message first is sent to user, can be repaired in order to which main association turns server, then be cut again in time Working condition is shifted to, certainly, step 706 is placed on after step 705, that is, standby server is determining that main association turns server and be After off-line state, working condition can be first switched to, then, then to user sends failure prompting message, it can most fast degree It takes over main association and turns server, and then the main association of reduction of maximum program turns the time of the service disruption of server offer, guarantees service Efficiency.
Step 707, the main association turn server and enter after presence, obtain the number stored on the standby server According to.
During turning servers off-line due to main association, being standby server turns server providing services substituting main association, in this way, Main association turns the data that store on server compared to the data stored on standby server, it is possible that difference, correspondingly, this In step, main association, which turns server, can obtain the data stored on standby server after entering presence.Specifically, Main association, which turns server, can send data acquisition request to standby server, and correspondingly standby server can receive the data After acquisition request, the data of storage are sent to main association and turn server.
Step 708, the main association turn server based on the data stored on the standby server, turn clothes to the main association The data stored on business device synchronize update operation.
Specifically, main association, which turns server, synchronizes the implementation for updating operation based on the data of acquisition, with above-mentioned son The implementation that standby server synchronizes update operation based on the data of acquisition in step (2) is identical, is referred to above-mentioned Sub-step (2), this will not be repeated here for the embodiment of the present invention.In the embodiment of the present invention, pass through turn to store on server to main association Data synchronize update, it can be ensured that can normally be other terminals after main association turns server rearming Service is provided, ensure that service quality.
Step 709, the main association turn server after completing the synchronized update operation, Xiang Suoshu standby server hair Send standby command.
In this step, since main association turns server and standby server main message number having the same, if the two It is in running order simultaneously, then may result in and disappear when terminal turns server transmission message to main association based on main message number Breath is repeated response, and then the problem of Message Processing confusion occurs, therefore, in the embodiment of the present invention, can complete to synchronize more After new operation, first send standby command to standby server, wherein the standby command can serve to indicate that standby server by Working condition switches to standby mode, by sending the standby command, enters standby mode to control standby server, to exit Working condition, and then avoid since the two is in running order simultaneously, and lead to the problem of Message Processing confusion.
Step 710, the main association turn server after the standby server enters standby mode, switch to work shape State.
In this step, main association, which turns server, can turn the program configured on server by running the main association, and Lai Shixian is cut Shift to working condition.It should be noted that will not generally be carried out to the program configured on standby server in practical application scene It updates, therefore, in the embodiment of the present invention, turns that only working condition can be being entered after server enters presence in main association Before, turn the data on server to main association to be updated, certainly, in another alternative embodiment of the embodiment of the present invention, Can turn after server enters presence in main association, can before entering working condition, then by with standby server It interacts, to assist the program for turning to configure on server to synchronize update to main, to ensure that main association turns server and spare clothes Business device is consistent, and the embodiment of the present invention is not construed as limiting this.
In conclusion another server switching method provided in an embodiment of the present invention, standby server can turn to main association Server is sent in line justification message, and main association turns server can be standby for the online confirmation message returning response message received With server do not receive it is main association turn server return response message in the case where, can determine whether this it is main association turn server be from Linear state then can switch to working condition.Wherein, the main message number, the data of storage of standby server and the program of configuration It is identical to turn the main message number, the data of storage and the program of configuration of server with main association.In this way, standby server passes through in main association When turning servers off-line, into working condition, it can turn server during main association turns servers off-line instead of main association and clothes are provided The problem of business, and then main association is avoided to turn server since failure enters off-line state, caused service disruption.
Fig. 8 is the step flow chart of another server switching method provided in an embodiment of the present invention, and this method is applied to System depending on turning server in networking including standby server and main association, as shown in figure 8, this method comprises:
Step 801, the standby server turn server to the main association and are sent in line justification message.
Specifically, the implementation of this step is referred to above-mentioned steps 501, this will not be repeated here for the embodiment of the present invention.
Step 802, the main association turn server and receive the online confirmation message that standby server is sent.
Specifically, the implementation of this step is referred to above-mentioned steps 601, this will not be repeated here for the embodiment of the present invention.
If step 803, the main association turn, server is in running order, and the main association turns server to the spare clothes Business device returning response message.
Specifically, the implementation of this step is referred to above-mentioned steps 602, this will not be repeated here for the embodiment of the present invention.
Step 804, the standby server do not receive it is described it is main association turn server return response message, determine institute Stating main association to turn server is off-line state.
Specifically, the implementation of this step is referred to above-mentioned steps 502, this will not be repeated here for the embodiment of the present invention.
Step 805, the standby server switch to working condition;The main message number of the standby server, storage It is identical that data and the program of configuration with the main association turn the main message number, the data of storage and the program of configuration of server.
Specifically, the implementation of this step is referred to above-mentioned steps 503, this will not be repeated here for the embodiment of the present invention.
In conclusion another server switching method provided in an embodiment of the present invention, standby server can turn to main association Server is sent in line justification message, and main association turns server can be standby for the online confirmation message returning response message received With server do not receive it is main association turn server return response message in the case where, can determine whether this it is main association turn server be from Linear state then can switch to working condition.Wherein, the main message number, the data of storage of standby server and the program of configuration It is identical to turn the main message number, the data of storage and the program of configuration of server with main association.In this way, standby server passes through in main association When turning servers off-line, into working condition, it can turn server during main association turns servers off-line instead of main association and clothes are provided The problem of business, and then main association is avoided to turn server since failure enters off-line state, caused service disruption.
Fig. 9 is a kind of block diagram of server switching device provided in an embodiment of the present invention, which is applied to view networking In standby server, as shown in figure 9, the device 90 includes:
First sending module 901 is sent in line justification message for turning server to main association;
First determining module 902, for do not receive it is described it is main association turn server return response message in the case where, Determining that the main association turns server is off-line state;
First switching module 903, for switching to working condition;The main message number of the standby server, storage number According to and the program of configuration main assist that turn the main message number, the data of storage and the program of configuration of server identical with described.
Optionally, first determining module 902, is used for:
Turn server to the main association with prefixed time interval and continuously transmits heartbeat acknowledgment messages;
If not receiving main assist turns the response message that server returns to N number of heartbeat acknowledgment messages, described in confirmation It is off-line state that main association, which turns server,;The response message returned to N number of heartbeat acknowledgment messages is that the main association turns server It continuously transmits, the N is the integer not less than 2.
Optionally, described device 90 further include:
First obtains module, when for reaching the first preset times in the number for receiving the response message, obtains institute It states main association and turns the data stored on server;
First update module, for turning the data stored on server based on the main association, on the standby server The data of storage synchronize update operation, so that the data stored on the standby server and the main association turn on server The data of storage it is consistent.
Optionally, described device 90 further include:
Second obtains module, when for reaching the second preset times in the number for executing the synchronized update operation, obtains The main association turns the program version number of server;
Second sending module, if turning the degree of the program version number and the standby server of server for the main association Version number is inconsistent, then turns server to the main association and send program upgrade command;Described program upgrade command is used to indicate institute It states main association and turns server for the installation kit of the program of current-configuration, be sent to the standby server;
First receiving module turns the installation kit of server transmission for receiving the main association;
Upgraded module carries out edition upgrading to the program configured on the standby server for being based on the installation kit.
Optionally, described device 90 further include:
Third sending module, for sending failure prompting message to user, to remind the user to turn clothes to the main association Business device repairs, so that the main association turns server and enters presence;
Wherein, the failure prompting message be used to indicate it is described it is main association turn server failure.
In conclusion a kind of server switching device provided in an embodiment of the present invention, can turn server to main association and send Online confirmation message, do not receive it is main association turn server return response message in the case where, determine this it is main association turn server Then working condition can be switched to for off-line state.Wherein, the main message number, the data of storage and configuration of the standby server Program to turn the main message number, the data of storage and the program of configuration of server identical with main association.In this way, standby server passes through When main association turns servers off-line, into working condition, server can be turned instead of main association during main association turns servers off-line Service is provided, and then main association is avoided to turn server since failure enters off-line state, the problem of caused service disruption.
Figure 10 is the block diagram of another server switching device provided in an embodiment of the present invention, which is applied to view Main association in networking turns server, and as shown in Figure 10, which includes:
Second receiving module 1001, for receiving the online confirmation message of standby server transmission;
First return module 1002, if it is in running order to turn server for the main association, to the active service Device returning response message confirms the master in order to which the standby server is not in the case where receiving the response message It is off-line state that association, which turns server, and switches to working condition;
Main message number, the data of storage and the program of configuration of the standby server and the main association turn the master of server The program of message number, the data of storage and configuration is identical.
Optionally, second receiving module 1001, is used for:
It receives the standby server and the heartbeat confirmation that server continuously transmits is turned to the main association with prefixed time interval Message;
Correspondingly, the first return module 1001 is used for:
For each heartbeat acknowledgment messages continuously transmitted, a confirmation message is returned respectively.
Optionally, the standby server is also used to confirming that the main association turns server be Xiang Yong after off-line state Family sends failure prompting message, is repaired with reminding the user to turn server to the main association, so that the main association turns clothes Business device enters presence;
Correspondingly, described device 100 further include:
Third obtains module, obtains the active service after server enters presence for turning in the main association The data stored on device;
Second update module, for turning on server to the main association based on the data stored on the standby server The data of storage synchronize update operation;
4th sending module, for after completing the synchronized update operation, Xiang Suoshu standby server to send standby Instruction;The standby command is used to indicate the standby server and switches to standby mode by working condition;
Second switching module, for switching to working condition after the standby server enters standby mode.
In conclusion another kind server switching device provided in an embodiment of the present invention, can receive standby server hair The online confirmation message sent, if to turn server in running order for main association, to standby server returning response message, in order to For standby server in the case where not receiving response message, confirming that main association turns server is off-line state, and switches to work State, wherein main message number, the data of storage and the program of configuration of the standby server turn the main message of server with main association Number, storage data and configuration program it is identical.In this way, main association turns server by sending response message, for active service Device, which provides, confirms its foundation for whether being in off-line state, allows standby server to turn server in main association and is in offline shape When state, working condition is timely entered, and then is realized during main association turns servers off-line, turns server instead of main association and clothes is provided The problem of business, and then main association is avoided to turn server since failure enters off-line state, caused service disruption.
Figure 11 is a kind of block diagram of server switching system provided in an embodiment of the present invention, which is applied to view connection In net, as shown in figure 11, which includes that standby server 1101 and main association turn server 1102;
The standby server 1101 is sent in line justification message for turning server 1102 to the main association;
The main association turns server 1102, for receiving the online confirmation message of the transmission of standby server 1101;
If it is in running order that the main association turns server 1102, the main association turns server 1102, is used for described 1101 returning response message of standby server;
The standby server 1101, for do not receive it is described it is main association turn server 1102 return response message, Determining that the main association turns server 1102 is off-line state;
The standby server 1101, for switching to working condition;The main message number of the standby server 1101 is deposited The data of storage and the program of configuration turn the main message number, the data of storage and the program phase of configuration of server 1102 with the main association Together.
In conclusion a kind of server switching system provided in an embodiment of the present invention, standby server can turn clothes to main association Business device is sent in line justification message, and main association turns server can be spare for the online confirmation message returning response message received Server can determine whether that turn server be offline for the main association in the case where not receiving main association and turning the response message of server return State then can switch to working condition.Wherein, the main message number, the data of storage of standby server and the program of configuration with It is main to assist the main message number, the data of storage and the program of configuration that turn server identical.In this way, standby server in main association by turning When servers off-line, into working condition, it can turn server during main association turns servers off-line instead of main association and clothes are provided The problem of business, and then main association is avoided to turn server since failure enters off-line state, caused service disruption.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each process of above-mentioned server switching method embodiment when being executed by processor, and Identical technical effect can be reached, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, such as Read-only memory (Read-Only Memory, abbreviation ROM), random access memory (Random Access Memory, abbreviation RAM), magnetic or disk etc..
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, limited by sentence " including one ... " Element, it is not excluded that including identical being wanted in the process, method of the element, article or terminal device there is also other Element.
Above to a kind of server switching method provided by the present invention, device, system and readable storage medium storing program for executing, carry out It is discussed in detail, used herein a specific example illustrates the principle and implementation of the invention, above embodiments Illustrate to be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, according to According to thought of the invention, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification It should not be construed as limiting the invention.

Claims (19)

1. a kind of server switching method, which is characterized in that the method is applied to the standby server in view networking, the side Method includes:
Turn server to main association and is sent in line justification message;
Do not receive it is described it is main association turn server return response message in the case where, determine it is described it is main association turn server be from Linear state;
Switch to working condition;Main message number, the data of storage and the program of configuration of the standby server and the main association The main message number, the data of storage and the program of configuration for turning server are identical.
2. the method according to claim 1, wherein it is described do not receive it is described it is main association turn server return In the case where response message, determining that the main association turns server is off-line state, comprising:
Turn server to the main association with prefixed time interval and continuously transmits heartbeat acknowledgment messages;
If not receiving the main association turns the response message that server returns to N number of heartbeat acknowledgment messages, the main association is confirmed Turning server is off-line state;The response message returned to N number of heartbeat acknowledgment messages is that turn server continuous for the main association It sends, the N is the integer not less than 2.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
When the number for receiving the response message reaches the first preset times, obtain what the main association turned to store on server Data;
Turn the data stored on server based on the main association, update is synchronized to the data stored on the standby server Operation, so that the data stored on the standby server turn the consistent of the data stored on server with the main association.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
When the number for executing the synchronized update operation reaches the second preset times, the program that the main association turns server is obtained Version number;
If it is described it is main assist turn server program version number and the degree version number of the standby server it is inconsistent, Xiang Suoshu Main association turns server and sends program upgrade command;Described program upgrade command is used to indicate the main association and turns server and will currently match The installation kit for the program set is sent to the standby server;
Receive the installation kit that the main association turns server transmission;
Based on the installation kit, edition upgrading is carried out to the program configured on the standby server.
5. the method according to claim 1, wherein the method also includes:
Failure prompting message is sent to user, is repaired with reminding the user to turn server to the main association, so that described Main association turns server and enters presence;
Wherein, the failure prompting message be used to indicate it is described it is main association turn server failure.
6. a kind of server switching method, which is characterized in that the method is applied to turn server depending on the main association in networking, described Method includes:
Receive the online confirmation message that standby server is sent;
If it is in running order that the main association turns server, to the standby server returning response message, in order to described For standby server in the case where not receiving the response message, confirming that the main association turns server is off-line state, and is cut Shift to working condition;
Main message number, the data of storage and the program of configuration of the standby server and the main association turn the main message of server Number, storage data and configuration program it is identical.
7. according to the method described in claim 6, it is characterized in that, described receive disappearing in line justification for standby server transmission Breath, comprising:
It receives the standby server and the heartbeat acknowledgment messages that server continuously transmits is turned to the main association with prefixed time interval;
It is correspondingly, described to the standby server returning response message, comprising:
For each heartbeat acknowledgment messages continuously transmitted, a confirmation message is returned respectively.
8. according to the method described in claim 6, it is characterized in that, the standby server is also used to confirming the main association turn Server is sends failure prompting message to user after off-line state, to remind the user to turn server to the main association It repairs, so that the main association turns server and enters presence;
Correspondingly, the method also includes:
Turn to obtain the data stored on the standby server after server enters presence in the main association;
Based on the data stored on the standby server, the data for turning to store on server to the main association synchronize update Operation;
After completing the synchronized update operation, Xiang Suoshu standby server sends standby command;The standby command is used for Indicate that the standby server switches to standby mode by working condition;
After the standby server enters standby mode, working condition is switched to.
9. a kind of server switching method, which is characterized in that the method is applied in view networking, and the method is applied to view connection It include the system that standby server and main association turn server in net, which comprises
The standby server turns server to the main association and is sent in line justification message;
The main association turns server and receives the online confirmation message that standby server is sent;
If it is in running order that the main association turns server, the main association turns server to the standby server returning response Message;
The standby server turns the response message of server return not receiving the main association, determines that the main association turns service Device is off-line state;
The standby server switches to working condition;
Wherein, the main message number, the data of storage of the standby server and the program of configuration and the main association turn server The program of main message number, the data of storage and configuration is identical.
10. a kind of server switching device, which is characterized in that described device is applied to the standby server in view networking, described Device includes:
First sending module is sent in line justification message for turning server to main association;
First determining module, for do not receive it is described it is main association turn server return response message in the case where, determine institute Stating main association to turn server is off-line state;
First switching module, for switching to working condition;Main message number, the data of storage and the configuration of the standby server Program to turn the main message number, the data of storage and the program of configuration of server identical with the main association.
11. device according to claim 10, which is characterized in that first determining module is used for:
Turn server to the main association with prefixed time interval and continuously transmits heartbeat acknowledgment messages;
If not receiving the main association turns the response message that server returns to N number of heartbeat acknowledgment messages, the main association is confirmed Turning server is off-line state;The response message returned to N number of heartbeat acknowledgment messages is that turn server continuous for the main association It sends, the N is the integer not less than 2.
12. device according to claim 11, which is characterized in that described device further include:
First acquisition module obtains the master when for reaching the first preset times in the number for receiving the response message Association turns the data stored on server;
First update module, for turning the data that store on server based on the main association, to being stored on the standby server Data synchronize update operation so that the data stored on the standby server and it is described it is main assist turn to store on server Data it is consistent.
13. device according to claim 12, which is characterized in that described device further include:
Second obtains module, when for reaching the second preset times in the number for executing the synchronized update operation, described in acquisition It is main to assist the program version number for turning server;
Second sending module, if turning the degree version of the program version number and the standby server of server for the main association It is number inconsistent, then turn server to the main association and sends program upgrade command;Described program upgrade command is used to indicate the master Association turns server for the installation kit of the program of current-configuration, is sent to the standby server;
First receiving module turns the installation kit of server transmission for receiving the main association;
Upgraded module carries out edition upgrading to the program configured on the standby server for being based on the installation kit.
14. device according to claim 10, which is characterized in that described device further include:
Third sending module, for sending failure prompting message to user, to remind the user to turn server to the main association It repairs, so that the main association turns server and enters presence;
Wherein, the failure prompting message be used to indicate it is described it is main association turn server failure.
15. a kind of server switching device, which is characterized in that described device is applied to turn server depending on the main association in networking, institute Stating device includes:
Second receiving module, for receiving the online confirmation message of standby server transmission;
First return module is returned to the standby server and is rung if it is in running order to turn server for the main association Message is answered, in order to which the standby server is not in the case where receiving the response message, confirms that the main association turns service Device is off-line state, and switches to working condition;
Main message number, the data of storage and the program of configuration of the standby server and the main association turn the main message of server Number, storage data and configuration program it is identical.
16. device according to claim 15, which is characterized in that second receiving module is used for:
It receives the standby server and the heartbeat acknowledgment messages that server continuously transmits is turned to the main association with prefixed time interval;
Correspondingly, first return module, is used for:
For each heartbeat acknowledgment messages continuously transmitted, a confirmation message is returned respectively.
17. device according to claim 15, which is characterized in that the standby server is also used to confirming the main association Turn server to send failure prompting message to user after off-line state, to remind the user to turn service to the main association Device repairs, so that the main association turns server and enters presence;
Correspondingly, described device further include:
Third obtains module, for turning to obtain on the standby server after server enters presence in the main association The data of storage;
Second update module, for turning to store on server to the main association based on the data stored on the standby server Data synchronize update operation;
4th sending module, for after completing the synchronized update operation, Xiang Suoshu standby server to send standby command; The standby command is used to indicate the standby server and switches to standby mode by working condition;
Second switching module, for switching to working condition after the standby server enters standby mode.
18. a kind of server switching system, which is characterized in that the system is applied in view networking, and the system comprises spare Server and main association turn server;
The standby server is sent in line justification message for turning server to the main association;
The main association turns server, for receiving the online confirmation message of standby server transmission;
If it is in running order that the main association turns server, the main association turns server, for returning to the standby server Return response message;
The standby server, for do not receive it is described it is main association turn server return response message, determine the main association Turning server is off-line state;
The standby server, for switching to working condition;The main message number of the standby server, the data of storage and match To turn the main message number, the data of storage and the program of configuration of server identical with the main association for the program set.
19. a kind of computer readable storage medium, which is characterized in that store computer journey on the computer readable storage medium Sequence, the computer program realize server switching method as claimed in any one of claims 1-9 wherein when being executed by processor The step of.
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 true CN110022228A (en) 2019-07-16
CN110022228B 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)

Cited By (9)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158693A (en) * 2014-08-27 2014-11-19 乐视网信息技术(北京)股份有限公司 A method and a system for disaster recovery backup of data service
CN105471622A (en) * 2015-11-12 2016-04-06 武汉噢易云计算有限公司 High-availability method and system for main/standby control node switching based on Galera
CN105553701A (en) * 2015-12-11 2016-05-04 国网青海省电力公司 Distribution network adjustment and control system and control method thereof
CN108566312A (en) * 2017-12-29 2018-09-21 美的集团股份有限公司 Off-line checking method, device and computer readable storage medium
CN108965369A (en) * 2017-11-22 2018-12-07 北京视联动力国际信息技术有限公司 A kind of method for pushing and system of server state
US20190034299A1 (en) * 2017-07-31 2019-01-31 International Business Machines Corporation Switching servers without interrupting a client command-response queue

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104158693A (en) * 2014-08-27 2014-11-19 乐视网信息技术(北京)股份有限公司 A method and a system for disaster recovery backup of data service
CN105471622A (en) * 2015-11-12 2016-04-06 武汉噢易云计算有限公司 High-availability method and system for main/standby control node switching based on Galera
CN105553701A (en) * 2015-12-11 2016-05-04 国网青海省电力公司 Distribution network adjustment and control system and control method thereof
US20190034299A1 (en) * 2017-07-31 2019-01-31 International Business Machines Corporation Switching servers without interrupting a client command-response queue
CN108965369A (en) * 2017-11-22 2018-12-07 北京视联动力国际信息技术有限公司 A kind of method for pushing and system of server state
CN108566312A (en) * 2017-12-29 2018-09-21 美的集团股份有限公司 Off-line checking method, device and computer readable storage medium

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110690990A (en) * 2019-09-02 2020-01-14 视联动力信息技术股份有限公司 Server upgrading method and device, electronic equipment and storage medium
CN110971479A (en) * 2019-10-08 2020-04-07 视联动力信息技术股份有限公司 Server detection method, device and system based on video network
CN111064618A (en) * 2019-12-20 2020-04-24 北京华胜天成科技股份有限公司 Method, device, equipment and storage medium for realizing high availability of server
CN111200521A (en) * 2019-12-27 2020-05-26 视联动力信息技术股份有限公司 Video networking service recovery method, server, electronic equipment and storage medium
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
CN111209059A (en) * 2020-01-14 2020-05-29 中国北方车辆研究所 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
CN111885103B (en) * 2020-06-12 2024-05-14 视联动力信息技术股份有限公司 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
CN112911335A (en) * 2021-02-03 2021-06-04 烽火通信科技股份有限公司 Service scheduling method based on video coding, video server and set top box
CN112911335B (en) * 2021-02-03 2022-05-27 烽火通信科技股份有限公司 Service scheduling method based on video coding, video server and set top box
CN116170286A (en) * 2023-04-25 2023-05-26 陕西盛禾汇达网络科技有限公司 Block chain-based network security server and control system
CN116170286B (en) * 2023-04-25 2023-09-15 陕西盛禾汇达网络科技有限公司 Block chain-based network security server and control system

Also Published As

Publication number Publication date
CN110022228B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN108075920B (en) A kind of management method and system regarding networked terminals
CN110022228A (en) Server switching method, device, system and readable storage medium storing program for executing
CN108234396A (en) A kind of method and device of monitoring device status information real-time synchronization
CN109743595A (en) Terminal data synchronous method and device
CN109167960A (en) A kind of processing method and system of video stream data
CN108880851A (en) A kind of method and interactive system that configuration updates
CN109215653A (en) A kind of method and apparatus of voice operating
CN109818776A (en) Micro services module exception localization method and device
CN110475090A (en) A kind of method and system of Conference control
CN109068086A (en) A kind of processing method and system of visual telephone service
CN108809922B (en) A kind of audio fault handling method, conference dispatching end and view networked terminals
CN109842685A (en) A kind of method of data synchronization and device
CN109729388A (en) Depending on networked server switching method and apparatus
CN108307212A (en) A kind of file order method and device
CN108234178A (en) A kind of method and apparatus for being managed collectively menu file
CN108206927B (en) A kind of meeting synchronous method and device
CN109379209A (en) A kind of upgrade method and device of view networking storage service
CN110048903A (en) A kind of association turns gateway status monitoring method and device
CN110177023A (en) A kind of communication connection detection method and device based on view networking
CN109802952A (en) Monitoring data synchronous method and device
CN110505077A (en) A kind of method and apparatus of upgrading
CN109194901A (en) A kind of method for processing video frequency and device based on view networking
CN110505211A (en) A kind of data interactive method and device based on view networking
CN110048911A (en) A kind of Cascading Methods and server based on view networking
CN110336710A (en) A kind of test method of terminal, system and device and storage medium

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