CN106686102B - Service node switching method and device - Google Patents

Service node switching method and device Download PDF

Info

Publication number
CN106686102B
CN106686102B CN201710003225.6A CN201710003225A CN106686102B CN 106686102 B CN106686102 B CN 106686102B CN 201710003225 A CN201710003225 A CN 201710003225A CN 106686102 B CN106686102 B CN 106686102B
Authority
CN
China
Prior art keywords
node
service node
service
client
searching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710003225.6A
Other languages
Chinese (zh)
Other versions
CN106686102A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201710003225.6A priority Critical patent/CN106686102B/en
Publication of CN106686102A publication Critical patent/CN106686102A/en
Priority to PCT/CN2017/119879 priority patent/WO2018127005A1/en
Application granted granted Critical
Publication of CN106686102B publication Critical patent/CN106686102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1025Dynamic adaptation of the criteria on which the server selection is based
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1031Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a switching method of service nodes and a corresponding device, wherein the method comprises the following steps: the method comprises the steps of presetting a node relation corresponding table, receiving a switching request of a first service node currently used by a client, searching a second service node which provides service and is most preferable for the client from the node relation corresponding table, and feeding back the second service node, wherein node identifications of multi-level regions to which marked service nodes belong and node preference orders in all levels of regions for the clients in the regions to which all the service nodes belong are stored in the node relation corresponding table. According to the technical scheme, when the service node fails, the optimal service node can be selected for the client again, cross-region scheduling of the service node can be achieved, and due to the fact that the identification is divided into regions of different levels, the cross-region selection of the optimal service node only needs to search the identification of each service node in the region under the condition that the identification of the region at the previous level is the same, and response speed is high.

Description

