CN103959732B - Service message processing method, equipment and system - Google Patents

Service message processing method, equipment and system Download PDF

Info

Publication number
CN103959732B
CN103959732B CN201280002563.3A CN201280002563A CN103959732B CN 103959732 B CN103959732 B CN 103959732B CN 201280002563 A CN201280002563 A CN 201280002563A CN 103959732 B CN103959732 B CN 103959732B
Authority
CN
China
Prior art keywords
service
interface
packet
physical interface
osp
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
CN201280002563.3A
Other languages
Chinese (zh)
Other versions
CN103959732A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN103959732A publication Critical patent/CN103959732A/en
Application granted granted Critical
Publication of CN103959732B publication Critical patent/CN103959732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

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

Abstract

The embodiment of the present invention provides a kind of method for processing business, equipment and system.A kind of method for processing business includes: receive the first service message on the first physical interface;Described first service message is sent to open service platform OSP and carries out Business Processing;Receive the second service message that described OSP sends, described second service message is carried out the service application corresponding with described first physical interface;Described first physical interface or the second physical interface are sent completely the second service message of service application.Method for processing business, equipment and the system that the embodiment of the present invention provides, is used for solving in prior art, when physical layer carries out OSP Business Processing, repeating the service application configured on the physical port, the problem causing business repeated application.

Description

