Message processing method and device, network equipment and storage medium

By obtaining interface indexes in network devices and determining the relevant ARC indexes, network devices are allowed to support both interface-based and global service activation, solving the problem that interfaces in the prior art cannot support multiple service activations at the same time, achieving higher flexibility and adaptability.

CN119697110AActive Publication Date: 2025-03-25NEW H3C TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411804451.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-25
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

In the existing ARC mechanism, the interfaces of network devices cannot support both service activation based on the corresponding interface and service activation based on all interfaces, resulting in limited flexibility and adaptability in complex network environments and cannot meet diversified and refined network management needs.

Method used

By obtaining the interface index of the target interface, determining the first ARC index associated therewith, and calling the service node to process the service message according to the service processing path associated with the index. The method allows the interface of the network device to support both the first service node enabled based on the interface and the second service node enabled globally.

Benefits of technology

It has achieved a significant improvement in the flexibility and adaptability of network equipment in complex network environments, meets diversified and refined network management needs, and avoids packet loss, error or security vulnerabilities caused by improper node processing order.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697110A_ABST
    Figure CN119697110A_ABST
Patent Text Reader

Abstract

The invention provides a message processing method and device, network equipment and a storage medium, and the message processing method comprises the steps: responding to a service message received through a target interface, and obtaining an interface index of the target interface; determining a first ARC index associated with the interface index; according to a service processing path associated with the first ARC index, calling a service node in the service processing path to execute processing operation on the service message; wherein the service nodes comprise a first service node started based on an interface and a second service node started globally. According to the embodiment of the invention, the interface of the network equipment can support the interface-based first service node and the globally started second service node at the same time, the flexibility and adaptability of the network equipment in a complex network environment are greatly enhanced, and diversified and refined network management requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message processing method, device, 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. The ARC mechanism is a network communication technology that processes and transmits service messages received by the interface of a network device through an ordered vector graph formed by connecting multiple nodes in a preset order. Under the ARC mechanism, a series of services (features) are used to achieve flexible rotation between nodes, and each service corresponds 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 modes in the ARC mechanism: in one mode, the activation of each service is effective only for the corresponding interface; in the other mode, the activation of each service is effective for all interfaces; and for one interface, the two modes are usually run one by one.

[0004] However, in some application scenarios, the interfaces of network devices cannot simultaneously support service activation based on 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 sophisticated 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] The first aspect 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, so that the interface of the network device can simultaneously support a first service node based on the interface and a 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, a 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 to obtain an arrangement result through the dependency relationship between service nodes, 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 the embodiments of the present application, 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, including:

[0020] For the nth service node among the N service nodes, after the nth service node receives the service message, determining the service characteristics of the service message;

[0021] If the service characteristics indicate to call the nth service node to perform service processing on the service message, then calling the nth service node to perform service processing on the service message to obtain a processed service message;

[0022] If n < N, then transmitting the processed service message as a new service message to the (n + 1)th service node.

[0023] In the embodiments 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 the embodiments 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 the interface-based enabled, then adding 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 the globally enabled, then adding the target service node to multiple service processing paths associated with multiple first ARC indexes respectively.

[0028] The disclosed embodiment 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 business messages is more adapted to actual business needs and the processing efficiency of business messages is improved.

[0029] The embodiment of the second aspect of the present application provides a message processing device, including:

[0030] An interface index acquisition module, configured to acquire an interface index of a target interface in response to receiving a service message through the target interface;

[0031] A first ARC index determination module, configured to determine a first ARC index associated with the interface index;

[0032] A message processing module is used to call a service node in the service processing path according to the service processing path associated with the first ARC index to perform processing operations 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.

[0033] In the embodiment of the present application, the device further includes:

[0034] A second ARC index determination 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 generation module is used to generate 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.

