Message processing method, device, network equipment and storage medium
By building a service processing path based on interface index and ARC index, and combining interfaces with global service nodes, the problem of limited flexibility of network equipment in the ARC mechanism is solved, and flexible service message processing and efficient network management are achieved.
Patent Information
- Application Number
- CN202411804451.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-09
AI Technical Summary
In the existing ARC mechanism, the interfaces of network devices cannot simultaneously support service activation based on the corresponding interfaces and service activation based on all interfaces, resulting in limited flexibility and adaptability in complex network environments and an inability to meet diverse and refined network management needs.
By obtaining the interface index, determining the ARC index associated with it, and performing preset transformations to generate a business processing path, combined with the first business node enabled based on the interface and the second business node enabled globally, a flexible business processing path is constructed to support interface diversification and global business activation.
It enhances the flexibility and adaptability of network equipment in complex network environments, meets diversified and refined network management needs, and improves the efficiency and security of business message processing.
Smart Images

Figure CN119697110B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message processing method, apparatus, network equipment and storage medium. Background Art
[0002] The Advanced Routing and Control (ARC) mechanism is a message transmission technology that relies on the Vector Packet Processing (VPP) engine. ARC processes and transmits service messages received by network device interfaces using an ordered vector graph, formed by connecting multiple nodes in a pre-set sequence. ARC uses a series of services (features) to achieve flexible switching between nodes, each corresponding to a specific function. These services can be dynamically enabled or disabled as needed to adapt to different network environments and application requirements.
[0003] Currently, there are two main service activation methods for the ARC mechanism: in one method, the activation of each service is only effective for the corresponding interface; in the other method, the activation of each service is effective for all interfaces; and for an interface, one of the two methods is usually selected to run.
[0004] However, in some application scenarios, the interfaces of network devices cannot simultaneously support service activation based on the corresponding interfaces and service activation based on all interfaces, which limits the flexibility and adaptability of network devices in complex network environments and cannot meet diverse and refined network management needs. Summary of the Invention
[0005] In view of this, the present application proposes a message processing method, apparatus, network device and storage medium to solve the problem in the existing ARC mechanism that the interface of the network device cannot simultaneously support the service activation based on the corresponding interface and the service activation based on all interfaces, which limits the flexibility and adaptability of the network device in a complex network environment and cannot meet the diversified and refined network management needs.
[0006] A first embodiment of the present application provides a message processing method, which is applied to a network device; the method includes:
[0007] In response to receiving a service message through a target interface, obtaining an interface index of the target interface;
[0008] Determining a first ARC index associated with the interface index;
[0009] According to the service processing path associated with the first ARC index, a service node in the service processing path is called to perform a processing operation on the service message; wherein the service node includes a first service node enabled based on an interface and a second service node enabled globally.
[0010] The embodiment of the present application performs processing operations on service messages through the service processing path associated with the first ARC index associated with the interface index, enabling the interface of the network device to simultaneously support the first service node based on the interface and the second service node enabled globally, greatly enhancing the flexibility and adaptability of the network device in a complex network environment, and meeting diversified and refined network management needs.
[0011] In the embodiment of the present application, before responding to the target interface receiving the service message, the method further includes:
[0012] Determining a second ARC index associated with the interface index, wherein the second ARC index is an initial ARC index associated with the interface index;
[0013] Performing a preset transformation on the second ARC index to obtain a first ARC index;
[0014] A service processing path associated with the first ARC index is generated according to the service processing path associated with the second service node and the second ARC index.
[0015] In the embodiment of the present application, generating the service processing path associated with the first ARC index according to the service processing path associated with the second service node and the second ARC index includes:
[0016] Arrange the second service node and the first service node in the service processing path associated with the second ARC index according to the dependency relationship between the service nodes to obtain an arrangement result;
[0017] According to the starting node, the ending node and the arrangement result, the business processing path associated with the first ARC index is generated; the starting node refers to the starting address of the target interface receiving the business message, and the ending node refers to the destination address of the target interface sending the business message.
[0018] The embodiment of the present application arranges the first service node and the second service node according to the dependency relationship between the service nodes to obtain an arrangement result, and generates a service processing path according to the arrangement result, thereby ensuring that each service node performs corresponding processing on the received service message at the correct time, and avoiding data packet loss, errors or security vulnerabilities caused by improper node processing order.
[0019] In an embodiment of the present application, the service processing path includes N service nodes; calling the service nodes in the service processing path to perform processing operations on the service message according to the service processing path associated with the first ARC index includes:
[0020] For the nth service node among the N service nodes, after the nth service node receives the service message, determine the service characteristics of the service message;
[0021] If the service characteristics indicate calling the nth service node to perform service processing on the service message, then call the nth service node to perform service processing on the service message to obtain a processed service message;
[0022] If n < N, then transmit the processed service message as a new service message to the (n + 1)th service node.
[0023] In an embodiment of the present application, after each service node receives a service message, it first determines the service characteristics of the service message. If the characteristics indicate that service processing is required, then processing is performed; otherwise, it is passed to the next node. This on-demand processing method avoids unnecessary processing steps, improves processing efficiency, and reduces the overall processing delay. Moreover, each service node dynamically decides whether to perform processing based on the service characteristics. This mechanism enables network devices to flexibly handle different types of service messages and adapt to different application scenarios, with strong flexibility.
[0024] In an embodiment of the present application, before the method responds to the service message received by the target interface, the method further includes:
[0025] Receiving an addition request of a target service node; the addition request includes the enabling type of the target service node and a target first ARC index, and the enabling type is globally enabled or interface-based enabled;
[0026] If the enabling type of the target service node is interface-based enabled, then add the target service node to the service processing path associated with the target first ARC index indicated by the addition request;
[0027] If the enabling type of the target service node is globally enabled, then add the target service node to multiple service processing paths associated with multiple first ARC indexes respectively.
[0028] The embodiment of the present disclosure adds the target business node to the corresponding business processing path through the activation type of the newly added target business node. By adding the new target business node, the business processing path can be flexibly adjusted and optimized according to business needs, so that the processing flow of the business message is more adapted to the actual business needs and the processing efficiency of the business message is improved.
[0029] An embodiment of the second aspect of the present application provides a message processing device, including:
[0030] An interface index obtaining module, configured to obtain an interface index of a target interface in response to receiving a service message through the target interface;
[0031] A first ARC index determining module, configured to determine a first ARC index associated with the interface index;
[0032] A message processing module is used to call a business node in the business processing path according to the business processing path associated with the first ARC index to perform processing operations on the business message; wherein the business node includes a first business node enabled based on an interface and a second business node enabled globally.
[0033] In an embodiment of the present application, the device further includes:
[0034] a second ARC index determining module, configured to determine a second ARC index associated with the interface index, wherein the second ARC index is an initial ARC index associated with the interface index;
[0035] a preset transformation module, configured to perform a preset transformation on the second ARC index to obtain a first ARC index;
[0036] The service processing path generating module is configured to generate a service processing path associated with the first ARC index according to the service processing path associated with the second service node and the second ARC index.
[0037] In an embodiment of the present application, the business processing path generation module is also used to arrange the second business node and the first business node in the business processing path associated with the second ARC index according to the dependency relationship between the business nodes to obtain an arrangement result; generate the business processing path associated with the first ARC index according to the starting node, the ending node and the arrangement result; the starting node refers to the starting address of the target interface receiving the business message, and the ending node refers to the destination address of the target interface sending the business message.
[0038] An embodiment of the third aspect of the present application provides a network device, which includes a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the message processing method described in the first aspect above by executing the computer instructions.
[0039] An embodiment of the fourth aspect of the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the message processing method described in the first aspect above.
[0040] Additional aspects and advantages of the present application will be given in part in the description below and in part will become apparent from the description below or learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. Throughout the accompanying drawings, the same reference numerals are used to denote the same components.
[0042] In the attached figure:
[0043] Figure 1 A schematic diagram showing a flow chart of a message processing method provided by an embodiment of the present application is shown;
[0044] Figure 2 A schematic diagram showing the index relationship between the interface index, the first ARC index, and the second ARC index provided in an embodiment of the present application is shown;
[0045] Figure 3 A schematic diagram showing a one-to-one correspondence between different first ARC indexes provided by an embodiment of the present application and different service processing paths;
[0046] Figure 4 A schematic diagram of the structure of a message processing device provided in one embodiment of the present application is shown;
[0047] Figure 5 A schematic diagram of the structure of a network device provided in one embodiment of the present application is shown;
[0048] Figure 6 A schematic diagram of a storage medium provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0049] The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0050] It should be noted that, unless otherwise specified, the technical or scientific terms used in this application should have the common meanings understood by those skilled in the art to which this application belongs.
[0051] The following describes the technical scenarios involved in the embodiments of this application.
[0052] With the rapid development of network communication technologies, network devices are facing increasing demands for packet processing. To meet these demands, high-performance packet processing frameworks have emerged. Among them, Vector Packet Processing (VPP) has garnered widespread attention for its superior performance and flexibility. VPP connects multiple nodes into an ordered vector graph according to a pre-set sequence, enabling efficient packet forwarding and other network functions.
[0053] During VPP packet forwarding, the Advanced Routing and Control (ARC) mechanism enables efficient resource management and task scheduling, optimizing packet forwarding performance. The ARC mechanism enables flexible switching between nodes through a series of services (features), each corresponding to a specific function. These services can be dynamically enabled or disabled as needed to adapt to different network environments and application requirements.
[0054] Currently, there are two ways to enable the ARC mechanism in VPP:
[0055] Interface-based services: In this mode, each service is enabled only on a specific interface of a network device. For example, feature 1 is enabled only on interface 1, and feature 2 is enabled only on interface 2. The advantage of this mode is that different services can be configured for different interfaces, achieving refined traffic management and control.
[0056] Globally enabled services: In this mode, each service is enabled for all interfaces on the network device. For example, enabling feature 1 applies to all interfaces, and enabling feature 2 also applies to all interfaces. This mode offers the advantages of simple configuration and easy management, making it suitable for scenarios requiring unified configuration.
[0057] However, in real-world applications, network devices often require the advantages of both service activation methods. For example, in some scenarios, it may be necessary to enable certain services on specific interfaces to optimize local traffic flow, while also enabling certain services on all interfaces to implement unified security policies or traffic monitoring.
[0058] Therefore, there is an urgent need for a message processing method that can simultaneously support service activation based on the corresponding interface and service activation based on all interfaces, so as to solve the technical problem in the existing ARC mechanism that the interface of the network device cannot simultaneously support service activation based on the corresponding interface and service activation based on all interfaces, which limits the flexibility and adaptability of the network device in a complex network environment and cannot meet the diversified and refined network management needs.
[0059] According to an embodiment of the present application, an embodiment of a message processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0060] In this embodiment, a message processing method is provided, which can be used in network devices. Figure 1 is a flow chart of a message processing method according to an embodiment of the present application, such as Figure 1 As shown, the process includes the following steps:
[0061] Step S101: In response to receiving a service message through a target interface, an interface index of the target interface is obtained.
[0062] Specifically, the network device includes multiple interfaces, and the target interface refers to any one of the multiple interfaces. Through the target interface, the network device receives a service message sent by a user terminal or a previous hop of the network device in the network.
[0063] More specifically, the network device predefines a plurality of interface indexes corresponding one-to-one to a plurality of interfaces, for example Figure 2 As shown in FIG. 1 , there are n+1 interface indexes (a0, a1, a2, a3, ..., an), each of which is used to mark a corresponding interface. When a target interface receives a service message, the network device obtains the interface index corresponding to the target interface.
[0064] In some specific embodiments, before step S101, the method further includes steps S201 to S203:
[0065] Step S201: Determine a second ARC index associated with the interface index.
[0066] The second ARC index is the initial ARC index associated with the interface index, and the second ARC index and the interface index are in a one-to-one correspondence. For example, Figure 2 As shown: the interface index a0 corresponds to the second ARC index b0.
[0067] Step S202: Perform a preset transformation on the second ARC index to obtain a first ARC index.
[0068] For example, the preset transformation can be adding one to the second ARC index, for example, adding one to the second index b0 to obtain the first ARC index c1. This application does not limit the specific transformation of the preset transformation, as long as the second ARC index and the first ARC index before and after the transformation are in a one-to-one correspondence.
[0069] Step S203: Generate a service processing path associated with the first ARC index according to the service processing path associated with the second service node and the second ARC index.
[0070] In the disclosed embodiment, a second service node refers to a globally enabled service node, which can be identified by a global enablement index c0, which is used to identify all second service nodes of a network device. Examples of globally enabled service nodes include a global logging service node, which is used to log activity on all interfaces and therefore needs to be enabled for all interfaces of the network device; and a global firewall service node, which is used to protect the entire network from external attacks and unauthorized access and needs to be enabled for all interfaces of the network device.
[0071] In the embodiment of the present disclosure, the business processing path associated with the second ARC index only includes the first business node, and the business processing path associated with the first ARC index includes the first business node and the second business node. The first business node refers to a business node enabled based on an interface, such as the Network Address Translation (NAT) service, which is used to convert addresses between an internal network and an external network and is enabled only on an interface connected to the Internet; or the Port Mirroring service, which is used to copy traffic from one or more interfaces to another interface and is typically used for network monitoring and troubleshooting and is enabled only on interfaces that need to be monitored.
[0072] In some specific embodiments, in order to support the special form of globally enabled business nodes in the existing mechanism, the global enablement index c0 is defined as the maximum value of the valid range, that is: if the valid range of the interface index is 4 bytes (unsigned int), then the range is [0, 0xFFFFFFFF), and the global enablement index c0 is 0xFFFFFFFF. At the same time, in order to avoid memory waste caused by allocating continuous memory based on the interface index, the first ARC index is defined as = the second ARC index + 1, that is, the global enablement index c0 = 0xFFFFFFFF + 1 = 0, and the actual interface index allocated starting from 0 only needs to be increased by 1 once, without destroying the original allocation mechanism. In this way, the globally enabled business nodes can be unified into the data maintenance system based on the interface index.
[0073] In some specific embodiments, the above step S203 includes steps S2031 and S2032:
[0074] Step S2031: Arrange the second service node and the first service node in the service processing path associated with the second ARC index according to the dependency relationship between the service nodes to obtain an arrangement result.
[0075] In the embodiment of the present application, the dependency relationship between the service nodes can be determined by analyzing the functions and service requirements of each service node. The above step S2031 is explained by the following example:
[0076] When the first service node includes a data extraction node and a data processing node, and the second service node includes a firewall node, the dependencies between them need to be considered when arranging the service nodes to ensure that each node processes the received service message at the correct time. The dependencies include:
[0077] 1. When a network device interface receives a service message, it generally needs to perform a security check on the service message to ensure that the received service message complies with the security policy. Therefore, the firewall node needs to be the first service node in the arrangement result.
[0078] 2. When a business message complies with the security policy, the corresponding data in the business message can be extracted and then processed accordingly.
[0079] Therefore, it is necessary to apply the data extraction node and the data processing node after the firewall node. Based on the above dependency relationship, the arrangement result can be determined as: firewall node → data extraction node → data processing node.
[0080] Step S2032: Generate a business processing path associated with the first ARC index according to the start node, the end node, and the arrangement result.
[0081] In this embodiment of the present application, the starting node refers to the starting address at which the target interface receives the service message, and the ending node refers to the destination address at which the target interface sends the target service message. A service processing path of "starting node → arrangement result → ending node" is generated using the starting node, the ending node, and the arrangement result.
[0082] The embodiment of the present application generates a business processing path for the target interface based on the first business node (i.e., the business node enabled based on the interface) and the second business node (i.e., the business enabled for all interfaces) in the business processing path associated with the second ARC index, and calls the business node in the business processing path to perform processing operations on the business message. This enables the interface of the network device to simultaneously support business enabling based on the corresponding interface and business enabling based on all interfaces, greatly enhancing the flexibility and adaptability of the network device in a complex network environment, and meeting diversified and refined network management needs.
[0083] Step S102: Determine a first ARC index associated with the interface index.
[0084] In the embodiment of the present disclosure, when the interface index of the target interface is obtained, the first ARC index associated with the interface index can be filtered out from the multiple first ARC indexes, for example Figure 2 As shown: when the interface index of the target interface is "a1", its associated first ARC index is "c2".
[0085] Step S103: According to the service processing path associated with the first ARC index, a service node in the service processing path is called to perform a processing operation on the service message.
[0086] The service nodes include a first service node enabled based on an interface and a second service node enabled globally.
[0087] In an embodiment of the present application, when the target interface receives a business message, the first business node in the business processing path associated with the first ARC index is controlled to perform corresponding business processing on the business message; then the first business node transmits the processed business message to the next business node connected to the first business node, so that the next business node performs corresponding business processing on the received business message, until the last business node in the business processing path performs corresponding business processing on the received business message to obtain the target business message.
[0088] In some specific embodiments, the service processing path includes N service nodes; the above step S103 includes steps S1031 to S1033:
[0089] Step S1031: For the nth service node among the N service nodes, after the nth service node receives the service message, determine the service characteristics of the service message.
[0090] Among them, the service characteristics are associated with the service nodes to which the service message is to be processed. Different service nodes are associated with different service characteristics. For example, when the service node is an IPsec service, the service characteristics include but are not limited to source and destination addresses, source and destination ports, VLAN, protocol version, and packets matching the ACL.
[0091] Step S1032: If the service characteristics indicate that the nth service node is called to process the service message, then call the nth service node to process the service message to obtain the processed service message.
[0092] In the embodiments of the present application, if the service characteristics indicate that the service node does not process the service message, the service node transmits the service message to the next service node connected to it, so that the next service node re-determines the service characteristics of the service message and judges whether to perform service processing through the next service node according to the service characteristics.
[0093] Step S1033: If n < N, then transmit the processed service message as a new service message to the (n + 1)th service node.
[0094] In the embodiments of the present disclosure, when n = N, the processed service message obtained by the nth service node processing the service message can be used as the processing output result of the service processing path.
[0095] In some specific embodiments, before step S101, the method further includes steps S301 - S303:
[0096] Step S301: Receive an addition request of a target service node.
[0097] Among them, the addition request includes the enabling type of the target service node and the target first ARC index. The enabling type is global enabling or interface-based enabling.
[0098] Step S302: If the enabling type of the target service node is the interface-based enabling, then add the target service node to the service processing path associated with the target first ARC index indicated by the addition request.
[0099] In an embodiment of the present disclosure, when a target service node is determined to be enabled based on an interface, the target service node can be added to the service processing path associated with the target first ARC index indicated by the add request, thereby constructing a new service processing path. For example, when adding service node 1 enabled based on an interface, it is necessary to first determine the corresponding enabled interface 1 based on its add request, then determine the first ARC index 1 associated with the interface index of the enabled interface 1, and finally add service node 1 to service processing path 1 associated with the first ARC index 1.
[0100] Step S303: If the activation type of the target service node is the global activation, the target service node is added to multiple service processing paths associated with multiple first ARC indexes.
[0101] In an embodiment of the present disclosure, when a target service node is determined to be globally enabled, the target service node can be added to multiple service processing paths associated with multiple first ARC indexes, thereby constructing multiple service processing paths corresponding to multiple interfaces. For example, a network device includes three interfaces, namely interface 1, interface 2, and interface 3; when adding a globally enabled service node 2, the first ARC index 1 associated with the interface index of interface 1 will be determined first, and finally the service node 2 will be added to the service processing path 1 associated with the first ARC index 1; similarly, the service node 2 will be added to the service processing path 2 associated with the first ARC index 2, and the service node 2 will be added to the service processing path 3 associated with the first ARC index 3.
[0102] Through the above steps S301 to S303, the embodiment of the present disclosure can add the target service node to the corresponding service processing path according to the activation type of the newly added target service node, which can greatly improve the processing efficiency of the service message.
[0103] In some specific embodiments, the service processing path in the embodiments of the present application may include only the first service node, or only the second service node, or both the first service node and the second service node may exist at the same time.
[0104] In the embodiments of the present disclosure, there are different application scenarios in the existing ARC mechanism, for example: multiple service nodes in the service processing path configured for any interface of a network device are all enabled based on the interface; or multiple service nodes are all enabled based on the global basis; or some of the multiple service nodes are enabled based on the interface, and the other service nodes are enabled based on the global basis. Among them, "enabled based on the interface" means that the enabling of the service node is only effective for a specific interface, and "enabled based on the global basis" means that the enabling of the service node is effective for all interfaces.
[0105] Through the above approach, the disclosed embodiments can adaptively adjust the service processing path of the interface according to different application scenarios, greatly improving the flexibility and adaptability of network devices in complex network environments. Preferably, by merging the first service node enabled based on the interface and the second service node enabled globally, efficient management of service nodes can be achieved.
[0106] In some specific embodiments, the network device includes multiple interfaces, each interface is associated with a first ARC index, and each first ARC index is associated with a service processing path. The service processing path includes a second service node and / or a corresponding first service node. For example Figure 3 As shown:
[0107] The service processing path corresponding to the interface c2 of the network device includes the first service node Feature1 and the first service node Feature3;
[0108] The service processing path corresponding to the interface a3 of the network device includes the first service node Feature1, the second service node Feature2, the first service node Feature3, and the second service node Feature5;
[0109] The service processing path corresponding to the interface c(n+1) of the network device includes the second service node Feature4, the second service node Feature6, the second service node Feature7, and the second service node Feature8.
[0110] In some specific embodiments, the multiple interfaces include physical interfaces, virtual interfaces and logical interfaces; the logical interface refers to an interface obtained based on function aggregation, and the logical interface includes multiple physical interfaces.
[0111] In the embodiment of the present application, the logical interface refers to a physical visible interface that is not fixed on the panel, but a virtual interface obtained based on functional abstraction. For example, multiple physical interfaces are aggregated into the same aggregation port as member ports. The member ports perform message load sharing or link reliability assurance, and the business functions are implemented on the virtual aggregation port.
[0112] Corresponding to the implementation of the above message processing method, the embodiment of the present application also provides a message processing device for executing the above message processing method. Figures 1 to 3 The message processing method described in any embodiment of the present invention. Figure 4 As shown, the message processing device includes:
[0113] An interface index obtaining module, configured to obtain an interface index of a target interface in response to receiving a service message through the target interface;
[0114] The first ARC index determination module is configured to determine a first ARC index associated with the interface index;
[0115] The message processing module is configured to, according to the service processing path associated with the first ARC index, call service nodes in the service processing path to perform a processing operation on the service message; wherein, the service nodes include a first service node enabled based on an interface and a second service node enabled globally.
[0116] In an embodiment of the present disclosure, the apparatus further includes:
[0117] The second ARC index determination module is configured to determine a second ARC index associated with the interface index, where the second ARC index is an initial ARC index associated with the interface index;
[0118] The preset transformation module is configured to perform a preset transformation on the second ARC index to obtain a first ARC index;
[0119] The service processing path generation module is configured to generate a service processing path associated with the first ARC index according to the second service node and the service processing path associated with the second ARC index.
[0120] In an embodiment of the present disclosure, the service processing path generation module is further configured to, according to the dependency relationship between service nodes, arrange the first service nodes in the service processing path associated with the second service node and the second ARC index to obtain an arrangement result; and generate the service processing path associated with the first ARC index according to the start node, the end node, and the arrangement result; the start node refers to the start address where the target interface receives the service message, and the end node refers to the destination address where the target interface sends the service message.
[0121] In an embodiment of the present disclosure, the service processing path includes N service nodes; the message processing module is further configured to: for the nth service node among the N service nodes, after the nth service node receives the service message, determine the service feature of the service message; if the service feature indicates calling the nth service node to perform service processing on the service message, then call the nth service node to perform service processing on the service message to obtain a processed service message; if n < N, then use the processed service message as a new service message and transmit it to the (n + 1)th service node.
[0122] In an embodiment of the present disclosure, the device also includes: a node adding module, which is used to receive an adding request of a target business node; the adding request includes the activation type and the target first ARC index of the target business node, and the activation type is global activation or interface-based activation; if the activation type of the target business node is the interface-based activation, the target business node is added to the business processing path associated with the target first ARC index indicated by the adding request; if the activation type of the target business node is the global activation, the target business node is added to multiple business processing paths associated with multiple first ARC indexes respectively.
[0123] The message processing device provided in the above-mentioned embodiment of the present application and the message processing method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0124] The present application also provides a network device to execute the above message processing method. Figure 5 , which shows a schematic diagram of a network device provided by some embodiments of the present application. Figure 5 As shown, the network device 5 includes: a processor 500, a memory 501, a bus 502 and a communication interface 503, wherein the processor 500, the communication interface 503 and the memory 501 are connected via the bus 502; the memory 501 stores a computer program that can be run on the processor 500, and the processor 500 executes the aforementioned Figures 1 to 3 The message processing method provided by any of the illustrated embodiments.
[0125] The memory 501 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. The system network element and at least one other network element are connected via at least one communication interface 503 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0126] The bus 502 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 501 is used to store programs. The processor 500 executes the program after receiving the execution instruction. Figures 1 to 3 The message processing method disclosed in any of the illustrated embodiments may be applied to the processor 500 or implemented by the processor 500 .
[0127] The processor 500 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 500 or by software instructions. The above processor 500 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 501 , and the processor 500 reads the information in the memory 501 and completes the steps of the above method in combination with its hardware.
[0128] The network device provided in the embodiment of the present application and the message processing method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.
[0129] The present application also provides a computer-readable storage medium corresponding to the message processing method provided in the above embodiment. Figure 6 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the message processing method provided by any of the aforementioned embodiments will be executed.
[0130] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0131] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the message processing method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0132] It should be noted that:
[0133] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this description.
[0134] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following schematic diagram: the claimed application requires more features than the features expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present application.
[0135] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of this application and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.
[0136] The above description is merely a preferred embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A message processing method, characterized in that: Applied to network devices; the method includes: In response to receiving a service message through a target interface, obtain the interface index of the target interface; Determine a first ARC index associated with the interface index; According to the service processing path associated with the first ARC index, call the service nodes in the service processing path to perform a processing operation on the service message; wherein, the service nodes include a first service node enabled based on the interface and a second service node enabled globally; Before the response to receiving the service message through the target interface, the method further includes: Determine a second ARC index associated with the interface index, where the second ARC index is the initial ARC index associated with the interface index; Perform a preset transformation on the second ARC index to obtain the first ARC index; Generate a service processing path associated with the first ARC index according to the service processing path associated with the second service node and the second ARC index; Generating a service processing path associated with the first ARC index according to the service processing path associated with the second service node and the second ARC index includes: Arrange the first service nodes in the service processing path associated with the second service node and the second ARC index according to the dependency relationship between service nodes to obtain an arrangement result; Generate a service processing path associated with the first ARC index according to the starting node, the ending node, and the arrangement result.
2. The method according to claim 1, characterized in that The starting node refers to the starting address where the target interface receives the service message, and the ending node refers to the destination address where the target interface sends the service message.
3. The method according to claim 1, characterized in that The service processing path includes N service nodes; according to the service processing path associated with the first ARC index, calling the service nodes in the service processing path to perform a processing operation on the service message includes: For the nth service node among the N service nodes, after the nth service node receives the service message, determine the service characteristics of the service message; If the service characteristics indicate calling the nth service node to perform service processing on the service message, then call the nth service node to perform service processing on the service message to obtain a processed service message; If n < N, then transmit the processed service message as a new service message to the (n + 1)th service node.
4. The method according to claim 1, wherein Before the response to receiving the service message through the target interface, the method further includes: Receive an addition request for a target service node; the addition request includes the enabling type of the target service node and a target first ARC index, and the enabling type is globally enabled or enabled based on the interface; If the enabling type of the target service node is enabled based on the interface, then add the target service node to the service processing path associated with the target first ARC index indicated by the addition request; If the enabling type of the target service node is globally enabled, then add the target service node to the multiple service processing paths associated with multiple first ARC indexes respectively.
5. A message processing device, characterized in that: The device includes: An interface index obtaining module, configured to obtain an interface index of a target interface in response to receiving a service message through the target interface; A first ARC index determining module, configured to determine a first ARC index associated with the interface index; a message processing module, configured to call a service node in the service processing path according to the service processing path associated with the first ARC index to perform a processing operation on the service message; wherein the service node includes a first service node enabled based on an interface and a second service node enabled globally; The device also includes: a second ARC index determining module, configured to determine a second ARC index associated with the interface index, wherein the second ARC index is an initial ARC index associated with the interface index; a preset transformation module, configured to perform a preset transformation on the second ARC index to obtain a first ARC index; a service processing path generating module, configured to generate a service processing path associated with the first ARC index according to the service processing path associated with the second service node and the second ARC index; The business processing path generation module is also used to arrange the second business node and the first business node in the business processing path associated with the second ARC index according to the dependency relationship between the business nodes to obtain an arrangement result; and generate the business processing path associated with the first ARC index according to the starting node, the ending node and the arrangement result.
6. The device according to claim 5, characterized in that The starting node refers to the starting address of the target interface for receiving the service message, and the ending node refers to the destination address of the target interface for sending the service message.
7. A network device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the message processing method according to any one of claims 1 to 4 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the message processing method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Network element service interface creation method and device and related equipment
CN116743832A
Bit indexed explicit replication for deterministic network data plane
US20170222920A1