Service node switching method and device
Technical Field
The present invention relates to the technical field of service node switching, and in particular, to a method and an apparatus for switching a service node.
Background
The streaming data is data which can be transmitted on the network by adopting a streaming transmission mode, and a service node is deployed in the streaming data application service network and used for transmitting and processing the streaming data and providing services for users nearby. In the transmission process, a corresponding service node is generally found in a divided area and an operator according to a network address of a user.
If a service node fails, a static binding mode or manual intervention is usually adopted to allocate other service nodes to a client, so that the optimal service node cannot be selected, and particularly, the response speed is low when multiple service nodes in one area fail and cannot be dispatched or allocated in a cross-regional manner.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide a handover method of a serving node and a corresponding apparatus that overcome or at least partially solve the above problems.
According to an aspect of the present invention, there is provided a method for handover of a serving node, including:
presetting a node relation corresponding table, wherein node identifications of multi-level regions to which the marked service nodes belong and node preferred orders in each level region aiming at clients in the region to which each service node belongs are stored in the node relation corresponding table;
receiving a switching request of a first service node currently used by a client;
and searching a second service node which provides service and is most preferable for the client from the node relation corresponding table, and feeding back the second service node.
Optionally, the searching for a second service node that provides a service and is most preferred for the client from the node relationship correspondence table, and feeding back the second service node includes:
searching a service node which belongs to the same N-level region as the first service node and has the highest preferred order from the node relation corresponding table to serve as a second service node;
if not, searching a service node which belongs to the same N-1 level region as the first service node and has the highest preferred order as a second service node;
and iterating and executing the searching step until the second service node is searched.
Optionally, the node identifier is represented by a set coding format, and the set coding format is composed of region codes of regions belonging to each level and node codes of the service node;
the searching for the service node which belongs to the same N-level region as the first service node and has the highest preferred order as the second service node comprises:
extracting region codes corresponding to N-level regions;
and searching the service node with the highest preferred order corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node to be used as a second service node.
Optionally, before searching for the service node with the highest preference order corresponding to the extracted regional code in the node relationship correspondence table corresponding to the first service node, the method further includes:
and converting the node identification of the node into a set coding format.
Optionally, the preset node relationship correspondence table includes:
respectively presetting a node relation corresponding table aiming at each node service provider;
before the looking up a second service node providing a service and most preferred for the client from the node relation correspondence table, the method further comprises:
determining a node service provider to which the first service node belongs;
and searching a node relation corresponding table corresponding to the determined node service provider.
Optionally, before the feeding back the second serving node, the method further includes:
and testing the second service node to be in a normal operation state.
Optionally, the method further comprises:
deleting the first service node from the node relation corresponding table;
adding the first service node to an abnormal node list, and periodically detecting whether each service node in the abnormal node list is in a normal operation state;
and if detecting that a certain target service node in the abnormal node list is in a normal operation state, deleting the target service node from the abnormal node list, and adding the target service node to the node relation corresponding table.
Optionally, the method further comprises:
adding an abnormal mark to the first service node in the node relation corresponding table;
the searching the second service node which provides the service and is most preferred for the client from the node relation corresponding table comprises:
and searching a most preferable second service node for the client from the service nodes which are not added with the abnormal marks in the node relation corresponding table.
Optionally, before the receiving the handover request to the currently used first serving node, the method further comprises:
and allocating a first service node for the client according to the scheduling request of the client.
Optionally, the allocating a first service node to the client according to the scheduling request of the client includes:
extracting the network address of the client, and searching a network address set to which the network address belongs;
and determining the geographic area of the client and a service node provider according to the network address set.
According to another aspect of the present invention, there is provided a handover apparatus of a serving node, including:
a corresponding table presetting module for presetting a node relation corresponding table, wherein the node relation corresponding table stores node identifiers for marking multi-level regions to which service nodes belong, and node preference orders in each level region aiming at clients in the regions to which the service nodes belong;
the request receiving module is used for receiving a switching request of a first service node currently used by a client;
and the node searching module is used for searching a second service node which provides service and is most preferable for the client from the node relation corresponding table and feeding back the second service node.
Optionally, the node searching module includes:
the first searching submodule is used for searching the service node which belongs to the same N-level region with the first service node and has the highest preferred order from the node relation corresponding table to be used as a second service node;
the second searching submodule is used for searching the service node which belongs to the same N-1 level region with the first service node and has the highest preferred order as a second service node if the service node is not searched;
and the search iteration submodule is used for iteratively executing the search step until the second service node is searched.
Optionally, the node identifier is represented by a set coding format, and the set coding format is composed of region codes of regions belonging to each level and node codes of the service node;
the first lookup sub-module includes:
the code extraction subunit is used for extracting the region codes corresponding to the N-level regions;
and the node searching subunit is used for searching the service node with the highest priority corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node, and using the service node as a second service node.
Optionally, the apparatus further comprises:
and the format conversion module is used for converting the node identifier of the node into a set coding format before searching the service node with the highest preferred order corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node.
Optionally, the mapping table presetting module includes:
the corresponding table presetting submodule is used for respectively presetting a node relation corresponding table aiming at each node service provider;
the device further comprises:
a provider determining module, configured to determine a node service provider to which the first service node belongs before the second service node that provides a service and is most preferable for the client is searched in the node relationship correspondence table;
and the corresponding table searching module is used for searching the corresponding table of the node relation corresponding to the determined node service provider.
Optionally, the apparatus further comprises:
and the state testing module is used for testing that the second service node is in a normal operation state before the second service node is fed back.
Optionally, the apparatus further comprises:
a node deleting module, configured to delete the first service node from the node relationship correspondence table;
the node list adding module is used for adding the first service node to an abnormal node list and periodically detecting whether each service node in the abnormal node list is in a normal operation state or not;
and the recovery module is used for deleting the target service node from the abnormal node list and adding the target service node to the node relation corresponding table if detecting that a certain target service node in the abnormal node list is in a normal operation state.
Optionally, the apparatus further comprises:
an exception marking module, configured to add an exception mark to the first service node in the node relationship correspondence table;
the node searching module comprises:
and the node searching submodule is used for searching a second service node which is most preferable for the client from the service nodes which are not added with the abnormal marks in the node relation corresponding table.
Optionally, the apparatus further comprises:
and the node allocation module is used for allocating the first service node to the client according to the scheduling request of the client before receiving the switching request of the currently used first service node.
Optionally, the node allocation module includes:
the address extraction submodule is used for extracting the network address of the client and searching a network address set to which the network address belongs;
and the supplier determining submodule is used for determining the geographic area of the client and the supplier of the service node according to the network address set.
According to the switching method of the service node and the corresponding device thereof, the switching request of the first service node currently used by the client is received through the preset node relation corresponding table, the second service node which provides service and is most preferred for the client is searched from the node relation corresponding table, and the second service node is fed back, wherein the node relation corresponding table stores the node identification which marks the multi-level region to which the service node belongs, and the node preferred sequence in each level region aiming at the client in each service node region, so that the optimal service node can be reselected for the client after the service node fails, the cross-region scheduling service node can be realized, and because the identification is divided into the levels of regions, the cross-region selection of the optimal service node only needs to search the identification of each service node in the region under the same identification of the upper level region, the response speed is high.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a step of a handover method of a serving node according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a method for handover of a service node according to a second embodiment of the present invention;
fig. 3 is a block diagram illustrating a switching apparatus of a service node according to a third embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a schematic step flow diagram illustrating a method for switching a service node according to an embodiment of the present invention is shown, which may specifically include the following steps:
and step 101, presetting a node relation corresponding table.
The service node is a server or a server cluster which can provide services such as transmission, processing and the like, and can be particularly applied to providing services such as transmission, processing and the like for streaming data, wherein the streaming data is data which can be transmitted on a network in a streaming mode, for example, a machine room which provides services such as transmission, processing and the like for the streaming data in a live video application or a remote camera application.
The node relation corresponding table stores node identifiers for marking multi-level regions to which the service nodes belong, and node preference orders in the regions of each level aiming at the client in the region to which each service node belongs. The node identification for marking the multi-level region to which the service node belongs is to divide the region into levels and allocate corresponding identifications. The node identifiers are composed of identifiers of multi-level regions corresponding to the service nodes, and the priority of the node identifiers for the clients in the region where each service node is located is stored in the node relation corresponding table.
In the embodiment of the present invention, the node relationship correspondence table may be preset in various ways, for example, obtained from other servers, directly generated locally, and the like, which is not limited in this embodiment. For example, the identifier of china is 0001, the identifier of north China is 0100, the identifier of Beijing is 0010, the identifier of china is 0001, the identifier of north China is 0100, the identifier of Tianjin is 0011, and the node identifier of the corresponding service node, preferably 000101000010, is configured for the client belonging to Beijing, and then 000101000011.
Step 102, receiving a switching request of a first service node currently used by a client.
In the embodiment of the present invention, the first service node is a service node currently used by the client, and the switching request refers to a request for switching a service node of the client, and specifically may be sent by the client, or sent by the server according to an automatic monitoring result, or sent manually. For example, if a service node fails or there is a problem in the transmission between the client and the service node, the client, the monitoring server, or the administrator may issue a switch request after finding the problem. In this embodiment, the switching request is for requesting to switch the first server node, and the switching request for the first service node is received, specifically, the switching request may be that the first service node fails, the transmission between the client and the first service node is in a problem, and the request is for the client to switch to another service node.
Step 103, searching a second service node which provides service and is most preferable for the client from the node relation corresponding table, and feeding back the second service node.
In the embodiment of the invention, the node identifier of one service node is searched for the client according to the priority sequence of each service node to the client in the node relation corresponding table, and the searched service node is the second service node. And feeding back the second service node to the client so that the client can be connected with the second service node.
For example, the first service node of the client of the beijing telecommunications is a machine room of which the network provider is the beijing telecommunications, and the node identifier of the corresponding service node is 0001010000100001, where the corresponding identifier of the machine room of which the network provider is the telecommunications is 0001. If the network provider is a machine room of Beijing telecommunication, the client initiates a request for switching service nodes, firstly, in the North China area, the most preferable service node except the machine room of Beijing telecommunication is found for the client of Beijing, the machine room of the network provider of Tianjin telecommunication is found as a second service node, and the found corresponding identifier is 0001010000110001.
To sum up, according to the embodiments of the present invention, a switching request for a first service node currently used by a client is received through a preset node relationship correspondence table, a second service node which provides a service and is most preferred for the client is searched from the node relationship correspondence table, and the second service node is fed back, wherein a node identifier which marks a multi-level region to which the service node belongs and a node preference order in each level region for the client in the region where each service node is located are stored in the node relationship correspondence table, so that when the service node fails, the optimal service node can be reselected for the client, a cross-region scheduling service node can be implemented, and since the identifier is divided into the levels of regions, the cross-region selection of the optimal service node only needs to search the identifier of each service node in the region under the same identifier of the previous level region, the response speed is high.
In this embodiment of the present invention, preferably, before feeding back the second serving node, the method may further include: and testing the second service node to be in a normal operation state.
After feeding back the second service node, the client tests whether the second service node can be normally connected, for example, tries to establish a connection with the second service node, tests the streaming data transmission speed, and if the second service node can be normally operated and meets the requirement, the second service node is in a normal operation state.
In the embodiment of the present invention, preferably, the method may further include the steps of: deleting the first service node from the node relation corresponding table; adding the first service node to an abnormal node list, and periodically detecting whether each service node in the abnormal node list is in a normal operation state; and if detecting that a certain target service node in the abnormal node list is in a normal operation state, deleting the target service node from the abnormal node list, and adding the target service node to the node relation corresponding table.
The abnormal node list is used for recording service nodes which are temporarily in an abnormal working state, such as dead halt of the service nodes, poor network conditions and the like. After the first service node has a problem, the first service node may be deleted from the node relationship correspondence table, and the first service node is added to the abnormal node list. And regularly detecting whether each service node in the abnormal node list restores to a normal operation state, if detecting that a certain target service node is in the normal operation state, deleting the target service node from the abnormal node list, and adding the target service node to the node relation corresponding table.
In the embodiment of the present invention, preferably, the method may further include the steps of: adding an abnormal mark to the first service node in the node relation corresponding table; one implementation manner of looking up the second service node which provides the service and is most preferred for the client from the node relationship correspondence table is as follows: and searching a most preferable second service node for the client from the service nodes which are not added with the abnormal marks in the node relation corresponding table.
When the first service node cannot provide normal service, an exception marker may be added to the first service node in the node relationship correspondence table. Wherein the exception flag is a flag identifying that the service node is in an exception state. When the most preferable second service node is searched for the client, searching is carried out from the service nodes which are not added with the abnormal marks in the node relation corresponding table.
Referring to fig. 2, a schematic step flow diagram illustrating a method for switching a service node according to a second embodiment of the present invention is shown, which may specifically include the following steps:
step 201, respectively presetting a node relation corresponding table for each node service provider.
The node service provider refers to a network operator providing network services for the service node, such as telecommunication, connectivity, and the like. The node relation corresponding table stores node identifiers for marking multi-level regions to which the service nodes belong, and node preference orders in the regions of each level aiming at the client in the region to which each service node belongs. And respectively presetting a node relation corresponding table aiming at each node service provider. For example, for a service node of which the service provider is a network operator and is a beijing telecommunication, a node relationship correspondence table corresponds to a client of the beijing telecommunication. For the service provider which is a service node of the network operator in Beijing Unicom, a node relation corresponding table is correspondingly arranged for the client side in Beijing Unicom.
Step 202, according to a scheduling request of a client, allocating a first service node to the client.
In the embodiment of the present invention, the scheduling request of the client is a request for scheduling and allocating a service node, and specifically includes a network address and/or a location position of the client, so as to allocate the service node to the client, and the allocated service node is the first service node.
In this embodiment of the present invention, preferably, an implementation manner of allocating the first service node to the client according to the scheduling request of the client is as follows: extracting the network address of the client, and searching a network address set to which the network address belongs; and determining the geographic area of the client and a service node provider according to the network address set.
The network address comprises an IP address and the set of network addresses comprises a segment of the IP address. Extracting the network address of the client, finding the corresponding affiliated network address set, and determining the geographic area and the node service provider of the corresponding client according to the network address set, wherein the node service provider refers to a network operator providing network service for the service node, such as telecommunication, Unicom and the like.
Step 203, receiving a handover request for a first service node currently used by the client.
In the embodiments of the present invention, the detailed implementation is the same as that described in the foregoing embodiments, and is not repeated.
Step 204, determining the node service provider to which the first service node belongs.
In the embodiment of the present invention, the node service provider refers to a network operator providing network services for the service node, such as telecommunications, connectivity, and the like. A network operator of the first serving node is determined.
Step 205, find the corresponding table of node relationship corresponding to the determined node service provider.
In the embodiment of the invention, a corresponding node relation corresponding table is arranged under the same node service provider, and the node relation corresponding table corresponding to the determined node service provider is searched.
For example, if the determined node service provider is the beijing telecommunications, the service node is searched in the node relationship correspondence table corresponding to the beijing telecommunications.
Step 206, searching the service node which belongs to the same N-level region as the first service node and has the highest preferred order from the node relationship corresponding table to serve as a second service node.
In the embodiment of the present invention, the N-level region refers to an nth-level region obtained by classifying regions, and the service node having the first service node belonging to the same N-level region and the highest preferred order is searched from the node relationship correspondence table to serve as the second service node.
In the embodiment of the present invention, preferably, the node identifier is represented by a set coding format, and the set coding format is composed of region codes of regions belonging to different levels and node codes of the service node; the searching and the first service node belong to the same N-level region and have the highest preferred order, and the implementation mode of the searching and the first service node as the second service node is as follows: extracting region codes corresponding to N-level regions; and searching the service node with the highest preferred order corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node to be used as a second service node.
The node identification is expressed by a set coding format, specifically comprises region codes of regions of all levels and node codes of service nodes, extracts the region codes corresponding to N levels of regions, searches a node relation corresponding table corresponding to the first service node, extracts the service node with the same N levels of region codes and the highest corresponding preferred sequence, and takes the service node as a second service node.
In this embodiment of the present invention, preferably, before searching for the service node with the highest preference order corresponding to the extracted regional code in the node relationship correspondence table corresponding to the first service node, the method may further include the steps of: and converting the node identification of the node into a set coding format.
And converting the node identifier of the node into a set encoding format, for example, the encoding format may be a binary code of a set bit number. Any suitable encoding format may be used, and the embodiment is not limited.
Step 207, if not found, finding the service node which belongs to the same N-1 level region as the first service node and has the highest preferred order as a second service node.
In the embodiment of the present invention, if no service node is found in the same N-level region as the first service node, the service node which belongs to the same N-1-level region as the first service node and has the highest preferred order is searched for as the second service node, and the specific manner is described in the same manner as the manner of searching for the service node in the same N-level region, which is not described in detail.
For example, for a service node of which the node service provider is beijing telecommunications, in the north china area, an available service node cannot be found, and the service node is found in the china area first, then the north china area is found in the north china area, and then the corresponding second service node is found in the north lake area.
And 208, iterating the searching step until the second service node is searched, and feeding back the second service node.
In the embodiment of the invention, if the available service nodes are not found in the same N-1 level region, the searching is continued from the N-2 level region, specifically, the N-1 level region is found from the N-2 level region, the N-1 level region is found from the N-1 level region, the searching is carried out from the N-1 level region, the second service node is found, and the second service node is fed back to the second service node.
For example, for a service node of which the node service provider is beijing telecommunication, in the north China area, an available service node cannot be found, the service node is found in the central China area first, then the north China area is found in the central China area, then the corresponding second service node is found in the north Hu area, if no available service node is found in the north Hu area in the central China area, the Anhui area is continuously found in the central China area, and then the preferred service node is found in the Anhui area.
To sum up, according to the embodiments of the present invention, a node relationship correspondence table is respectively preset for each node service provider, a first service node is allocated to the client, a node relationship correspondence table corresponding to the determined node service provider is searched, a service node which belongs to the same N-level region as the first service node and has the highest preferred order is searched from the node relationship correspondence table as a second service node, if the service node is not searched, the service node which belongs to the same N-1 level region as the first service node and has the highest preferred order is searched as the second service node, the step of searching is iteratively executed until the second service node is searched, and the second service node is fed back, wherein the node relationship correspondence table stores node identifiers of multi-level regions to which marked service nodes belong, and for clients in the regions to which the service nodes are located, the nodes in each level of area are in the optimal sequence, so that when the service node fails, the optimal service node can be selected for the client again, cross-area scheduling of the service node can be realized, and because the identification is divided into the areas of each level, the cross-area selection of the optimal service node only needs to search the identification of each service node in the area under the same identification of the area of the previous level, and the response speed is high.
Referring to fig. 3, a block diagram of a switching apparatus of a service node according to a third embodiment of the present invention is shown, which may specifically include the following modules:
a correspondence table presetting module 301, configured to preset a node relationship correspondence table, where node identifiers marking multi-level regions to which service nodes belong and node preference orders in each level region for clients in the region to which each service node belongs are stored in the node relationship correspondence table;
a request receiving module 302, configured to receive a handover request for a first service node currently used by a client;
a node searching module 303, configured to search a second service node that provides a service and is most preferable for the client from the node relationship correspondence table, and feed back the second service node.
In the embodiment of the present invention, preferably, the node searching module includes:
the first searching submodule is used for searching the service node which belongs to the same N-level region with the first service node and has the highest preferred order from the node relation corresponding table to be used as a second service node;
the second searching submodule is used for searching the service node which belongs to the same N-1 level region with the first service node and has the highest preferred order as a second service node if the service node is not searched;
and the search iteration submodule is used for iteratively executing the search step until the second service node is searched.
In the embodiment of the present invention, preferably, the node identifier is represented by a set coding format, and the set coding format is composed of region codes of regions belonging to different levels and node codes of the service node;
the first lookup sub-module includes:
the code extraction subunit is used for extracting the region codes corresponding to the N-level regions;
and the node searching subunit is used for searching the service node with the highest priority corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node, and using the service node as a second service node.
In the embodiment of the present invention, preferably, the apparatus further includes:
and the format conversion module is used for converting the node identifier of the node into a set coding format before searching the service node with the highest preferred order corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node.
In the embodiment of the present invention, preferably, the mapping table presetting module includes:
the corresponding table presetting submodule is used for respectively presetting a node relation corresponding table aiming at each node service provider;
the device further comprises:
a provider determining module, configured to determine a node service provider to which the first service node belongs before the second service node that provides a service and is most preferable for the client is searched in the node relationship correspondence table;
and the corresponding table searching module is used for searching the corresponding table of the node relation corresponding to the determined node service provider.
In the embodiment of the present invention, preferably, the apparatus further includes:
and the state testing module is used for testing that the second service node is in a normal operation state before the second service node is fed back.
In the embodiment of the present invention, preferably, the apparatus further includes:
a node deleting module, configured to delete the first service node from the node relationship correspondence table;
the node list adding module is used for adding the first service node to an abnormal node list and periodically detecting whether each service node in the abnormal node list is in a normal operation state or not;
and the recovery module is used for deleting the target service node from the abnormal node list and adding the target service node to the node relation corresponding table if detecting that a certain target service node in the abnormal node list is in a normal operation state.
In the embodiment of the present invention, preferably, the apparatus further includes:
an exception marking module, configured to add an exception mark to the first service node in the node relationship correspondence table;
the node searching module comprises:
and the node searching submodule is used for searching a second service node which is most preferable for the client from the service nodes which are not added with the abnormal marks in the node relation corresponding table.
In the embodiment of the present invention, preferably, the apparatus further includes:
and the node allocation module is used for allocating the first service node to the client according to the scheduling request of the client before receiving the switching request of the currently used first service node.
In the embodiment of the present invention, preferably, the node allocating module includes:
the address extraction submodule is used for extracting the network address of the client and searching a network address set to which the network address belongs;
and the supplier determining submodule is used for determining the geographic area of the client and the supplier of the service node according to the network address set.
To sum up, according to the embodiments of the present invention, a switching request for a first service node currently used by a client is received through a preset node relationship correspondence table, a second service node which provides a service and is most preferred for the client is searched from the node relationship correspondence table, and the second service node is fed back, wherein a node identifier which marks a multi-level region to which the service node belongs and a node preference order in each level region for the client in the region where each service node is located are stored in the node relationship correspondence table, so that when the service node fails, the optimal service node can be reselected for the client, a cross-region scheduling service node can be implemented, and since the identifier is divided into the levels of regions, the cross-region selection of the optimal service node only needs to search the identifier of each service node in the region under the same identifier of the previous level region, the response speed is high.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of a service node switching method and apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (20)