[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 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 will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not considered to be limitations of the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings.

[0042] In the attached picture:

[0043] Figure 1 A schematic diagram of 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 an interface index, a first ARC index, and a second ARC index provided in an embodiment of the present application is shown;

[0045] Figure 3 A schematic diagram showing different first ARC indexes corresponding to different service processing paths provided by an embodiment of the present application is shown;

[0046] Figure 4 A schematic diagram showing the structure of a message processing device provided by an embodiment of the present application is shown;

[0047] Figure 5 A schematic diagram of the structure of a network device provided by an 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 exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the 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. On the contrary, these embodiments are provided in order 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 terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0051] The following describes the technical scenarios involved in the embodiments of the present application.

[0052] With the rapid development of network communication technology, network devices have an increasing demand for packet processing. In order to meet these needs, high-performance packet processing frameworks have emerged. Among them, Vector Packet Processing (VPP) has attracted widespread attention due to its excellent performance and flexibility. VPP achieves efficient packet forwarding and other network functions by connecting multiple nodes into an ordered vector graph in a preset order.

[0053] In the packet forwarding process of VPP, the Advanced Routing and Control (ARC) mechanism can achieve efficient resource management and task scheduling, and optimize the performance of packet forwarding. The ARC mechanism achieves flexible switching between nodes through a series of services (features), and each service corresponds 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 for a specific interface of the network device. For example, feature 1 is enabled only for interface 1, and feature 2 is enabled only for 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, the enabling of each service is effective for all interfaces of the network device. For example, the enabling of feature1 is effective for all interfaces, and the enabling of feature2 is also effective for all interfaces. The advantages of this mode are simple configuration and convenient management, which is suitable for scenarios that require unified configuration.

[0057] However, in actual applications, network devices often need to have the advantages of both service activation methods. For example, in some application scenarios, it may be necessary to enable certain services on specific interfaces to optimize local traffic, 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 that in the existing ARC mechanism, 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 a network device. Figure 1 is a flowchart 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, obtaining an interface index of the target interface.

[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 networking.

[0063] More specifically, the network device predefines a plurality of interface indexes corresponding one-to-one to the plurality of interfaces, for example Figure 2 As shown: n+1 interface indexes (a0, a1, a2, a3, ..., an), each interface index 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] Exemplarily, the preset transformation may be to add one to the second ARC index, for example, the second index b0 is added by one to obtain the first ARC index c1. The present application does not limit the preset transformation to a specific 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 second service node and the service processing path associated with the second ARC index.

[0070] In the embodiment of the present disclosure, the second service node refers to a globally enabled service node, which can be determined by a global enablement index c0, which is used to determine all second service nodes of the network device. Among them, the globally enabled service node, for example: a global logging service node, is used to record the activity logs of all interfaces, so all interfaces of the network device need to be enabled; another example: a global firewall service node, which is used to protect the entire network from external attacks and unauthorized access, and all interfaces of the network device need to be enabled.

[0071] In the embodiment of the present disclosure, the service processing path associated with the second ARC index only includes the first service node, and the service processing path associated with the first ARC index includes the first service node and the second service node. The first service node refers to a service node enabled based on an interface, such as: Network Address Translation (NAT) service, which is used to perform address conversion between an internal network and an external network and is enabled only on an interface connected to the Internet; another example: Port Mirroring service, which is used to copy traffic from one or more interfaces to another interface, is usually 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 on 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 with 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 from 0 only needs to be + 1 once, without destroying the original allocation mechanism. In this way, the globally enabled business nodes can be unified into a data maintenance system based on interface indexes.