Service message processing method, device and system
Technical Field
The present invention relates to communications technologies, and in particular, to a method, a device, and a system for processing a service packet.
Background
An Open Service Platform (OSP) can rapidly, flexibly, efficiently and economically provide various telecommunication value-added services based on a fixed network, a data network and a mobile network, so as to meet and adapt to the capability of operators and users for perfecting the existing services and expanding new services.
In the existing network device, most of the OSP services are connected to the network layer in a side-hanging manner, and with the requirement of a user for service personalization, OSP service processing may need to be performed on the physical layer, but the OSP does not support accessing hardware resources of the network device. In the prior art, if OSP service processing is to be performed on a physical layer, a data packet is redirected to the OSP first after entering a physical interface of a network device and before being forwarded normally, and after OSP service processing is completed, the data packet returns to the same physical interface in the network device to continue forwarding.
Since the service configured on the physical interface of the network device always takes effect on the interface, when the OSP service processing is performed on the physical layer provided in the prior art, the service application configured on the physical interface of the network device is performed once before the data message is redirected to the OSP, and after the data message is subjected to the OSP service processing and returns to the physical interface of the network device, the service application configured on the physical interface of the network device is performed again, thereby causing the service to be repeatedly applied.
Disclosure of Invention
Embodiments of the present invention provide a method, a device, and a system for processing a service packet, which are used to solve the problem in the prior art that when an OSP service is processed in a physical layer, service applications configured on a physical port are repeatedly performed, resulting in repeated service applications.
In a first aspect, an embodiment of the present invention provides a method for processing a service packet, where the method includes:
receiving a first service message on a first physical interface;
sending the first service message to an Open Service Platform (OSP) for service processing;
receiving a second service message sent by the OSP, and performing service application corresponding to the first physical interface on the second service message;
and sending a second service message for completing the service application on the first physical interface or the second physical interface.
In a first possible implementation manner of the first aspect, after receiving the first service packet on the first physical interface, the method further includes:
sending the first service message to a packet receiving queue corresponding to the first physical interface;
receiving the first service message in the packet receiving queue from a first virtual interface corresponding to the first physical interface;
correspondingly, the sending of the first service packet to the OSP for service processing to obtain a second service packet specifically includes:
and sending the first service packet received on the first virtual interface to the first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface to obtain the second service packet.
According to a first possible implementation manner of the first aspect, in a second possible implementation manner, the receiving the second service packet sent by the OSP includes:
receiving the second service packet sent by the OSP through the first service interface on the first virtual interface;
correspondingly, the sending of the second service packet for completing the service application on the first physical interface or the second physical interface specifically includes:
sending the second service message with the service application completed to a first packet sending queue corresponding to the first physical interface;
and reading the second service message for completing the service application from the first packet sending queue corresponding to the first physical interface, and sending the second service message for completing the service application on the first physical interface.
According to the second possible implementation manner of the first aspect, in a third possible implementation manner, the service packet processing method further includes:
acquiring the interface state of the first physical interface;
if the interface state of the first physical interface is a stop state, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the first packet sending queue;
and if the interface state of the first physical interface is a closed state, recovering the interface resources of the first virtual interface.
According to any one of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner, before the receiving the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface, the method further includes:
allocating the first virtual interface;
and binding the first physical interface with the first virtual interface, and binding the first virtual interface with a first service interface of the OSP.
According to a first possible implementation manner of the first aspect, in a fifth possible implementation manner, the receiving the second service packet sent by the OSP includes:
receiving the second service message sent by the OSP through a second service interface on a second virtual interface;
correspondingly, the sending of the second service packet for completing the service application on the first physical interface or the second physical interface specifically includes:
sending the second service message of which the service application is finished to a second packet sending queue corresponding to the second physical interface;
and reading the second service message from the second packet sending queue corresponding to the second physical interface, and sending the second service message for completing the service application on the second physical interface.
According to a fifth possible implementation manner of the first aspect, in a sixth possible implementation manner, the service packet processing method further includes:
acquiring the interface state of the first physical interface and the interface state of the second physical interface;
if the interface state of the first physical interface and the interface state of the second physical interface are both stop states, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the second packet sending queue;
and if the interface state of the first physical interface and the interface state of the second physical interface are both closed states, recovering the interface resources of the first virtual interface and the second virtual interface.
According to a fifth possible implementation manner or a sixth possible implementation manner of the first aspect, in a seventh possible implementation manner, before the receiving the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface, the method further includes:
allocating the first virtual interface and the second virtual interface;
and binding the first physical interface with the first virtual interface, binding the first virtual interface with a first service interface of the OSP, and binding the second virtual interface with a second service interface of the OSP.
In a second aspect, an embodiment of the present invention further provides a network device, including:
the receiving module is used for receiving a first service message on a first physical interface;
a service gateway, configured to send the first service packet to an open service platform OSP for service processing, receive a second service packet sent by the OSP, and perform service application corresponding to the first physical interface on the second service packet;
and the sending module is used for sending a second service message for completing the service application on the first physical interface or the second physical interface.
In a first possible implementation manner of the second aspect, the service gateway is specifically configured to send the first service packet to a packet receiving queue corresponding to the first physical interface, receive the first service packet in the packet receiving queue from a first virtual interface corresponding to the first physical interface, and send the first service packet received on the first virtual interface to a first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface to obtain the second service packet, receiving, on the first virtual interface, the second traffic packet sent by the OSP through the first traffic interface, performing service application corresponding to the first physical interface on the second service message, and sending the second service message with the service application completed to a first packet sending queue corresponding to the first physical interface;
the sending module is specifically configured to read the second service packet that completes the service application from the first packet sending queue, and send the second service packet through the first physical interface.
In a second possible implementation manner, according to the first possible implementation manner of the second aspect, the network device further includes:
and the service control module is used for acquiring the interface state of the first physical interface, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the first packet sending queue if the interface state of the first physical interface is a stop state, and recovering the interface resource of the first virtual interface if the interface state of the first physical interface is a closed state.
In a third possible implementation manner, according to the first or second possible implementation manner of the second aspect, the network device further includes:
an interface allocation module, configured to allocate the first virtual interface to the service gateway, bind the first physical interface with the first virtual interface, and bind the first virtual interface with the first service interface of the OSP.
In a fourth possible implementation manner of the second aspect, the service gateway is specifically configured to send the first service packet to a packet receiving queue corresponding to the first physical interface, receive the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface, and send the first service packet received on the first virtual interface to a first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface to obtain the second service packet, receiving the second service message sent by the OSP through a second service interface on a second virtual interface, performing service application corresponding to the first physical interface on the second service message, and sending the second service message with the service application completed to a second packet sending queue corresponding to the second physical interface;
the sending module is specifically configured to read the second service packet that completes the service application from the second packet sending queue, and send the second service packet through the second physical interface.
According to a fourth possible implementation manner of the second aspect, in a fifth possible implementation manner, the network device further includes:
and the service control module is used for acquiring the interface state of the first physical interface and the interface state of the second physical interface, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the second packet sending queue if the interface state of the first physical interface and the interface state of the second physical interface are both in a stop state, and recovering the interface resources of the first virtual interface and the second virtual interface if the interface state of the first physical interface and the interface state of the second physical interface are both in a closed state.
In a sixth possible implementation manner, according to the fourth or fifth possible implementation manner of the second aspect, the network device further includes:
an interface allocation module, configured to allocate the first virtual interface and the second virtual interface to the service gateway, bind the first physical interface with the first virtual interface, bind the first virtual interface with the first service interface of the OSP, and bind the second virtual interface with the second service interface of the OSP.
A third aspect provides a service packet processing system, including any one of the network devices and the open service platform OSP described in the second aspect;
and the OSP is used for carrying out OSP service processing on the message.
The method, the device and the system for processing the service message provided by the embodiment of the invention change the receiving and sending processes of the service message, so that the service message received by the network device from the physical interface can be subjected to OSP service processing firstly and then subjected to service application configured on the physical interface, thereby avoiding repeated service application configured on the physical interface and realizing the process of carrying out OSP service processing on a physical layer.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a method for processing a service packet according to an embodiment of the present invention;
fig. 2 is a flowchart of another service packet processing method according to an embodiment of the present invention;
fig. 3 is a flowchart of another service packet processing method according to an embodiment of the present invention;
FIG. 4 is a message flow diagram illustrating the process of processing traffic in the OSP bypass process mode;
FIG. 5 is a message flow diagram of an online physical model corresponding to the bypass process mode shown in FIG. 4;
fig. 6 is a schematic structural diagram of a network device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another network device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another network device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a service packet processing system according to an embodiment of the present invention;
fig. 10 is a schematic hardware structure diagram of a network device according to an embodiment of the present invention;
fig. 11 is a schematic hardware structure diagram of another network device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a service packet processing method according to an embodiment of the present invention, and as shown in fig. 1, the service packet processing method includes:
101, a first service packet is received on a first physical interface of a network device.
Specifically, there are multiple physical interfaces of a network device, and the network device is connected with other devices or networks through the physical interfaces. For example, the user terminal device may be connected to the network device through a first physical interface of the network device, and the user terminal device and the first physical interface may be connected through a wired connection or a wireless connection. In this embodiment, a first service packet, which is sent by a user terminal device and needs to be processed and applied, is received on a first physical interface of a network device.
In this embodiment, the first service packet received on the first physical interface of the network device is a packet that needs to perform OSP service processing on the first physical interface.
102, a service gateway in the network device sends the first service packet to the OSP for service processing.
Specifically, a service gateway is arranged in the network device, the service gateway is used for exchanging data messages between each module and an interface in the network device, before the network device performs service processing on the received first service message configured at the first physical interface, the network device firstly transmits the received first service message to the OSP through the service gateway, and after the OSP performs OSP service processing on the first service message, the OSP generates a second service message. The second service packet is a packet in which only the OSP service processing is performed on the first packet.
It should be noted that, according to the technical solution provided in the embodiment of the present invention, if OSP service processing is not required for a packet received on a physical interface, service application configured on the physical interface is immediately performed when the physical interface receives the packet; if the OSP service processing is needed, when the physical interface receives the message, the service application configured on the physical interface is not performed, but the message is firstly sent to the OSP through the service gateway for OSP service processing. The OSP may be a module configured in the network device or may be a stand-alone device located outside the network device.
103, the service gateway receives the second service packet sent by the OSP, and performs service application corresponding to the first physical interface on the second service packet.
Specifically, the OSP sends a second service packet that completes OSP service processing to the service gateway, and after receiving the second service packet, the service gateway completes service application configured on the first physical interface to the second service packet. Therefore, the process that the OSP service processing is firstly carried out on the service message sent by the user terminal equipment in the physical layer and then the service application configured on the physical port is carried out is realized.
And 104, sending a second service message for completing the service application on the first physical interface or the second physical interface of the network equipment.
Specifically, the second physical interface of the network device may be connected to other devices or public networks such as the Internet, and the network device may complete all service processing and service applications configured in the network device by using the service packet sent by the user terminal device through the second physical interface and then send the service packet to the other devices or networks.
According to different OSP service mode configurations, the second service message for completing the service application can be sent out from the first physical interface or sent out from the second physical interface.
If the OSP service mode is configured as a dual-port transceiving mode, the second service packet that completes the OSP service processing and the service application configured on the first physical interface may be sent back to the first physical interface and sent out through the first physical interface.
If the OSP service mode is configured as the side-hang process mode, the second service packet that completes the OSP service processing and the service application configured on the first physical interface may be sent to the service gateway, and the other services configured in the network device may be continued, and then sent to the other devices or the network through the second physical interface.
In this embodiment, by changing the process of receiving and sending the service packet, the service packet received by the network device from the physical interface may be subjected to OSP service processing first and then subjected to service application configured on the physical interface, thereby avoiding repeated application of services configured on the physical port, and implementing the OSP service processing process on the physical layer.
Fig. 2 is a flowchart of another service packet processing method according to an embodiment of the present invention, and on the basis of the method shown in fig. 1, a case that an OSP service mode is a dual-port transceiving mode is described in detail in this embodiment; as shown in fig. 2, the method for processing a service packet of this embodiment includes:
201, a network device receives a first service packet on a first physical interface of the network device. Referring to embodiment 101 shown in fig. 1, further description is omitted here.
202, the service gateway of the network device sends the first service packet to a packet receiving queue corresponding to the first physical interface.
Specifically, a packet receiving queue is set in a service gateway, where the packet receiving queue corresponds to a first physical interface, and after receiving a first service packet on the first physical interface of a network device, the service gateway sends the first service packet to the packet receiving queue before configuring a service application on the first physical interface for the service packet.
203, the service gateway receives the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface.
Specifically, the service gateway circularly reads the packet from the packet receiving queue, and receives the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface after reading the first service packet that needs to be subjected to the OSP service processing. The first virtual interface is assigned to the service gateway by the network device and is bound to the first physical interface. And the service gateway reads the first service message from the packet receiving queue through the binding relationship between the first virtual interface and the first physical interface, and receives the read first service message from the first virtual interface.
And 204, the service gateway sends the first service packet received on the first virtual interface to the first service interface, so that the OSP performs service processing on the first service packet received on the first service interface to obtain a second service packet.
Specifically, the service gateway sends the packet received on the first virtual interface to the first service interface of the OSP. The network device binds a first service interface of the OSP with a first virtual interface of the service gateway. After receiving the first service packet from the first service interface, the OSP performs corresponding OSP service processing on the first service packet to obtain a second service packet. Before the OSP service is performed on the first service packet received by the network device from the first physical interface, the forwarding process is performed only in the service gateway, which is equivalent to directly performing the OSP service on the first service packet at the first physical interface.
205, the service gateway receives, on the first virtual interface, a second service packet sent by the OSP through the first service interface.
Specifically, an OSP service mode adopted in the network device is a dual-port transceiving mode, that is, a message needs to be sent from the first physical interface, and the OSP sends a second service message, which has been subjected to the OSP service processing, to the first virtual interface of the service gateway through the first service interface.
And 206, the service gateway performs service application corresponding to the first physical interface on the second service packet.
Specifically, when the network device binds the first physical interface and the first virtual interface, the service application configured on the first physical interface is reconfigured on the service gateway, and when the service gateway receives the second service packet from the first virtual interface, the service application configured on the first physical interface on the service gateway can be reconfigured on the second service packet.
207, the service gateway sends the second service packet that has been subjected to the service application to the first packet sending queue corresponding to the first physical interface.
Specifically, a first packet sending queue corresponding to the first physical interface is further disposed in the service gateway, and after the service gateway completes the service application configured on the first physical interface for the second service packet, the service gateway sends the second service packet, on which the service application is completed, to the first packet sending queue.
And 208, the service gateway reads the second service packet completing the service application from the first packet sending queue corresponding to the first physical interface, and sends the second service packet through the first physical interface.
Specifically, the service gateway cyclically reads a message from the first packet sending queue, and if the message to be sent is read, the message is sent through the first physical interface, where the message is a second service message that completes service application, that is, a process in which the network device receives the message from the first physical interface, and sends the message from the first physical interface after completing the OSP service and the service configured at the first physical interface.
It should be noted that, in 201, the first service packet received by the network device on the first physical interface is not limited to a packet sent by the user terminal, and may also be a packet sent to the user terminal by other devices or networks.
In this embodiment, a packet receiving queue and a packet sending queue corresponding to a physical interface are set in a service gateway of a network device, so as to change service processing and application flows of a service packet, and reconfigure a service application configured on a first physical interface of the network device on the service gateway, so that the service packet received by the network device from the first physical interface can be subjected to OSP service processing first, and then subjected to service application configured on the first physical interface, and after the service application is completed, the service packet is sent out from the first physical interface again, thereby implementing a process of performing OSP service processing on a physical layer in a bidirectional port transceiving mode.
Further, the network device may scan the state of the first physical interface, and control the service state according to the state of the first physical interface. The state of the physical interface may be divided into a normal state, a stopped state, and an off state. When the interface state of the first physical interface is a normal state, the OSP service processing of this embodiment is normally performed; this state is used when OSP traffic processing at the physical layer is required. When the interface state of the first physical interface is stop, the service gateway stops sending the first service message to the packet receiving queue and stops sending the second service message in the first packet sending queue; this state is used to reduce the forwarding process of traffic packets when there is no OSP traffic processing to apply for a while. When the interface state of the first physical interface is closed, the network equipment recovers the address resources of the allocated virtual interface, including recovering the interface address resources allocated to the first virtual interface of the service gateway; this state is used to save the address resources of the network device when there is no need to perform OSP service processing for a long time.
Further, before the first physical interface receives the first service packet, the network device also performs interface allocation and binding processes. The method comprises the following steps: the first virtual interface is assigned to the service gateway. Binding the first physical interface with the first virtual interface; and binding the first virtual interface with the first service interface. And reconfiguring the service application configured on the first physical interface on the service gateway.
Fig. 3 is a flowchart of another service packet processing method according to an embodiment of the present invention, and details of a case that an OSP service mode is a pending process mode are described in this embodiment based on the method shown in fig. 1; as shown in fig. 3, the method for processing a service packet of this embodiment includes:
301, a network device receives a first service packet on a first physical interface of the network device. Referring to embodiment 101 shown in fig. 1, further description is omitted here.
And 302, the service gateway of the network device sends the first service packet to a packet receiving queue corresponding to the first physical interface. Referring to embodiment 202 of fig. 2, further description is omitted here.
303, the service gateway receives the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface. Referring to embodiment 203 shown in fig. 2, further description is omitted here.
304, the service gateway sends the first service packet received on the first virtual interface to the first service interface, so that the OSP performs service processing on the first service packet received on the first service interface to obtain a second service packet. Referring to embodiment 204 shown in fig. 2, further description is omitted.
305, the service gateway receives a second service packet sent by the OSP through the second service interface on the second virtual interface.
Specifically, the second virtual interface is allocated to the service gateway by the network device, and the second service interface of the OSP is bound with the second virtual interface of the service gateway. The OSP service mode adopted in the network device is a bypass process mode, so that the message needs to be sent from the second physical interface, and the OSP sends the second service message subjected to the OSP service processing to the second virtual interface of the service gateway through the second service interface.
And 306, the service gateway performs service application corresponding to the first physical interface on the second service packet.
Specifically, when the network device binds the first service interface with the first virtual interface, the service application configured on the first physical interface is reconfigured on the service gateway, and when the service gateway receives the second service packet from the second virtual interface, the service application configured on the first physical interface on the service gateway can be reconfigured on the second service packet.
307, the service gateway sends the second service packet that has been subjected to the service application to a second packet sending queue corresponding to the second physical interface.
Specifically, a second packet sending queue corresponding to the second physical interface is further disposed in the service gateway, and after the service gateway completes service application configured on the first physical interface to the second service packet, the service gateway performs other service forwarding processes in the network device on the second service packet, and sends the second service packet, on which all service processing and application in the network device are completed, to the second packet sending queue. For example, the network device or the network device may be configured with other service modules in addition to the OSP, if a first service packet received by the network device from a first physical interface needs to be sent out from a second physical interface, and a corresponding service needs to be performed in another service module in addition to the OSP service, the service gateway forwards a second service packet that completes an application configured on the first physical interface to the other service module, after the other service module performs a service on the second service packet, the second service packet is sent to the service gateway, and the service gateway sends the second service packet to a second packet sending queue.
308, the service gateway reads the second service packet completing the service application from the second packet sending queue corresponding to the second physical interface, and sends the second service packet through the second physical interface.
Specifically, the service gateway cyclically reads a message from the second packet sending queue, and if a message to be sent is read, the message is sent through the second physical interface, where the message is a second service message that completes all service processing and application in the network device, that is, a process is completed in which the network device receives the message from the first physical interface, performs OSP service processing and service application configured on the first physical interface, and then sends the message from the second physical interface.
It should be noted that, in 301, the first service packet received by the network device on the first physical interface is not limited to the received packet sent by the user terminal device, and may also be a packet sent to the user terminal by other devices or networks.
Referring to fig. 4, a message flow diagram of service processing performed by an OSP side-hang process mode is shown, where the side-hang process mode indicates that a service message is bound through an interface, and the service message is forwarded to the OSP for service processing, and then sent back to a network device for other service applications; wherein, the network device 41 includes the service gateway 52, setting the OSP51 to the bypass process mode is equivalent to relocating the message received by the network device 41 from the first physical interface to the OSP51, and returning to the service gateway 52 for other service processing and application after the OSP service is completed; fig. 5 is a message flow diagram of the online physical model corresponding to the bypass process mode shown in fig. 4, where the OSP51 receives a message on the first physical interface of the network device 41, and continues to perform other service processing and application in the network device 41 after performing OSP service processing, which is equivalent to directly configuring the OSP51 between the first physical interface and the service gateway 52, thereby establishing the online physical model.
In this embodiment, a packet receiving queue and a packet sending queue corresponding to a physical interface are set in a service gateway of a network device, so as to change service processing and application flows of a service packet, and reconfigure a service application configured on a first physical interface of the network device on the service gateway, so that the service packet received by the network device from the first physical interface can be subjected to OSP service processing first, and then subjected to service application configured on the first physical interface, and after the service application is completed, the service packet is sent out from a second physical interface, thereby implementing a process of performing OSP service processing on a physical layer in a side-hanging process mode.
Further, the network device may scan the interface states of the first physical interface and the second physical interface, and control the service state according to the interface states of the first physical interface and the second physical interface. The state of the physical interface may be divided into a normal state, a stopped state, and an off state. When the interface states of the first physical interface and the second physical interface are both normal states, the OSP service processing of the embodiment is normally performed; this state is used when OSP traffic processing at the physical layer is required. When the interface state of the first physical interface and the second physical interface is stop, the service gateway stops sending the first service message to the packet receiving queue and stops sending the second service message in the second packet sending queue; this state is used to reduce the forwarding process of the service packet when OSP service processing is not needed for the time being. When the interface states of the first physical interface and the second physical interface are closed, the network equipment recovers the address resources of the allocated virtual interface, including recovering the interface address resources of the first virtual interface and the second virtual interface allocated to the service gateway; this state is used to save the address resources of the network device when there is no need to perform OSP service processing for a long time.
Further, before the first physical interface receives the first service packet, the network device also performs interface allocation and binding processes. The method comprises the following steps: and allocating the first virtual interface and the second virtual interface to the service gateway. Binding the first physical interface with the first virtual interface; binding the first virtual interface with the first service interface; and binding the second virtual interface with the second service interface. And reconfiguring the service application configured on the first physical interface on the service gateway.
Fig. 6 is a schematic structural diagram of a network device according to an embodiment of the present invention, and as shown in fig. 6, a network device 11 according to this embodiment includes:
the receiving module 21 is configured to receive the first service packet on the first physical interface of the network device 11.
And the service gateway 22 is configured to send the first service packet to the open service platform OSP12 for service processing, receive the second service packet sent by the OSP12, and apply a service corresponding to the first physical interface to the second service packet.
The sending module 23 is configured to send the second service packet that completes the service application on the first physical interface or the second physical interface of the network device 11.
The network device 11 may send the second service packet that completes the service application from the first physical interface or from the second physical interface according to different configurations.
If the OSP service mode is configured as a dual-port transceiving mode, the second service packet that completes the OSP service processing and the service application configured on the first physical interface may be sent back to the first physical interface and sent out through the first physical interface.
If the OSP service mode is configured as the side-hang process mode, the second service packet that completes the OSP service processing and the service application configured on the first physical interface may be sent to the service gateway, and the other services configured in the network device may be continued, and then sent to the other devices or the network through the second physical interface.
The network device is configured to execute the technical solution of the embodiment of the method shown in fig. 1 of the present invention, and the implementation principle and the technical effect are similar, which are not described herein again.
In a possible implementation manner of the embodiment shown in fig. 6, the network device 11 is configured to execute the technical solution of the embodiment of the method shown in fig. 2 of the present invention. The service gateway 22 is specifically configured to send a first service packet to a packet receiving queue corresponding to a first physical interface, receive the first service packet in the packet receiving queue from a first virtual interface corresponding to the first physical interface, and send the first service packet received on the first virtual interface to a first service interface of the OSP12, so that the OSP12 performs service processing on the first service packet received on the first service interface to obtain a second service packet; and receiving a second service message sent by OSP12 through the first service interface on the first virtual interface, performing service application corresponding to the first physical interface on the second service message, and sending the second service message completing the service application to a first packet sending queue corresponding to the first physical interface.
The sending module 23 is specifically configured to read the second service packet that completes the service application from the first packet sending queue, and send the second service packet through the first physical interface.
Fig. 7 is a schematic structural diagram of another network device according to an embodiment of the present invention, and as shown in fig. 7, the network device 11 according to this embodiment further includes a service control module 24 on the basis of fig. 6;
with reference to the foregoing possible implementation manner of fig. 6, the service control module 24 is configured to obtain an interface state of the first physical interface, stop sending the first service packet to the packet receiving queue and stop sending the second service packet in the first packet sending queue if the interface state of the first physical interface is a stop state, and recover the interface resource allocated to the first virtual interface of the service gateway 22 if the interface state of the first physical interface is a closed state.
The network device of this embodiment scans the interface state of the first physical interface through the service control module 24, and controls whether to perform the OSP service processing, so that the transceiving efficiency can be improved and network resources can be saved when the packet does not need to perform the OSP service processing.
Fig. 8 is a schematic structural diagram of another network device according to an embodiment of the present invention, and as shown in fig. 8, the network device 11 according to this embodiment further includes an interface allocating module 25 on the basis of fig. 7;
in conjunction with one possible implementation of fig. 6 above, interface assignment module 25 is configured to assign a first virtual interface to service gateway 22, bind the first physical interface to the first virtual interface, and bind the first virtual interface to the first service interface of OSP 12.
The network device of this embodiment is configured to allocate interface resources to a service gateway and an OSP in the network device and bind an interface, so that the network device can perform OSP service processing in a physical layer according to an interface binding relationship.
In another possible implementation manner of the embodiment shown in fig. 6, the network device 11 is configured to execute the technical solution of the embodiment of the method shown in fig. 3 of the present invention. The service gateway 22 is specifically configured to send a first service packet to a packet receiving queue corresponding to a first physical interface, receive the first service packet in the packet receiving queue from a first virtual interface corresponding to the first physical interface, and send the first service packet received on the first virtual interface to a first service interface of the OSP12, so that the OSP12 performs service processing on the first service packet received on the first service interface to obtain a second service packet; and receiving a second service message sent by OSP12 through a second service interface on a second virtual interface, performing service application corresponding to the first physical interface on the second service message, and sending the second service message completing the service application to a second packet sending queue corresponding to the second physical interface.
The sending module 23 is specifically configured to read a second service packet that completes the service application from the second packet sending queue, and send the second service packet through the second physical interface.
With reference to the another possible implementation manner of fig. 6, the service control module 24 is configured to obtain an interface state of the first physical interface and an interface state of the second physical interface, stop sending the first service packet to the packet receiving queue and stop sending the second service packet in the second packet sending queue if the interface state of the first physical interface and the interface state of the second physical interface are both stop states, and recycle interface resources allocated to the first virtual interface and the second virtual interface of the service gateway 22 if the interface state of the first physical interface and the interface state of the second physical interface are both closed states.
The network device of this embodiment scans the interface states of the first physical interface and the second physical interface through the service control module 24, and controls whether to perform the OSP service processing, so that the transceiving efficiency can be improved and the network resources can be saved when the message does not need to perform the OSP service processing.
In conjunction with another possible implementation of fig. 6 above, the interface assignment module 25 is configured to assign a first virtual interface and a second virtual interface to the service gateway 22, bind the first physical interface with the first virtual interface, bind the first virtual interface with a first service interface of the OSP12, and bind the second virtual interface with a second service interface of the OSP 12.
The network device of this embodiment is configured to allocate interface resources to a service gateway and an OSP in the network device and bind an interface, so that the network device can perform OSP service processing in a physical layer according to an interface binding relationship.
Fig. 9 is a schematic structural diagram of a service packet processing system according to an embodiment of the present invention, and as shown in fig. 9, the service packet processing system according to the embodiment includes:
the network device 61 is configured to complete the functions of any of the foregoing network device embodiments.
And the OSP62 is used for carrying out OSP business processing on the business message.
It should be noted that OSP62 and network device 61 may be deployed integrally or separately, and OSP62 may also be a distributed structure, a part of which is deployed inside network device 61 and a part of which is deployed outside network device 61, which is not limited in this embodiment.
Fig. 10 is a schematic diagram of a hardware structure of a network device according to an embodiment of the present invention, and as shown in fig. 10, the network device 11 includes a first physical interface 71, a processor 72, and a memory 73. The first physical interface 71, the processor 72, and the memory 73 may be connected by a system bus or other methods, and fig. 10 illustrates an example in which the system bus is connected; the system bus may be an ISA bus, PCI bus, EISA bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in FIG. 10, but it is not intended that there be only one bus or one type of bus. The memory 73 has stored therein program code, which includes computer operating instructions.
The first physical interface 71 is configured to receive a first service packet.
The processor 72 executes the program code, and is configured to send the first service packet to the open service platform OSP for service processing, receive a second service packet sent by the OSP, and perform service application corresponding to the first physical interface 71 on the second service packet.
Different OSP service modes can be configured on the network device 11; the OSP business mode comprises a dual-port transceiving mode and a side-hang progress mode.
In a possible implementation manner, the OSP service mode configured by the network device 11 is a dual-port transceiving mode, and is used for executing the method shown in fig. 2 in the present invention; wherein,
the processor 72 is specifically configured to send the first service packet to a packet receiving queue corresponding to the first physical interface 71, receive the first service packet in the packet receiving queue from a first virtual interface corresponding to the first physical interface 71, and send the first service packet received on the first virtual interface to a first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface to obtain a second service packet; and receiving a second service message sent by the OSP through the first service interface on the first virtual interface, performing service application corresponding to the first physical interface on the second service message, sending the second service message completing the service application to a first packet sending queue corresponding to the first physical interface 71, reading the second service message completing the service application from the first packet sending queue corresponding to the first physical interface 71, and sending the second service message to the first physical interface 71.
The first physical interface 71 is configured to send a second service packet that completes the service application.
Optionally, when the OSP service mode is the dual-port transceiving mode, the processor 72 is further configured to obtain an interface state of the first physical interface 71, stop sending the first service packet to the packet receiving queue and stop sending the second service packet in the first packet sending queue if the interface state of the first physical interface 71 is a stop state, and recycle the interface resource allocated to the first virtual interface of the service gateway if the interface state of the first physical interface 71 is a close state. Further optionally, the processor 72 is further configured to assign the first virtual interface to a service gateway, bind the first physical interface 71 with the first virtual interface, and bind the first virtual interface with the first service interface.
In another possible implementation manner, the OSP service mode configured by the network device 11 is a bypass process mode, and is used for executing the method shown in fig. 3 in the present invention; referring to fig. 11, a schematic diagram of a hardware structure of another network device according to an embodiment of the present invention is provided; the network device 11 is based on the network device 11 shown in fig. 10, and further includes: a second physical interface 74.
The processor 72 is specifically configured to send the first service packet to a packet receiving queue corresponding to the first physical interface 71, receive the first service packet in the packet receiving queue from a first virtual interface corresponding to the first physical interface 71, and send the first service packet received on the first virtual interface to a first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface to obtain a second service packet; and receiving a second service message sent by the OSP through a second service interface on a second virtual interface, performing service application corresponding to the first physical interface 71 on the second service message, sending the second service message completing the service application to a second packet sending queue corresponding to the second physical interface 74, reading the second service message completing the service application from the second packet sending queue corresponding to the second physical interface 74, and sending the second service message to the second physical interface 74.
And the second physical interface 74 is configured to send a second service packet completing the service application.
Optionally, when the OSP service mode is the bypass process mode, the processor 72 is further configured to obtain an interface state of the first physical interface 71 and an interface state of the second physical interface 74, stop sending the first service packet to the packet receiving queue and stop sending the second service packet in the second packet sending queue if the interface state of the first physical interface 71 and the interface state of the second physical interface 74 are both stop states, and recycle the interface resources allocated to the first virtual interface and the second virtual interface of the service gateway if the interface state of the first physical interface 71 and the interface state of the second physical interface 74 are both closed states. Further optionally, the processor 72 is further configured to allocate the first virtual interface and the second virtual interface to a service gateway, bind the first physical interface 71 with the first virtual interface, bind the first virtual interface with the first service interface, and bind the second virtual interface with the second service interface.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (16)

