CN109150720B - Service chain message forwarding method, device, equipment and computer readable storage medium - Google Patents

Service chain message forwarding method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109150720B
CN109150720B CN201710472256.6A CN201710472256A CN109150720B CN 109150720 B CN109150720 B CN 109150720B CN 201710472256 A CN201710472256 A CN 201710472256A CN 109150720 B CN109150720 B CN 109150720B
Authority
CN
China
Prior art keywords
service
service chain
chain
abstract
forwarding
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
CN201710472256.6A
Other languages
Chinese (zh)
Other versions
CN109150720A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710472256.6A priority Critical patent/CN109150720B/en
Publication of CN109150720A publication Critical patent/CN109150720A/en
Application granted granted Critical
Publication of CN109150720B publication Critical patent/CN109150720B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]

Abstract

The invention discloses a service chain message forwarding method, which comprises the following steps: receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message; determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain; searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain; and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information. The invention also discloses a service chain message forwarding device, equipment and a computer readable storage medium. The invention can improve the message forwarding efficiency of the service chain system.

Description

Service chain message forwarding method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for forwarding a service chain packet, and a computer-readable storage medium.
Background
A data stream is processed sequentially by a series of network Service nodes, which are called Service Function Chains (SFCs), and a Service Chain system includes a classifier, a Service Function repeater, a Service node, a Service Function agent, and other functional nodes. The arrangement of the service chain path comprises two logic levels: abstract business chains and concrete business chains. The abstract business chain refers to a conceptual business chain without instantiation, such as arranging a business chain containing firewall business functions; the concrete business chain refers to a physical business chain which is already instantiated. In consideration of specification, flow, disaster tolerance and the like, an abstract service chain is instantiated into a plurality of concrete service chains, and load sharing is performed between the concrete service chains under the same abstract service chain.
In the prior art, the abstract Service chain and the concrete Service chain both use SPI (Service Path ID, Service chain identifier) for unique identification, but the SPIs of the abstract Service chain and the concrete Service chain do not have relevance, so that when packet forwarding is performed, nodes in the Service chain system can know the relevance between the abstract Service chain and the concrete Service chain and then complete data forwarding only by additionally arranging and issuing a relevance parameter, which undoubtedly increases the complexity of system processing and reduces the system processing efficiency.
Disclosure of Invention
The invention mainly aims to provide a service chain message forwarding method, a service chain message forwarding device, service chain message forwarding equipment and a computer readable storage medium, and aims to improve the message forwarding efficiency of a service chain system.
In order to achieve the above object, the present invention provides a service chain packet forwarding method, which includes the following steps:
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
Preferably, before the step of receiving a service packet sent by an upstream service node and identifying a service type corresponding to the service packet, the method further includes:
setting a service path identifier of an abstract service chain;
instantiating the abstract service chain into a plurality of concrete service chains, and setting a service path identifier of each concrete service chain, wherein the service path identifier of each concrete service chain comprises the service path identifier of the abstract service chain;
and storing the setting result into a service chain mapping table.
Preferably, the service path identifier of the specific service chain further includes a flag bit, and the flag bit is used to identify the method for generating the service path identifier of the specific service chain.
Preferably, the step of acquiring the service chain information of the specific service chain and forwarding the service packet to the next-hop service node of the current service node according to the service chain information includes:
when a plurality of specific service chains are found, acquiring a preset weight value of each found specific service chain;
and forwarding the service packet to a next hop service node of the current service node according to the preset weight value.
Preferably, the step of forwarding the service packet to a next hop service node of the current service node according to the preset weight value includes:
selecting the specific service chain with the maximum preset weight value as a first target service chain;
and forwarding the service packet to a next hop service node of the current service node according to the first target service chain.
Preferably, the step of acquiring the service chain information of the specific service chain and forwarding the service packet to the next-hop service node of the current service node according to the service chain information includes:
when a plurality of specific service chains are found, acquiring a preset instance number of each found specific service chain, wherein the instance number is used for representing an instantiation ordinal number of the specific service chain;
and forwarding the service packet to a next hop service node of the current service node according to the instance number.
Preferably, the step of forwarding the service packet to the next-hop service node of the current service node according to the instance number includes:
determining the priority of the specific service chain according to the size of the instance number;
selecting a specific service chain with the highest priority as a second target service chain;
and forwarding the service packet to a next hop service node of the current service node according to the second target service chain.
In addition, to achieve the above object, the present invention further provides a service chain packet forwarding apparatus, where the service chain packet forwarding apparatus includes:
the receiving module is used for receiving a service message sent by an upstream service node and identifying a service type corresponding to the service message;
the determining module is used for determining an abstract service chain corresponding to the service type and acquiring a service path identifier of the abstract service chain;
the searching module is used for searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and the forwarding module is used for acquiring the service chain information of the specific service chain and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
In addition, to achieve the above object, the present invention further provides a service chain packet forwarding device, where the service chain packet forwarding device includes: the system comprises a memory, a processor and a service chain message forwarding program which is stored on the memory and can run on the processor, wherein when the service chain message forwarding program is executed by the processor, the following steps are realized:
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, where a service chain packet forwarding program is stored, and the service chain packet forwarding program, when executed by a processor, implements the following steps:
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
The invention receives a service message sent by an upstream service node, and identifies the service type corresponding to the service message; determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain; searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain; and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information. Compared with the prior art, the method and the device have the advantages that the incidence relation between the abstract service chain and the concrete service chain is directly written into the service path identifier, so that the concrete service chain corresponding to the abstract service chain can be quickly determined by the current service node according to the service path identifier when the message is forwarded, and the message forwarding efficiency of a service chain system is improved.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a service chain message forwarding method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a service chain packet forwarding method according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating a service chain packet forwarding method according to a third embodiment of the present invention;
fig. 5 is a schematic flow chart of a service chain message forwarding method according to a fourth embodiment of the present invention;
fig. 6 is a schematic functional module diagram of a service chain packet forwarding apparatus according to an embodiment of the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message; determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain; searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain; and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
In the prior art, the abstract Service chain and the concrete Service chain both use SPI (Service Path ID, Service chain identifier) for unique identification, but the SPIs of the abstract Service chain and the concrete Service chain do not have relevance, so that when packet forwarding is performed, nodes in the Service chain system can know the relevance between the abstract Service chain and the concrete Service chain and then complete data forwarding only by additionally arranging and issuing a relevance parameter, which undoubtedly increases the complexity of system processing and reduces the system processing efficiency.
According to the invention, the incidence relation between the abstract service chain and the concrete service chain is directly written into the service path identifier, so that when the message is forwarded, the current service node can quickly determine the concrete service chain corresponding to the abstract service chain according to the service path identifier, and the message forwarding efficiency of the service chain system is improved.
The invention provides a service chain message forwarding method.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
The service chain message forwarding device in the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, a portable computer, and the like.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the device architecture shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a service chain message forwarding program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the service chain packet forwarding program stored in the memory 1005, and perform the following operations:
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
Further, the processor 1001 may call the service chain packet forwarding program stored in the memory 1005, and further perform the following operations:
setting a service path identifier of an abstract service chain;
instantiating the abstract service chain into a plurality of concrete service chains, and setting a service path identifier of each concrete service chain, wherein the service path identifier of each concrete service chain comprises the service path identifier of the abstract service chain;
and storing the setting result into a service chain mapping table.
Further, the service path identifier of the specific service chain further includes a flag bit, and the flag bit is used to identify the method for generating the service path identifier of the specific service chain.
Further, the processor 1001 may call the service chain packet forwarding program stored in the memory 1005, and further perform the following operations:
when a plurality of specific service chains are found, acquiring a preset weight value of each found specific service chain;
and forwarding the service packet to a next hop service node of the current service node according to the preset weight value.
Further, the processor 1001 may call the service chain packet forwarding program stored in the memory 1005, and further perform the following operations:
selecting the specific service chain with the maximum preset weight value as a first target service chain;
and forwarding the service packet to a next hop service node of the current service node according to the first target service chain.
Further, the processor 1001 may call the service chain packet forwarding program stored in the memory 1005, and further perform the following operations:
when a plurality of specific service chains are found, acquiring a preset instance number of each found specific service chain, wherein the instance number is used for representing an instantiation ordinal number of the specific service chain;
and forwarding the service packet to a next hop service node of the current service node according to the instance number.
Further, the processor 1001 may call the service chain packet forwarding program stored in the memory 1005, and further perform the following operations:
determining the priority of the specific service chain according to the size of the instance number;
selecting a specific service chain with the highest priority as a second target service chain;
and forwarding the service packet to a next hop service node of the current service node according to the second target service chain.
Based on the hardware structure, the embodiment of the service chain message forwarding method is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a service chain packet forwarding method of the present invention, where the service chain packet forwarding method includes:
step S10, receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
in this embodiment, the service node in the service chain system forwards the service chain packet. Firstly, a current service node receives a service message sent by an upstream service node, and identifies a service type corresponding to the received service message.
Specifically, the current service node may identify a service type corresponding to the service packet through a preset service policy, where the preset service policy includes the service type and packet characteristic information corresponding to the service type, and the service type may include accessing a web page, accessing a database, accessing a server, and the like according to different service requirements. Taking the last service node of the current service node as the user equipment as an example, the user equipment firstly receives a user instruction and generates a corresponding service message, the current service node receives the service message sent by the user equipment and analyzes the received service message so as to obtain characteristic information such as a user level, an access type and a wireless network state, and then service strategy matching is carried out according to the characteristic information so as to identify the corresponding service type.
Step S20, determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
after identifying the service type of the service message, the current service node determines an abstract service chain corresponding to the service type, and obtains a service path identifier of the abstract service chain.
In this embodiment, the abstract service chain refers to a conceptual service chain without instantiation, and the service Path identifier is an spi (service Path id) used to uniquely identify one service chain. The manager can pre-arrange the service chain according to the actual service requirement, set the abstract service chain and the service path identifier of the abstract service chain according to different service types, then send the service chain arrangement information to and store in the service chain node, and after the service chain node identifies the service type of the service message, the service chain node can determine the abstract service chain and the service path identifier of the abstract service chain corresponding to the service type according to the service chain arrangement information.
Step S30, searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
after the service path identifier of the abstract service chain is obtained, a preset service chain mapping table is searched according to the service path identifier, and a concrete service chain corresponding to the abstract service chain is obtained.
In this embodiment, the service chain mapping table is pre-arranged by a service chain arranging device in the service node, and the service chain mapping table includes a mapping relationship between an abstract service chain and a specific service chain, where the mapping relationship is implemented by a service path identifier. In an embodiment, a service path identifier of an abstract service chain may be preset, and then a service path identifier of a specific service chain under the abstract service chain is set, where the service path identifier of the specific service chain includes a service path identifier of the abstract service chain to which the specific service chain belongs, so that when the service path identifier of the abstract service chain is known, a service path identifier of the specific service chain that is the same as the service path identifier of the abstract service chain may be searched from a service chain mapping table, thereby obtaining the specific service chain corresponding to the abstract service chain.
Step S40, obtaining the service chain information of the specific service chain, and forwarding the service packet to the next-hop service node of the current service node according to the service chain information.
Then, the current service node acquires service chain information of the specific service chain, where the service chain information may include a service path identifier of the specific service chain, included service nodes, a sequence relationship of the service nodes, a service chain weight, a service chain instance number, and the like, and similarly, the service chain information of the specific service chain may also be acquired by pre-arranging.
After the service chain information of the specific service chain is acquired, the current service node can determine the next hop service node of the current service node, so that the service message is forwarded. There are two cases at this time: when only one specific service chain is found, the current service node can directly forward the service packet to the next hop service node of the current service node according to the service chain information of the specific service chain; when there are multiple found specific service chains, preset weight values of the multiple specific service chains can be compared, and a specific service chain with a higher weight value is selected for forwarding the service message, or a specific service chain with a higher priority can be preferentially selected for forwarding the service message according to preset priorities of the multiple specific service chains, and flexible setting can be performed in specific implementation.
When a service message is forwarded, a current service node encapsulates a service path identifier of a specific service chain into the service message, when a next hop service node receives the service message, the service path identifier of the specific service chain in the service message is analyzed, then a service chain mapping table is searched to determine an abstract service chain to which the specific service chain belongs, and further the next hop service node can be continuously determined, so that smooth transmission of the service message in the service chain is ensured.
In this embodiment, a current service node receives a service packet sent by an upstream service node, and identifies a service type corresponding to the service packet; determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain; searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain; and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information. Compared with the prior art, the embodiment directly writes the incidence relation between the abstract service chain and the concrete service chain into the service path identifier, so that when the message is forwarded, the current service node can quickly determine the concrete service chain corresponding to the abstract service chain according to the service path identifier, and the message forwarding efficiency of the service chain system is improved.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a service chain packet forwarding method according to a second embodiment of the present invention. Based on the above embodiment shown in fig. 2, before step S10, the method may further include:
step S50, setting up the service path identification of abstract service chain;
step S60, instantiating the abstract service chain into a plurality of concrete service chains, and setting a service path identifier of each concrete service chain, where the service path identifier of each concrete service chain includes the service path identifier of the abstract service chain;
and step S70, storing the setting result into the service chain mapping table.
In this embodiment, a service chain arrangement device of a service node performs arrangement of a service chain mapping table, and the service chain arrangement device can receive a setting instruction of a manager, and first sets a service path identifier of an abstract service chain, and then instantiates the abstract service chain. After the abstract service chain is instantiated into a plurality of concrete service chains, the service path identifier of each concrete service chain is set, wherein the service path identifier of each concrete service chain should include the service path identifier of the abstract service chain, so that the concrete service chain under the abstract service chain or the abstract service chain to which the concrete service chain belongs can be identified quickly through the service path identifier. After the setting is completed, the service chain arranging device stores the setting result into the service chain mapping table so as to facilitate the subsequent searching.
Further, the service path identifier of the specific service chain further includes a flag bit, and the flag bit is used to identify the method for generating the service path identifier of the specific service chain.
In an actual service chain system, besides the generation manner of the service path identifier of the specific service chain provided by the present invention, there may be other manners to generate the service path identifier of the specific service chain, for example, the service path identifier of the specific service chain is not generated according to the service path identifier of the abstract service chain, therefore, in this embodiment, an identifier bit may be set in the service path identifier of the specific service chain, and the identifier bit is used to identify the generation method of the service path identifier of the specific service chain of the present invention, for example, when the identifier bit is 1, it may indicate that the SPI of the abstract service chain is encapsulated in the SPI of the specific service chain, and when the identifier bit is 0, it may indicate that the SPI of the abstract service chain is not encapsulated in the SPI of the specific service chain, so that the service node can distinguish the generation manner of the service path identifier of the specific service chain of the present invention from other generation manners according to the identifier bit, therefore, the subsequent process of searching for the concrete service chain through the service path identifier of the abstract service chain can be ensured to be smoothly carried out.
Further, referring to fig. 4, fig. 4 is a flowchart illustrating a service chain packet forwarding method according to a third embodiment of the present invention. Based on the first embodiment or the second embodiment of the service chain message forwarding method of the present invention, step S40 may include:
step S41, when a plurality of specific service chains are found, acquiring a preset weight value of each found specific service chain;
step S42, forwarding the service packet to a next hop service node of the current service node according to the preset weight value.
In this embodiment, when a plurality of specific service chains are found, the current service node first obtains a preset weight value of each found specific service chain, and then forwards the service packet to the next-hop service node of the current service node according to the weight value of each specific service chain. The weight value is used for representing the load capacity of a specific service chain, and the higher the load capacity is, the larger the weight value is, the purpose of setting the weight value is to implement load balancing, for example, when a plurality of specific service chains exist, the specific service chain with the higher weight value can be preferentially selected for data forwarding, or a service packet is distributed to different specific service chains for forwarding according to the weight value, so that the condition that a service chain link point is idle or overloaded can be avoided, and effective utilization of service chain resources is ensured.
Further, as an embodiment, the step S42 may include:
step S421, selecting the specific service chain with the maximum preset weight value as a first target service chain;
step S422, the service packet is forwarded to the next hop service node of the current service node according to the first target service chain.
The current service node may select a specific service chain with the largest preset weight value as a first target service chain, and then determine a next hop service node for forwarding the service packet according to the first target service chain and forward the service packet. It should be noted that, before forwarding the packet, the current service node may detect whether a next hop service node is available, if so, determine whether a fault occurs, and forward the service packet, if not, reselect a target service chain according to a preset weight value to forward the service packet.
As another embodiment, the current service node may also allocate the service packet to different specific service chains for forwarding according to a preset weight value, for example, if two specific service chains exist under a certain abstract service chain, and the weights of the two specific service chains are both 0.5, the current service node may equally allocate the service packet to the two specific service chains, and further forward the service packet to the next-hop service nodes corresponding to the two specific service chains, thereby implementing load balancing.
Further, referring to fig. 5, fig. 5 is a flowchart illustrating a service chain packet forwarding method according to a fourth embodiment of the present invention. Based on the first embodiment or the second embodiment of the service chain message forwarding method of the present invention, step S40 may further include:
step S43, when a plurality of specific service chains are found, acquiring a preset instance number of each found specific service chain, wherein the instance number is used for representing an instantiation ordinal number of the specific service chain;
step S44, forwarding the service packet to a next hop service node of the current service node according to the instance number.
In this embodiment, when a plurality of specific service chains are found, the current service node first obtains a preset instance number of each found specific service chain, and then forwards the service packet to the next-hop service node of the current service node according to the instance number. The instance number is used to represent an instantiation ordinal number of a concrete service chain, for example, an abstract service chain including a firewall function is instantiated into two concrete service chains, the instance numbers are 1 and 2, and 1 and 2 are instantiation ordinals.
Further, step S44 may include:
step S441, determining the priority of the specific service chain according to the size of the instance number;
step S442, selecting a specific service chain with the highest priority as a second target service chain;
step S443, forwarding the service packet to a next hop service node of the current service node according to the second target service chain.
Specifically, the current service node may determine the priority of the specific service chain according to the size of the instance number, for example, the priority order is determined according to the order from small to large of the instance number, the smaller the instance number is, the higher the priority is, the current service node selects a specific service chain with the highest priority as the second target service chain, and then determines the next-hop service node for forwarding the service packet according to the second target service chain and forwards the service packet. Similarly, before forwarding the message, the current service node may detect whether the next hop service node is available, if so, forward the service message, and if not, may reselect a target service chain according to the instance number to forward the service message.
In this embodiment, the current service node can obtain the instantiation ordinal number of the specific service chain through the instance number of the specific service chain, so that the message forwarding is performed according to the instantiation ordinal number by selecting a suitable specific service chain, thereby ensuring the smooth performance of the message forwarding process.
The invention also provides a service chain message forwarding device.
Referring to fig. 6, fig. 6 is a functional module schematic diagram of an embodiment of a service chain message forwarding apparatus of the present invention. The service chain message forwarding device of the invention comprises:
a receiving module 10, configured to receive a service packet sent by an upstream service node, and identify a service type corresponding to the service packet;
in this embodiment, the service node in the service chain system forwards the service chain packet. First, the receiving module 10 receives a service packet sent by an upstream service node, and identifies a service type corresponding to the received service packet.
Specifically, the receiving module 10 may identify a service type corresponding to the service packet through a preset service policy, where the preset service policy includes the service type and packet characteristic information corresponding to the service type, and the service type may include accessing a web page, accessing a database, accessing a server, and the like according to different service requirements. Taking the last service node of the current service node as the user equipment as an example, the user equipment firstly receives a user instruction and generates a corresponding service message, the receiving module 10 receives the service message sent by the user equipment and analyzes the received service message so as to obtain characteristic information such as a user level, an access type and a wireless network state, and then service policy matching is performed according to the characteristic information so as to identify the corresponding service type.
A determining module 20, configured to determine an abstract service chain corresponding to the service type, and obtain a service path identifier of the abstract service chain;
after the receiving module 10 identifies the service type of the service packet, the determining module 20 determines an abstract service chain corresponding to the service type, and obtains a service path identifier of the abstract service chain.
In this embodiment, the abstract service chain refers to a conceptual service chain without instantiation, and the service Path identifier is an spi (service Path id) used to uniquely identify one service chain. A manager may perform service chain arrangement in advance according to actual service needs, set an abstract service chain and a service path identifier of the abstract service chain according to different service types, then issue and store service chain arrangement information in a service chain node, and after the receiving module 10 identifies a service type of a service packet, the determining module 20 may determine the service path identifier of the abstract service chain and the abstract service chain corresponding to the service type according to the service chain arrangement information.
The searching module 30 is configured to search a preset service chain mapping table according to the service path identifier of the abstract service chain, so as to obtain a specific service chain corresponding to the abstract service chain;
after the service path identifier of the abstract service chain is obtained, the searching module 30 searches a preset service chain mapping table according to the service path identifier to obtain a specific service chain corresponding to the abstract service chain.
In this embodiment, the service chain mapping table is pre-arranged by a service chain arranging device in the service node, and the service chain mapping table includes a mapping relationship between an abstract service chain and a specific service chain, where the mapping relationship is implemented by a service path identifier. In an embodiment, a service path identifier of an abstract service chain may be preset, and then a service path identifier of a specific service chain under the abstract service chain is set, where the service path identifier of the specific service chain includes a service path identifier of the abstract service chain to which the specific service chain belongs, so that when the service path identifier of the abstract service chain is known, the lookup module 30 may lookup a service path identifier of the specific service chain that is the same as the service path identifier of the abstract service chain from a service chain mapping table, thereby obtaining the specific service chain corresponding to the abstract service chain.
And the forwarding module 40 is configured to acquire service chain information of the specific service chain, and forward the service packet to a next-hop service node of the current service node according to the service chain information.
Then, the forwarding module 40 obtains service chain information of a specific service chain, where the service chain information may include a service path identifier of the specific service chain, included service nodes, a sequence relationship of the service nodes, a service chain weight, a service chain instance number, and the like, and similarly, the service chain information of the specific service chain may also be obtained by pre-arranging.
After the service chain information of the specific service chain is acquired, the forwarding module 40 may determine the next hop service node of the current service node, so as to forward the service packet. There are two cases at this time: when only one specific service chain is found, the forwarding module 40 may directly forward the service packet to the next-hop service node of the current service node according to the service chain information of the specific service chain; when there are multiple found specific service chains, the forwarding module 40 may compare preset weighted values of the multiple specific service chains, and select a specific service chain with a higher weighted value for forwarding the service packet, or preferentially select a specific service chain with a higher priority for forwarding the service packet according to a preset priority of the multiple specific service chains, which may be flexibly set in specific implementation.
When forwarding a service message, the forwarding module 40 encapsulates a service path identifier of a specific service chain into the service message, when receiving the service message, a next-hop service node parses the service path identifier of the specific service chain in the service message, then searches a service chain mapping table to determine an abstract service chain to which the specific service chain belongs, and further can continuously determine the next-hop service node, thereby ensuring smooth transmission of the service message in the service chain.
In this embodiment, the receiving module 10 receives a service packet sent by an upstream service node, and identifies a service type corresponding to the service packet; the determining module 20 determines an abstract service chain corresponding to the service type, and obtains a service path identifier of the abstract service chain; the searching module 30 searches a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a specific service chain corresponding to the abstract service chain; the forwarding module 40 obtains the service chain information of the specific service chain, and forwards the service packet to the next-hop service node of the current service node according to the service chain information. Compared with the prior art, the embodiment directly writes the incidence relation between the abstract service chain and the concrete service chain into the service path identifier, so that when the message is forwarded, the current service node can quickly determine the concrete service chain corresponding to the abstract service chain according to the service path identifier, and the message forwarding efficiency of the service chain system is improved.
The invention also provides a service chain message forwarding device.
The service chain message forwarding equipment comprises: the system comprises a memory, a processor and a service chain message forwarding program which is stored on the memory and can run on the processor, wherein when the service chain message forwarding program is executed by the processor, the following steps are realized:
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
The method implemented when the service chain packet forwarding program running on the processor is executed may refer to each embodiment of the service chain packet forwarding method of the present invention, and is not described herein again.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a service chain message forwarding program, and the service chain message forwarding program, when executed by a processor, implements the steps of:
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
The method implemented when the service chain packet forwarding program running on the processor is executed may refer to each embodiment of the service chain packet forwarding method of the present invention, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for forwarding a service chain message is characterized in that the method for forwarding the service chain message comprises the following steps:
setting a service path identifier of an abstract service chain;
instantiating the abstract service chain into a plurality of concrete service chains, and setting a service path identifier of each concrete service chain, wherein the service path identifier of each concrete service chain comprises the service path identifier of the abstract service chain;
storing the setting result into a service chain mapping table;
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
2. The method for forwarding a service chain packet according to claim 1, wherein the service path identifier of the specific service chain further includes a flag bit, and the flag bit is used to indicate whether the service path identifier of the abstract service chain is encapsulated in the service path identifier of the specific service chain.
3. The method for forwarding a service chain packet according to claim 1 or 2, wherein the step of obtaining the service chain information of the specific service chain and forwarding the service packet to the next-hop service node of the current service node according to the service chain information comprises:
when a plurality of specific service chains are found, acquiring a preset weight value of each found specific service chain;
and forwarding the service packet to a next hop service node of the current service node according to the preset weight value.
4. The method for forwarding service chaining packets according to claim 3, wherein the step of forwarding the service packet to the next-hop service node of the current service node according to the preset weight value comprises:
selecting the specific service chain with the maximum preset weight value as a first target service chain;
and forwarding the service packet to a next hop service node of the current service node according to the first target service chain.
5. The method for forwarding service chain packet according to claim 1 or 2, wherein the step of obtaining the service chain information of the specific service chain and forwarding the service packet to the next-hop service node of the current service node according to the service chain information comprises:
when a plurality of specific service chains are found, acquiring a preset instance number of each found specific service chain, wherein the instance number is used for representing an instantiation ordinal number of the specific service chain;
and forwarding the service packet to a next hop service node of the current service node according to the instance number.
6. The service chain packet forwarding method according to claim 5, wherein the step of forwarding the service packet to the next-hop service node of the current service node according to the instance number includes:
determining the priority of the specific service chain according to the size of the instance number;
selecting a specific service chain with the highest priority as a second target service chain;
and forwarding the service packet to a next hop service node of the current service node according to the second target service chain.
7. A service chain packet forwarding apparatus, wherein the service chain packet forwarding apparatus includes:
the receiving module is used for receiving a service message sent by an upstream service node and identifying a service type corresponding to the service message;
the determining module is used for determining an abstract service chain corresponding to the service type and acquiring a service path identifier of the abstract service chain;
the searching module is used for searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain; the service chain mapping table is generated by presetting a service path identifier of an abstract service chain, instantiating the abstract service chain into a plurality of concrete service chains, setting the service path identifier of each concrete service chain, and storing a setting result, wherein the service path identifier of each concrete service chain comprises the service path identifier of the abstract service chain;
and the forwarding module is used for acquiring the service chain information of the specific service chain and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
8. A service chain packet forwarding device, wherein the service chain packet forwarding device comprises: the system comprises a memory, a processor and a service chain message forwarding program which is stored on the memory and can run on the processor, wherein when the service chain message forwarding program is executed by the processor, the following steps are realized:
setting a service path identifier of an abstract service chain;
instantiating the abstract service chain into a plurality of concrete service chains, and setting a service path identifier of each concrete service chain, wherein the service path identifier of each concrete service chain comprises the service path identifier of the abstract service chain;
storing the setting result into a service chain mapping table;
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
9. A computer-readable storage medium having a service chain packet forwarding program stored thereon, wherein the service chain packet forwarding program when executed by a processor implements the steps of:
setting a service path identifier of an abstract service chain;
instantiating the abstract service chain into a plurality of concrete service chains, and setting a service path identifier of each concrete service chain, wherein the service path identifier of each concrete service chain comprises the service path identifier of the abstract service chain;
storing the setting result into a service chain mapping table;
receiving a service message sent by an upstream service node, and identifying a service type corresponding to the service message;
determining an abstract service chain corresponding to the service type, and acquiring a service path identifier of the abstract service chain;
searching a preset service chain mapping table according to the service path identifier of the abstract service chain to obtain a concrete service chain corresponding to the abstract service chain;
and acquiring the service chain information of the specific service chain, and forwarding the service packet to a next hop service node of the current service node according to the service chain information.
CN201710472256.6A 2017-06-19 2017-06-19 Service chain message forwarding method, device, equipment and computer readable storage medium Active CN109150720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710472256.6A CN109150720B (en) 2017-06-19 2017-06-19 Service chain message forwarding method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710472256.6A CN109150720B (en) 2017-06-19 2017-06-19 Service chain message forwarding method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109150720A CN109150720A (en) 2019-01-04
CN109150720B true CN109150720B (en) 2022-04-12