1. A method of handover of a serving node, comprising:
presetting a node relation corresponding table, wherein node identifications of multi-level regions to which the marked service nodes belong and the preferred sequence of each service node in each level region aiming at the client in each service node region are stored in the node relation corresponding table;
receiving a switching request of a first service node currently used by a client;
and searching a second service node which provides service and is most preferable for the client from the node relation corresponding table, and feeding back the second service node.
2. The method of claim 1, wherein the looking up a second service node providing a service and most preferred for the client from the node relationship correspondence table and feeding back the second service node comprises:
searching a service node which belongs to the same N-level region as the first service node and has the highest preferred order from the node relation corresponding table to serve as a second service node;
if not, searching a service node which belongs to the same N-1 level region as the first service node and has the highest preferred order as a second service node;
and iterating and executing the searching step until the second service node is searched.
3. The method according to claim 2, wherein the node identifier is represented by a set coding format, and the set coding format is composed of region codes of regions belonging to different levels and node codes of the service node;
the searching for the service node which belongs to the same N-level region as the first service node and has the highest preferred order as the second service node comprises:
extracting region codes corresponding to N-level regions;
and searching the service node with the highest preferred order corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node to be used as a second service node.
4. The method according to claim 3, wherein before looking up the service node with the highest preference order corresponding to the extracted region code in the node relationship correspondence table corresponding to the first service node, the method further comprises:
and converting the node identification of each service node into a set coding format.
5. The method of claim 1, wherein the preset node relationship correspondence table comprises:
respectively presetting a node relation corresponding table aiming at each node service provider;
before the looking up a second service node providing a service and most preferred for the client from the node relation correspondence table, the method further comprises:
determining a node service provider to which the first service node belongs;
and searching a node relation corresponding table corresponding to the determined node service provider.
6. The method of claim 1, wherein prior to the feeding back the second serving node, the method further comprises:
and testing the second service node to be in a normal operation state.
7. The method of claim 1, wherein the method further comprises:
deleting the first service node from the node relation corresponding table;
adding the first service node to an abnormal node list, and periodically detecting whether each service node in the abnormal node list is in a normal operation state;
and if detecting that a certain target service node in the abnormal node list is in a normal operation state, deleting the target service node from the abnormal node list, and adding the target service node to the node relation corresponding table.
8. The method of claim 1, wherein the method further comprises:
adding an abnormal mark to the first service node in the node relation corresponding table;
the searching the second service node which provides the service and is most preferred for the client from the node relation corresponding table comprises:
and searching a most preferable second service node for the client from the service nodes which are not added with the abnormal marks in the node relation corresponding table.
9. The method of claim 1, wherein prior to the receiving a handover request for a currently used first serving node, the method further comprises:
and allocating a first service node for the client according to the scheduling request of the client.
10. The method of claim 9, wherein the allocating a first service node to a client according to a scheduling request of the client comprises:
extracting the network address of the client, and searching a network address set to which the network address belongs;
and determining the geographical area and the service node supplier to which the client belongs according to the network address set.
11. A switching apparatus of a service node, comprising:
the system comprises a corresponding table presetting module, a node relation corresponding table and a service node selection module, wherein the corresponding table presetting module is used for presetting a node relation corresponding table, node identifications marking multi-level regions to which service nodes belong are stored in the node relation corresponding table, and the preference order of each service node in each level region aiming at a client in each service node region;
the request receiving module is used for receiving a switching request of a first service node currently used by a client;
and the node searching module is used for searching a second service node which provides service and is most preferable for the client from the node relation corresponding table and feeding back the second service node.
12. The apparatus of claim 11, wherein the node lookup module comprises:
the first searching submodule is used for searching the service node which belongs to the same N-level region with the first service node and has the highest preferred order from the node relation corresponding table to be used as a second service node;
the second searching submodule is used for searching the service node which belongs to the same N-1 level region with the first service node and has the highest preferred order as a second service node if the service node is not searched;
and the search iteration submodule is used for iteratively executing the search step until the second service node is searched.
13. The apparatus according to claim 12, wherein the node identifier is represented by a set coding format, and the set coding format is composed of a region code of a region belonging to each level and a node code of the service node;
the first lookup sub-module includes:
the code extraction subunit is used for extracting the region codes corresponding to the N-level regions;
and the node searching subunit is used for searching the service node with the highest priority corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node, and using the service node as a second service node.
14. The apparatus of claim 13, wherein the apparatus further comprises:
and the format conversion module is used for converting the node identifier of each service node into a set coding format before searching the service node with the highest preferred order corresponding to the extracted region code in the node relation corresponding table corresponding to the first service node.
15. The apparatus of claim 11, wherein the correspondence table presetting module comprises:
the corresponding table presetting submodule is used for respectively presetting a node relation corresponding table aiming at each node service provider;
the device further comprises:
a provider determining module, configured to determine a node service provider to which the first service node belongs before the second service node that provides a service and is most preferable for the client is searched in the node relationship correspondence table;
and the corresponding table searching module is used for searching the corresponding table of the node relation corresponding to the determined node service provider.
16. The apparatus of claim 11, wherein the apparatus further comprises:
and the state testing module is used for testing that the second service node is in a normal operation state before the second service node is fed back.
17. The apparatus of claim 11, wherein the apparatus further comprises:
a node deleting module, configured to delete the first service node from the node relationship correspondence table;
the node list adding module is used for adding the first service node to an abnormal node list and periodically detecting whether each service node in the abnormal node list is in a normal operation state or not;
and the recovery module is used for deleting the target service node from the abnormal node list and adding the target service node to the node relation corresponding table if detecting that a certain target service node in the abnormal node list is in a normal operation state.
18. The apparatus of claim 11, wherein the apparatus further comprises:
an exception marking module, configured to add an exception mark to the first service node in the node relationship correspondence table;
the node searching module comprises:
and the node searching submodule is used for searching a second service node which is most preferable for the client from the service nodes which are not added with the abnormal marks in the node relation corresponding table.
19. The apparatus of claim 11, wherein the apparatus further comprises:
and the node allocation module is used for allocating the first service node to the client according to the scheduling request of the client before receiving the switching request of the currently used first service node.
20. The apparatus of claim 19, wherein the node assignment module comprises:
the address extraction submodule is used for extracting the network address of the client and searching a network address set to which the network address belongs;
and the supplier determining submodule is used for determining the geographical area to which the client belongs and the service node supplier according to the network address set.
CN201710003225.6A 2017-01-03 2017-01-03 Service node switching method and device Active CN106686102B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710003225.6A CN106686102B (en) 2017-01-03 2017-01-03 Service node switching method and device
PCT/CN2017/119879 WO2018127005A1 (en) 2017-01-03 2017-12-29 Switching method and device of service node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710003225.6A CN106686102B (en) 2017-01-03 2017-01-03 Service node switching method and device