1. A method for processing service messages is characterized by comprising the following steps:
receiving a first service message on a first physical interface;
sending the first service message to an Open Service Platform (OSP) for service processing;
receiving a second service message sent by the OSP, and performing service application corresponding to the first physical interface on the second service message;
and sending a second service message for completing the service application on the first physical interface or the second physical interface.
2. The method of claim 1, wherein after receiving the first service packet on the first physical interface, further comprising:
sending the first service message to a packet receiving queue corresponding to the first physical interface;
receiving the first service message in the packet receiving queue from a first virtual interface corresponding to the first physical interface;
correspondingly, the sending the first service packet to the OSP for service processing specifically includes:
and sending the first service packet received on the first virtual interface to a first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface and obtains a second service packet.
3. The method of claim 2 wherein said receiving said second traffic packet sent by said OSP comprises:
receiving the second service packet sent by the OSP through the first service interface on the first virtual interface;
correspondingly, the sending of the second service packet for completing the service application on the first physical interface or the second physical interface specifically includes:
sending the second service message with the service application completed to a first packet sending queue corresponding to the first physical interface;
and reading the second service message for completing the service application from the first packet sending queue corresponding to the first physical interface, and sending the second service message for completing the service application on the first physical interface.
4. The method of claim 3, further comprising:
acquiring the interface state of the first physical interface;
if the interface state of the first physical interface is a stop state, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the first packet sending queue;
and if the interface state of the first physical interface is a closed state, recovering the interface resources of the first virtual interface.
5. The method according to any one of claims 2 to 4, wherein before receiving the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface, the method further comprises:
allocating the first virtual interface;
and binding the first physical interface with the first virtual interface, and binding the first virtual interface with a first service interface of the OSP.
6. The method of claim 2 wherein said receiving said second traffic packet sent by said OSP comprises:
receiving the second service message sent by the OSP through a second service interface on a second virtual interface;
correspondingly, the sending of the second service packet for completing the service application on the first physical interface or the second physical interface specifically includes:
sending the second service message of which the service application is finished to a second packet sending queue corresponding to the second physical interface;
and reading the second service message from the second packet sending queue corresponding to the second physical interface, and sending the second service message for completing the service application on the second physical interface.
7. The method of claim 6, further comprising:
acquiring the interface state of the first physical interface and the interface state of the second physical interface;
if the interface state of the first physical interface and the interface state of the second physical interface are both stop states, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the second packet sending queue;
and if the interface state of the first physical interface and the interface state of the second physical interface are both closed states, recovering the interface resources of the first virtual interface and the second virtual interface.
8. The method according to claim 6 or 7, wherein before receiving the first service packet in the packet receiving queue from the first virtual interface corresponding to the first physical interface, the method further comprises:
allocating the first virtual interface and the second virtual interface;
and binding the first physical interface with the first virtual interface, binding the first virtual interface with a first service interface of the OSP, and binding the second virtual interface with a second service interface of the OSP.
9. A network device, comprising:
the receiving module is used for receiving a first service message on a first physical interface;
a service gateway, configured to send the first service packet to an open service platform OSP for service processing, receive a second service packet sent by the OSP, and perform service application corresponding to the first physical interface on the second service packet;
and the sending module is used for sending a second service message for completing the service application on the first physical interface or the second physical interface.
10. The device according to claim 9, wherein the service gateway is specifically configured to send the first service packet to a packet receiving queue corresponding to the first physical interface, receiving the first service packet in the packet receiving queue from a first virtual interface corresponding to the first physical interface, sending the first service packet received on the first virtual interface to a first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface to obtain the second service packet, receiving, on the first virtual interface, the second traffic packet sent by the OSP through the first traffic interface, performing service application corresponding to the first physical interface on the second service message, and sending the second service message with the service application completed to a first packet sending queue corresponding to the first physical interface;
the sending module is specifically configured to read the second service packet that completes the service application from the first packet sending queue, and send the second service packet through the first physical interface.
11. The apparatus of claim 10, further comprising:
and the service control module is used for acquiring the interface state of the first physical interface, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the first packet sending queue if the interface state of the first physical interface is a stop state, and recovering the interface resource of the first virtual interface if the interface state of the first physical interface is a closed state.
12. The apparatus of claim 10 or 11, further comprising:
an interface allocation module, configured to allocate the first virtual interface to the service gateway, bind the first physical interface with the first virtual interface, and bind the first virtual interface with the first service interface of the OSP.
13. The device according to claim 9, wherein the service gateway is specifically configured to send the first service packet to a packet receiving queue corresponding to the first physical interface, receiving the first service packet in the packet receiving queue from a first virtual interface corresponding to the first physical interface, sending the first service packet received on the first virtual interface to a first service interface of the OSP, so that the OSP performs service processing on the first service packet received on the first service interface to obtain the second service packet, receiving the second service message sent by the OSP through a second service interface on a second virtual interface, performing service application corresponding to the first physical interface on the second service message, and sending the second service message with the service application completed to a second packet sending queue corresponding to the second physical interface;
the sending module is specifically configured to read the second service packet that completes the service application from the second packet sending queue, and send the second service packet through the second physical interface.
14. The apparatus of claim 13, further comprising:
and the service control module is used for acquiring the interface state of the first physical interface and the interface state of the second physical interface, stopping sending the first service message to the packet receiving queue and stopping sending the second service message in the second packet sending queue if the interface state of the first physical interface and the interface state of the second physical interface are both in a stop state, and recovering the interface resources of the first virtual interface and the second virtual interface if the interface state of the first physical interface and the interface state of the second physical interface are both in a closed state.
15. The apparatus of claim 13 or 14, further comprising:
an interface allocation module, configured to allocate the first virtual interface and the second virtual interface to the service gateway, bind the first physical interface with the first virtual interface, bind the first virtual interface with the first service interface of the OSP, and bind the second virtual interface with the second service interface of the OSP.
16. A service packet processing system, comprising the network device according to any of claims 9 to 15 and an open service platform OSP, wherein the OSP is configured to perform OSP service processing on a service packet.
CN201280002563.3A 2012-11-15 2012-11-15 Service message processing method, equipment and system Active CN103959732B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/084678 WO2014075269A1 (en) 2012-11-15 2012-11-15 Service message processing method, device and system