Family

ID=64804638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710472256.6A Active CN109150720B (en) 2017-06-19 2017-06-19 Service chain message forwarding method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109150720B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110147378A (en) * 2019-04-02 2019-08-20 平安科技(深圳)有限公司 Verification of data method, apparatus, computer equipment and storage medium
WO2020258302A1 (en) 2019-06-28 2020-12-30 华为技术有限公司 Method, switch, and sites for data transmission
WO2024045177A1 (en) * 2022-09-02 2024-03-07 华为技术有限公司 Data message transmission method, communication apparatus and communication system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096490A (en) * 2011-11-01 2013-05-08 ***通信集团设计院有限公司 Business access method and equipment
CN103929492A (en) * 2014-04-28 2014-07-16 华为技术有限公司 Method, devices and system for load balancing of service chain
CN105471693A (en) * 2014-08-18 2016-04-06 华为技术有限公司 Packet sending method and network node
CN105577579A (en) * 2014-10-17 2016-05-11 中兴通讯股份有限公司 Protocol message processing method and system in SFC (Service Function Chaining) and service function nodes
CN105871733A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Method, device and system for processing user data packet
CN106034087A (en) * 2015-03-20 2016-10-19 中兴通讯股份有限公司 Service function chain load balancing method, device and system
CN106856619A (en) * 2015-12-08 2017-06-16 中兴通讯股份有限公司 Control cut-in method, system and gateway

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811326A (en) * 2014-01-24 2015-07-29 中兴通讯股份有限公司 Service chain management method, service chain management system, and devices
US9967175B2 (en) * 2014-02-14 2018-05-08 Futurewei Technologies, Inc. Restoring service functions after changing a service chain instance path
CN105453493B (en) * 2014-07-23 2019-02-05 华为技术有限公司 Service message retransmission method and device
CN104283806B (en) * 2014-10-31 2018-01-12 新华三技术有限公司 Business chain processing method and equipment
CN105704167B (en) * 2014-11-24 2019-06-11 华为技术有限公司 A kind of business chain processing method, equipment and system
US9762402B2 (en) * 2015-05-20 2017-09-12 Cisco Technology, Inc. System and method to facilitate the assignment of service functions for service chains in a network environment
CN106559333A (en) * 2015-09-29 2017-04-05 中兴通讯股份有限公司 Message forwarding method, business chain agent apparatus and agent equipment
CN105553714B (en) * 2015-12-14 2018-12-28 中国联合网络通信集团有限公司 A kind of method and system of business configuration
CN106130894B (en) * 2016-06-03 2019-04-19 上海华为技术有限公司 A kind of creation method and system of business function chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096490A (en) * 2011-11-01 2013-05-08 ***通信集团设计院有限公司 Business access method and equipment
CN103929492A (en) * 2014-04-28 2014-07-16 华为技术有限公司 Method, devices and system for load balancing of service chain
CN105471693A (en) * 2014-08-18 2016-04-06 华为技术有限公司 Packet sending method and network node
CN105577579A (en) * 2014-10-17 2016-05-11 中兴通讯股份有限公司 Protocol message processing method and system in SFC (Service Function Chaining) and service function nodes
CN105871733A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Method, device and system for processing user data packet
CN106034087A (en) * 2015-03-20 2016-10-19 中兴通讯股份有限公司 Service function chain load balancing method, device and system
CN106856619A (en) * 2015-12-08 2017-06-16 中兴通讯股份有限公司 Control cut-in method, system and gateway

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Neo-NSH: Towards Scalable and Efficient Dynamic Service Function Chaining of Elastic Network Functions;Sameer Kulkarni;《IEEE Xplore》;20170417;全文 *
云环境下虚拟网络动态演化管理技术研究;许力;《CNKI中国硕士论文全文数据库》;20170531;全文 *