Publications (2)

Publication Number Publication Date
CN106686102A CN106686102A (en) 2017-05-17
CN106686102B true CN106686102B (en) 2020-04-14

Family

ID=58849236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710003225.6A Active CN106686102B (en) 2017-01-03 2017-01-03 Service node switching method and device

Country Status (2)

Country Link
CN (1) CN106686102B (en)
WO (1) WO2018127005A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981459B (en) * 2019-02-28 2021-02-19 联想(北京)有限公司 Information sending method, client and computer readable storage medium
CN110308983B (en) * 2019-04-19 2022-04-05 中国工商银行股份有限公司 Resource load balancing method and system, service node and client
CN110753250B (en) * 2019-10-30 2022-02-01 烽火通信科技股份有限公司 Nearby scheduling method and system of content distribution network
CN110853312A (en) * 2019-11-13 2020-02-28 四川虹广网络科技有限公司 Alarm receiving and processing method for multi-stage linkage alarm, terminal and computer readable storage medium
CN111265853B (en) * 2020-01-20 2023-10-17 咪咕互动娱乐有限公司 Game platform switching method, game platform switching device, server and storage medium
CN114726764A (en) * 2022-06-08 2022-07-08 广东迅维信息产业股份有限公司 Business service disaster recovery method and system
CN116566805B (en) * 2023-07-10 2023-09-26 中国人民解放军国防科技大学 System disaster-tolerant and anti-destruction oriented node cross-domain scheduling method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986764A (en) * 2010-10-20 2011-03-16 新疆智翔科技有限公司 Internet of things-based multi-source data connection system
CN102387068A (en) * 2011-09-29 2012-03-21 中国人民解放军国防科学技术大学 Extensible routing method and router of identification network
CN102404390A (en) * 2011-11-07 2012-04-04 广东电网公司电力科学研究院 Intelligent dynamic load balancing method for high-speed real-time database
CN102523114A (en) * 2011-12-15 2012-06-27 深圳市同洲视讯传媒有限公司 Media server disaster recovery method, media access gateway and system
CN104506372A (en) * 2015-01-04 2015-04-08 中国联合网络通信集团有限公司 Method and system for realizing host-backup server switching
CN105119997A (en) * 2015-08-31 2015-12-02 广州市优普计算机有限公司 Data processing method of cloud computing system
CN105959413A (en) * 2016-06-30 2016-09-21 上海智臻智能网络科技股份有限公司 Network proxy method and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8582584B2 (en) * 2005-10-04 2013-11-12 Time Warner Cable Enterprises Llc Self-monitoring and optimizing network apparatus and methods
CN101414975A (en) * 2008-11-28 2009-04-22 中兴通讯股份有限公司 Method and apparatus for service node selection based on peer-to-peer network, index entity
CN101931656B (en) * 2010-09-16 2012-11-21 武汉大学 ISP-friendly distributed service node selection and update method
CN102316488A (en) * 2011-09-29 2012-01-11 北京傲天动联技术有限公司 Integrated access point topology management method
CN104753968B (en) * 2013-12-25 2018-01-09 中国电信股份有限公司 Cloud computing cross-region multiple data centers and its schedule management method
CN104980363A (en) * 2014-04-10 2015-10-14 赵正健 Terminal, method executed by the same, terminal event processing method and control system
CN104717304B (en) * 2015-03-31 2018-04-03 北京科技大学 A kind of CDN P2P content optimizations select system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986764A (en) * 2010-10-20 2011-03-16 新疆智翔科技有限公司 Internet of things-based multi-source data connection system
CN102387068A (en) * 2011-09-29 2012-03-21 中国人民解放军国防科学技术大学 Extensible routing method and router of identification network
CN102404390A (en) * 2011-11-07 2012-04-04 广东电网公司电力科学研究院 Intelligent dynamic load balancing method for high-speed real-time database
CN102523114A (en) * 2011-12-15 2012-06-27 深圳市同洲视讯传媒有限公司 Media server disaster recovery method, media access gateway and system
CN104506372A (en) * 2015-01-04 2015-04-08 中国联合网络通信集团有限公司 Method and system for realizing host-backup server switching
CN105119997A (en) * 2015-08-31 2015-12-02 广州市优普计算机有限公司 Data processing method of cloud computing system
CN105959413A (en) * 2016-06-30 2016-09-21 上海智臻智能网络科技股份有限公司 Network proxy method and system

Also Published As

Publication number Publication date
WO2018127005A1 (en) 2018-07-12
CN106686102A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
CN106686102B (en) Service node switching method and device
CN108055264B (en) Scheduling apparatus and method for push streaming server, and computer-readable storage medium
CN110247999B (en) Domain name resolution method, domain name resolution device, household appliance and storage medium
CN110677405B (en) Data processing method and device, electronic equipment and storage medium
CN111555963B (en) Message pushing method and device, electronic equipment and storage medium
CN102523314B (en) Identify the method and apparatus of efficient destination server
CN106657371B (en) Scheduling method and device for transmission node
CN109981795B (en) Resource request scheduling method and device
CN111399756B (en) Data storage method, data downloading method and device
CN105430110A (en) Container configuration method and network transmission device of virtual network system
CN111182089A (en) Container cluster system, method and device for accessing big data assembly and server
CN110677492B (en) Access request processing method and device, electronic equipment and storage medium
CN106686101B (en) Method and device for scheduling transmission cluster of streaming data
CN103262503A (en) Node selection in a packet core network
CN106790593B (en) Page processing method and device
CN112217856A (en) Address acquisition method, device, equipment and storage medium of application example
CN108040009B (en) Data directional transmission method, data directional transmission control device and computer readable storage medium
CN105653945A (en) Information processing method and device based on blacklist and electronic equipment
CN112543212B (en) System for providing request response exact communication delay guarantee for distributed service
CN108174147B (en) Automatic optimization allocation method for video source and tracking server in video monitoring system
CN108063685B (en) Log analysis method and device
CN104639550A (en) User identification method and equipment
CN116132377A (en) Traffic scheduling method, device, system, terminal equipment and readable storage medium
CN105357329A (en) Business data transmission method, device and system for use in cross-Internet data center (IDC) network environment
CN104123313A (en) Method for obtaining visitor guiding information and server

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