Publications (2)

Publication Number Publication Date
CN103959732A CN103959732A (en) 2014-07-30
CN103959732B true CN103959732B (en) 2016-11-09

Family

ID=50730495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201280002563.3A Active CN103959732B (en) 2012-11-15 2012-11-15 Service message processing method, equipment and system

Country Status (2)

Country Link
CN (1) CN103959732B (en)
WO (1) WO2014075269A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464679A (en) * 2002-06-18 2003-12-31 华为技术有限公司 Internet authentication method
CN101841456A (en) * 2009-03-18 2010-09-22 中国电信股份有限公司 Method and system for implementing service application division
CN102396191A (en) * 2009-02-13 2012-03-28 Adc长途电讯有限公司 Inter-networking devices for use with physical layer information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI315952B (en) * 2006-10-20 2009-10-11 Ind Tech Res Inst System and method for controlling the devices connected to control gateway

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464679A (en) * 2002-06-18 2003-12-31 华为技术有限公司 Internet authentication method
CN102396191A (en) * 2009-02-13 2012-03-28 Adc长途电讯有限公司 Inter-networking devices for use with physical layer information
CN101841456A (en) * 2009-03-18 2010-09-22 中国电信股份有限公司 Method and system for implementing service application division

Also Published As

Publication number Publication date
WO2014075269A1 (en) 2014-05-22
CN103959732A (en) 2014-07-30