Also Published As

Publication number Publication date
CN109150720A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
EP3116189B1 (en) Service link selection control method and device
US10080158B2 (en) Providing multiple interfaces for traffic
CN108009028B (en) Message processing method, device, equipment and computer readable storage medium
KR101562155B1 (en) Service process control method and network device
CN109150720B (en) Service chain message forwarding method, device, equipment and computer readable storage medium
CN109495492B (en) Communication system for intelligent water business industry
US20190173790A1 (en) Method and system for forwarding data, virtual load balancer, and readable storage medium
CN107818023B (en) Thread-based message processing method, intelligent device and storage medium
CN111399756A (en) Data storage method, data downloading method and device
CN106034138A (en) Remote service calling method and remote service calling device
CN111858083A (en) Remote service calling method and device, electronic equipment and storage medium
CN111193668B (en) Flow distribution method and device, computer equipment and storage medium
CN112702362B (en) Method and device for enhancing TCP/IP protocol stack, electronic equipment and storage medium
CN106330504B (en) Method for realizing application and service controller
CN111736761A (en) Data distribution method, device, storage system and computer readable storage medium
CN111556154A (en) Data transmission method, device, equipment and computer readable storage medium
CN111385360A (en) Terminal equipment identification method and device and computer readable storage medium
CN109479214B (en) Load balancing method and related device
CN109218371B (en) Method and equipment for calling data
CN110677496B (en) Middleware service scheduling method and device and readable storage medium
CN111193805B (en) Resource discovery method and device
CN113055199B (en) Gateway access method and device and gateway equipment
CN112242908B (en) Network function deployment method, system and storage medium
CN109391707B (en) Domain name resolution method, device, equipment and storage medium
CN110891028B (en) Method, device and storage medium for determining load balancing strategy

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