[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 function 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; when arranging the service nodes, it is necessary to consider the dependencies between them to ensure that each node processes the received service message at the right time. The dependencies include:

[0077] 1. When the interface of the network device receives a service message, it is generally necessary to first 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 the 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 the embodiment of the present application, the starting node refers to the starting address of the target interface receiving the service message, and the ending node refers to the destination address of the target interface sending the target service message. Through the starting node, the ending node and the arrangement result, a service processing path of "starting node→arrangement result→ending node" is generated.

[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, so that the interface of the network device can simultaneously support business enabling based on the corresponding interface and business enabling based on all interfaces, which greatly enhances the flexibility and adaptability of the network device in a complex network environment and meets the 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 screened 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 service message, the first service node in the service processing path associated with the first ARC index is controlled to perform corresponding service processing on the service message; then the first service node transmits the processed service message to the next service node connected to the first service node, so that the next service node performs corresponding service processing on the received service message, until the last service node in the service processing path performs corresponding service processing on the received service message to obtain the target service 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 node to which the service message is to be executed, and the service characteristics associated with different service nodes are different. 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 invoking the nth service node to perform service processing on the service message, then invoke the nth service node to perform service processing on 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 perform service processing on the service message, the service node will transmit the service message to the next service node connected to it, so that the next service node can re-determine the service characteristics of the service message and judge 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 performing service processing on 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 from the target service node.

[0097] Among them, the addition request includes the enabling type of the target service node and the target first ARC index, and the enabling type is globally enabled or interface-based enabled.

[0098] Step S302: If the enabling type of the target service node is the 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.

[0099] In the embodiment of the present disclosure, when it is determined that the target service node is 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 according to 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 respectively.

[0101] In the disclosed embodiment, when it is determined that the target service node is 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: the network device includes 3 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 by any interface of the network device are enabled based on the interface; or multiple service nodes are enabled based on the global; or some of the multiple service nodes are enabled based on the interface, and the other service nodes are enabled based on the global. 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" means that the enabling of the service node is effective for all interfaces.

[0105] Through the above-mentioned manner, the embodiment of the present disclosure can adaptively adjust the service processing path of the interface according to different application scenarios, which can greatly improve the flexibility and adaptability of the network device in a complex network environment. Preferably, by merging the first service node enabled based on the interface and the second service node enabled globally, efficient management of the service node 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 the second service node and / or the 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 a second service node Feature4, a second service node Feature6, a second service node Feature7, and a 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 business functions are implemented on the virtualized 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 Figures 1 to 3 The message processing method described in any of the embodiments shown in the figure. Figure 4 As shown, the message processing device includes:

[0113] An interface index acquisition module, configured to acquire 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 a 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 at which the target interface receives the service message, and the end node refers to the destination address at which 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 a service process on the service message, then call the nth service node to perform a service process 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 the 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 an enabling type and a target first ARC index of the target business node, and the enabling type is global enabling or interface-based enabling; if the enabling type of the target business node is the interface-based enabling, 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 enabling type of the target business node is the global enabling, 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 A message processing method provided by any of the illustrated implementation modes.

[0125] The memory 501 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through 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. After receiving the execution instruction, the processor 500 executes the program. 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. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 500. The above processor 500 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, 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, run 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 implementations 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 help understand one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following schematic diagram: the claimed application requires more features than the features clearly stated in each claim. More specifically, as reflected in the claims below, the inventive aspects are less than all the features of the single embodiment disclosed above. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present application.

[0135] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present application and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0136] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A message processing method, characterized in that: Applied to a network device; 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 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.

2. The method according to claim 1, characterized in that 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 a 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.

3. The method according to claim 2, characterized in that 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 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.

4. The method according to claim 1, characterized in that The service processing path includes N service nodes; calling service nodes in the service processing path to perform a processing operation on the service message according to the service processing path associated with the first ARC index 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.

5. The method according to claim 1, characterized in that 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 an interface; If the enabling type of the target service node is enabled based on an 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 multiple service processing paths associated with multiple first ARC indexes respectively.

6. A message processing device, characterized in that: The device includes: An interface index acquisition module, configured to acquire an interface index of a target interface in response to receiving a service message through the target interface; A first ARC index determination module, configured to determine a first ARC index associated with the interface index; A message processing module is used to call a service node in the service processing path according to the service processing path associated with the first ARC index to perform processing operations 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.

7. The device according to claim 6, characterized in that The device also includes: A second ARC index determination 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; The service processing path generation module is used to generate 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.

8. The device according to claim 7, characterized in that 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.

9. 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 5 by executing the computer instructions.

10. 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 5.

Citation Information

Patent Citations

  • Interface abnormality detection method, apparatus, device and system

    CN109344061A

  • Network element service interface creation method and device and related equipment

    CN116743832A

  • Service arrangement method and device

    CN117792935A

  • Message processing method and device

    CN118524053A

  • Bit indexed explicit replication for deterministic network data plane

    US20170222920A1