Similar Documents

Publication Publication Date Title
KR102333792B1 (en) Roaming support for next-generation slice architectures
CN107318113B (en) Network slice processing method and device
CN104255046B (en) The method of customized mobile broadband network system and customization mobile broadband network
JP5584760B2 (en) Data transmission method and terminal
CN103124267B (en) The method, system and the cloud server that log in/register is carried out by mobile terminal
CN106464515B (en) Deployment method and device of virtual network management and virtual network system
CN104955172A (en) Method for realizing mobile network virtualization, control platform, virtualization base station and system
KR101706876B1 (en) Service processing method and device
EP3742785A1 (en) Session management method and device
CN104159306B (en) A kind of method, equipment and system for controlling interface-free resources
CN108811154A (en) Data pack transmission method and equipment
KR101408745B1 (en) Service processing method and apparatus based on android system
CN102299834A (en) Data sharing method, equipment and system for local area network
CN101668315B (en) Method and device for operating network elements of different protocol versions
CN108696911A (en) A kind of selection method and device of data transmission of internet of things mode
CN109842576A (en) The method and apparatus for carrying out channel estimation using the precoding granularity of control resource set
CN104995892A (en) GRE tunnel determination method, gateway device and access station
CN110022580B (en) Method and device for establishing bearing
CN110113771A (en) Data processing method, device, gateway and storage medium
CN109818772B (en) Network performance guarantee method and device
CN105264958A (en) Method and device for bearing circuit switched domain voice service
CN102891900B (en) A kind of method, apparatus and system of the domain name mapping in flow unloading
KR101851030B1 (en) Method and apparatus of communicating machine type communication data over an iu interface in a universal mobile telecommunications system
CN103959732B (en) Service message processing method, equipment and system
CN102820992A (en) Processing method and device of data packets

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant