Data processing method and device, computer equipment and storage medium
By receiving the pending data packets in the function forwarding switch and determining the target function and processing order according to the NSH protocol, the problems of low communication efficiency and waste of stream table resources in the traditional computing power cluster mode are solved, and efficient utilization of stream table space and isolation of network functions are achieved.
Patent Information
- Application Number
- CN202411994361.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-04
AI Technical Summary
When the number of computing nodes increases, the traditional computing power cluster operation mode will significantly increase communication delay, resulting in a decrease in communication efficiency, and the programmable switch stores a large number of duplicate flow table entries, resulting in wasting of flow table resources.
By receiving the data packets to be processed, and determining the target function and processing order according to their corresponding Internet standard NSH protocol, data processing is carried out to achieve efficient utilization of the stream table space. The specific method includes deencapsulating the NSH packet header, sending it to the computing node for NSH proxy function processing, and modifying the fields identified by the service index if necessary to reduce flow table occupancy.
This method optimizes the data processing process, reduces the cumbersomeness of traffic volume and communication steps, avoids waste of stream table resources, and realizes network function isolation of different SPI service function chains.
Smart Images

Figure CN119766762A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network service technology, and in particular to a data processing method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of network technology and computers, people's business needs are becoming more diverse and business traffic is growing, which puts higher demands on the network's service model and computing power. Secondly, with the concept of "cloud-network integration", in addition to basic forwarding tasks, the network also needs to provide flexible and customizable computing service content for different businesses.
[0003] However, the traditional computing cluster operation mode relies solely on computing nodes to perform computing tasks, and the network itself is only responsible for realizing communication between computing nodes. When the number of computing nodes increases, the communication latency will increase significantly. Especially when multiple nodes communicate at the same time, the sudden increase in communication volume and more complex communication steps will greatly reduce communication efficiency, and ultimately cause the programmable switch to store a large number of duplicate flow table entries, resulting in a waste of flow table resources. Summary of the invention
[0004] Based on this, it is necessary to provide a data processing method, device, computer equipment and storage medium that can achieve efficient utilization of the flow table space of a programmable switch in response to the above technical problems.
[0005] In a first aspect, the present application provides a data processing method, which is applied to a function forwarding switch, and the method includes:
[0006] Receive data packets to be processed;
[0007] Determine, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed, and a processing order corresponding to each of the target functions;
[0008] According to each of the target functions and the processing order corresponding to each of the target functions, data processing is performed on the data packets to be processed to obtain target data.
[0009] In one of the embodiments, the NSH protocol includes a service index identifier, and the service index identifier includes at least one first field;
[0010] The determining, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed and a processing order corresponding to each of the target functions comprises:
[0011] At least one target function corresponding to the data packet to be processed and a processing order corresponding to each of the target functions are determined according to a field value corresponding to each of the first fields in the service index identifier.
[0012] In one of the embodiments, determining at least one target function corresponding to the to-be-processed data packet and a processing order corresponding to each of the target functions according to a field value corresponding to each of the first fields in the service index identifier includes:
[0013] Taking at least one first field in the service index identifier whose field value is a target value as at least one target field;
[0014] The position sequence of each target field in the service index identifier is used as the processing sequence corresponding to each target function.
[0015] In one of the embodiments, the service index identifier further includes a second field, and the second field is used to indicate whether the to-be-processed data packet needs to enable the NSH proxy function; the method further includes:
[0016] If the field value of the second field is the target value, decapsulating the data packet to be processed by NSH header processing, and sending the decapsulated data packet to be processed to the computing node, so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
[0017] Receive the processed data packet to be processed sent by the computing node.
[0018] In one of the embodiments, the method further includes: if the field value of the second field is not a target value and there is a next-hop functional forwarding switch, modifying the first field according to network function control information of the next-hop functional forwarding switch.
[0019] In one embodiment, the method further comprises:
[0020] If the function forwarding switch is not the function forwarding switch of the last hop, determining the function forwarding switch of the next hop according to the switch transmission path;
[0021] The target data is sent to the functional forwarding switch of the next hop, so that the functional forwarding switch of the next hop processes the target data as new data to be processed.
[0022] In a second aspect, the present application further provides a data processing device, which is configured in a function forwarding switch, and the device includes:
[0023] A receiving module, used for receiving data packets to be processed;
[0024] A determination module, used to determine at least one target function corresponding to the data packet to be processed and a processing order corresponding to each of the target functions according to the Internet standard NSH protocol corresponding to the data packet to be processed;
[0025] The processing module is used to process the data packets to be processed according to the target functions and the processing order corresponding to the target functions to obtain target data.
[0026] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0027] Receive data packets to be processed;
[0028] Determine, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed, and a processing order corresponding to each of the target functions;
[0029] According to each of the target functions and the processing order corresponding to each of the target functions, data processing is performed on the data packets to be processed to obtain target data.
[0030] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0031] Receive data packets to be processed;
[0032] Determine, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed, and a processing order corresponding to each of the target functions;
[0033] According to each of the target functions and the processing order corresponding to each of the target functions, data processing is performed on the data packets to be processed to obtain target data.
[0034] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0035] Receive data packets to be processed;
[0036] Determine, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed, and a processing order corresponding to each of the target functions;
[0037] According to each of the target functions and the processing order corresponding to each of the target functions, data processing is performed on the data packets to be processed to obtain target data.
[0038] The above-mentioned data processing method, device, computer equipment and storage medium, after receiving the data packet to be processed, determine at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function according to the Internet standard NSH protocol corresponding to the data packet to be processed, and then, according to each target function and the processing order corresponding to each target function, perform data processing on the data packet to be processed to obtain the target data. According to the above content, the present application uses the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol contains a service index identifier, and the service index identifier contains at least one first field; then, according to the Internet standard NSH protocol corresponding to the data packet to be processed, determine at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function, ensure that the execution of some network functions is realized through the field value of the first field, and realize that the service function chains of different SPIs share the same set of network function flow tables, greatly reducing the occupation of the programmable switch flow table space, and ensuring the isolation of network functions between different paths; thereby reducing the cumbersomeness of communication volume and communication steps, and preventing the waste of flow label resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of a computing network deep fusion network architecture system provided in an embodiment of the present application;
[0040] Figure 2 An application environment diagram of a data processing method provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of a flow chart of a first data processing method provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the field positions and header field definitions in the NSH protocol provided in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of a second data processing method provided in an embodiment of the present application;
[0044] Figure 6 A schematic diagram of a third data processing method provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the service function chain forwarding process provided in an embodiment of the present application;
[0046] Figure 8A schematic diagram of an action matching table of SFC_Next provided in an embodiment of the present application;
[0047] Fig. 9 A schematic diagram of the implementation process of the control plane policy delivery provided in the embodiment of the present application;
[0048] Fig.10 A flowchart of a fourth data processing method provided in an embodiment of the present application;
[0049] Fig.11 A structural block diagram of a data processing device provided in an embodiment of the present application;
[0050] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] With the development of network technology and computers, people's business needs are becoming more and more diversified, and business traffic is also increasing, which puts higher requirements on the service model and computing power of the network. Secondly, with the introduction of the concept of "cloud-network integration", in addition to basic forwarding tasks, the network also needs to provide flexible and customizable computing service content for different businesses. In response to this, Rongsuan Network proposed a deep integration network architecture system based on "three layers" and "three domains", such as Figure 1 As shown in the figure, through the mapping adaptation layer, the generalized service layer and the converged network layer are vertically decoupled, and the computing power service layer and the network layer are coordinated and intelligently integrated to provide users with customizable computing power services. The mapping adaptation layer deploys service functions to the converged network layer, linking them in sequence to form a service function chain (SFC), thereby supporting diverse computing power and business needs.
[0053] However, the traditional computing cluster operation mode relies solely on computing nodes to perform computing tasks, and the network itself is only responsible for realizing communication between each computing node. When the number of computing nodes increases, the communication delay will be significantly increased. Especially when multiple nodes communicate at the same time, the suddenly increased communication volume and more complex communication steps will greatly reduce the communication efficiency. In recent years, programmable switching devices have developed rapidly, and they have certain network function processing capabilities, which greatly enhances the computing power within the network. Therefore, in order to achieve more flexible and efficient resource utilization, it is necessary to introduce in-network computing into the integrated computing network, unload some computing tasks into the network components, improve communication efficiency, and decouple computing delay from the number of servers, thereby greatly reducing computing delay and increasing the speed of computing task completion. The integrated computing network that introduces in-network computing expands the homogeneous service function chain into a heterogeneous service function chain through the collaborative work of programmable switches and computing nodes.
[0054] In the above context, the mainstream NSH protocol is designed for the traditional computing cluster model and does not provide support for heterogeneous service function chains added to programmable switches. Even if a heterogeneous service function chain deployment system is designed, its design does not take into account some characteristics of programmable switches, which will eventually cause programmable switches to store a large number of duplicate flow table entries, resulting in a waste of flow table resources.
[0055] In view of the above problems, the present invention proposes a data processing method which can be applied to Figure 2 In the application environment shown. Among them, the function forwarding switch 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. After receiving the data packet to be processed, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function are determined, and then, according to each target function and the processing order corresponding to each target function, the data packet to be processed is processed to obtain the target data.
[0056] In one embodiment, Figure 3 As shown, a data processing method is provided, which is applied to Figure 1 The function forwarding switch 102 in FIG. 1 is used as an example to illustrate, and the following steps are included:
[0057] S301, receiving a data packet to be processed.
[0058] It should be noted that before executing the data processing method, a Linux (a UNIX-like operating system) operating system may be pre-installed, and a BMv2 virtual switch may be installed on this basis. The data processing operation on the programmable switch is completed by writing a P4 program.
[0059] Among them, P4 (Programming Protocol-Independent Packet Processors) is a high-level programming language for the data plane. The P4 language can support the parsing and processing of any protocol message, and support the control plane to dynamically control the data forwarding and message processing of the programmable switch.
[0060] Among them, BMv2 is a software switch that supports P4 programming.
[0061] S302, determining at least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function according to the Internet standard NSH protocol corresponding to the data packet to be processed.
[0062] It should be noted that the NSH protocol includes a service index identifier and a service path identifier; wherein the service index identifier can be represented as an SI identifier; and the service path identifier can be represented as an SPI identifier.
[0063] In one embodiment of the present application, the location of the NSH protocol in the data packet to be processed and its header field definition are as follows: Figure 4 As shown, the SPI identifier is used to specify the heterogeneous service function chain path, and its length is 24 bits (binary digit). The SI identifier indicates the network function that needs to be executed for the character to be processed, and its length is 8 bits. The SI field is actually a combination field of 8 1-bit fields. Each 1-bit field corresponds to a network function that needs to be executed. When the value of the 1-bit field is set to 1, it means that the function forwarding switch needs to execute the network function corresponding to the field. The order corresponds to the pipeline processing logic of the programmable switch (for example, the pipeline processing logic defined by switch 1 is to execute network function 1 first and then execute network function 2, then the 1st bit of the SI field corresponds to network function 1, and the 2nd bit corresponds to network function 2).
[0064] To further explain, the last bit of the SI identifier in the NSH protocol is used to determine whether the NSH proxy function needs to be enabled, that is, when the field value of the last bit of the SI identifier is different, it indicates whether the NSH proxy function needs to be enabled for the current data packet to be processed.
[0065] S303, performing data processing on the data packet to be processed according to each target function and the processing order corresponding to each target function to obtain target data.
[0066] The above-mentioned data processing method, after receiving the data packet to be processed, determines at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function according to the Internet standard NSH protocol corresponding to the data packet to be processed, and then, according to each target function and the processing order corresponding to each target function, performs data processing on the data packet to be processed to obtain the target data. According to the above content, the present application uses the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol contains a service index identifier, and the service index identifier contains at least one first field; then, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function are determined, ensuring that the execution of some network functions is realized through the field value of the first field, and realizing that the service function chains of different SPIs share the same set of network function flow tables, greatly reducing the occupation of the programmable switch flow table space, and ensuring the isolation of network functions between different paths; thereby reducing the cumbersomeness of the communication volume and the communication steps, and preventing the waste of flow label resources.
[0067] In one embodiment, the NSH protocol includes a service index identifier, and the service index identifier includes at least one first field.
[0068] Therefore, when it is necessary to determine at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function based on the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function can be determined based on the field value corresponding to each first field in the service index identifier.
[0069] Specifically, Figure 5 As shown, when it is necessary to determine at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function according to the field value corresponding to each first field in the service index identifier, the following contents may be included:
[0070] S501: Use at least one first field in a service index identifier whose field value is a target value as at least one target field.
[0071] In one embodiment of the present application, the target value may be preset to 1. Therefore, if the field value of a first field in the service index identifier is 1, the first field is used as at least one target field.
[0072] S502: The position sequence of each target field in the service index identifier is used as the processing sequence corresponding to each target function.
[0073] In one embodiment of the present application, if the service index identifier contains a first field of seven bits, where the target values of the first bit, the third bit and the fifth bit are 1, the first field corresponding to the first bit, the first field corresponding to the third bit and the first field corresponding to the fifth bit are used as target fields, and the processing order corresponding to each target function is determined in the order of the first bit first, then the third bit, and finally the fifth bit.
[0074] It should be noted that the service index identifier also includes a second field, and the second field is used to indicate whether the data packet to be processed needs to enable the NSH proxy function;
[0075] The second field may be located at the last bit of the service index identifier.
[0076] Specifically, if the field value of the second field is the target value, the NSH packet header of the data packet to be processed is decapsulated, and the decapsulated data packet to be processed is sent to the computing node, so that the computing node performs NSH agent function processing on the decapsulated data packet to be processed; and the processed data packet to be processed sent by the computing node is received.
[0077] In one embodiment of the present application, if the field value of the second field is the target value, the SFC_Decap action is executed to decapsulate the NSH header. At this time, the data packet will be sent to the computing node SF connected to the function forwarding switch. The data packet to be processed received by the container in the computing node is an IPv4 data packet that can be normally parsed without the NSH header, and the network function is processed and the processed data packet to be processed is transmitted back to the network function forwarding function forwarding switch.
[0078] To further illustrate, if the field value of the second field is not the target value and there is a function forwarding switch at the next hop, the first field is modified according to the network function control information of the function forwarding switch at the next hop.
[0079] The above-mentioned data processing method realizes the execution of part of the network function through the field value of the first field by taking at least one first field whose field value in the service index identifier is the target value as at least one target field, and takes the position sequence of each target field in the service index identifier as the processing sequence corresponding to each target function, and allows service function chains of different SPIs to share the same set of network function flow tables, thereby reducing the communication volume and the complexity of the communication steps and preventing the waste of flow mark resources.
[0080] In one embodiment, if Figure 6 As shown, after processing the data packet to be processed to obtain the target data, the method further includes the following contents:
[0081] S601: If the function forwarding switch is not the function forwarding switch of the last hop, determine the function forwarding switch of the next hop according to the switch transmission path.
[0082] The switch transmission path can be obtained according to the user's service requirements for the data to be processed.
[0083] In one embodiment of the present application, it can be determined according to the switch transmission path whether the current function forwarding switch is the function forwarding switch of the last hop.
[0084] S602: Send the target data to the next-hop functional forwarding switch, so that the next-hop functional forwarding switch processes the target data as new data to be processed.
[0085] In one embodiment of the present application, Figure 7 As shown, according to the above content, the action matching process for data processing can be determined, such as Figure 7As shown in the figure, the generalized service layer analyzes the user's service needs, matches the required service functions according to the user's needs, and hands it over to the policy generator of the mapping adaptation layer to generate a deployment strategy that meets the user's demand constraints; assign the corresponding SPI identifier, select the appropriate network component, and send the corresponding flow table through the interface. Then the user's corresponding data packet to be processed enters the converged network layer to start the heterogeneous service function chain processing. The edge node executes the NSH_ClassIdentifier table, matches the user's source IP, destination IP and the SPI identifier of the header, executes the SFC_Encap action to encapsulate and improve the NSH protocol header, and writes the SPI identifier, SI identifier and other related information according to the controller policy, where the switch bit of the SI identifier corresponds to the network function that the next hop function forwarding switch needs to process. Then match the SFC_Forward table, match the forwarding port of the next hop according to the SPI identifier and SI identifier, and modify the Ethernet header accordingly; the first hop network function forwarding function forwarding switch node receives the data packet, first executes the SFC_Forward table in Ingress, matches the SPI identifier and SI identifier fields in the NSH header, and obtains the forwarding port. Then, each network function table is matched. The matching fields are the fields required to execute the network function itself and the corresponding switch bit in the SI identifier. If the switch bit is set to 1, the corresponding network function is executed. After matching all network function action matching tables, the Switch_To_Pod table is matched, and the last bit of the SI identifier field is matched. If it is 1, the SFC_Decap action is executed to decapsulate the NSH header. At this time, the data packet will be sent to the computing node SF connected to the function forwarding switch. The data packet received by the container in the computing node is an IPv4 data packet that can be parsed normally without the NSH header. The network function is processed and the processed data packet is transmitted back to the network function forwarding switch. At this time, the Pod_To_Switch table is matched, the entry port is matched, and the SFC_Encap_For_Pod action is executed to encapsulate the NSH header and deliver it to the next-hop network function forwarding switch node. If the matching result does not require decapsulation, the SFC_Next table is matched, the SPI identifier and SI identifier field are matched, the Modify_SI identifier action is executed, the SI identifier field is modified, and it is modified to the network function control information of the next-hop switch. The specific network function action matching table and SFC_Next are as follows: Figure 8As shown. The subsequent network function forwarding switch node workflow is the same as the first hop. The last hop network function forwarding switch node receives the data packet, executes the SFC_Forward table in Ingress, matches the SPI identifier and SI identifier fields in the NSH header, and obtains the forwarding port. Finally, it matches the SFC_Terminal table, matches the destination IP, executes the NSH_Decap action, disassembles the NSH header and sends the data packet, and the processing flow of all heterogeneous service function chains at the fusion network layer ends.
[0086] Furthermore, in order to realize the orderly management of the running SFC by the data processing method of the present application, it is necessary to design an application program interface for connecting the strategy generator and the network component. The overall structure corresponding to the application program interface is as follows: Fig. 9 As shown. First, when the system starts running, it is necessary to generate a component resource table according to the pipeline processing logic of each switch. The row number of the table represents the number of each switch, the column number represents the order in which the switch processes the network function, and the content of the table is the name of the network function. Secondly, each switch will maintain an SFC operation status table. The row number of the table represents the SPI number, the column number represents a certain network function, and the content of the table is a 0-1 variable, which represents whether the path corresponding to the SPI number needs to execute the network function corresponding to the column number on the switch. After the decision generator generates the policy, it first assigns the SPI path number to this service, and calls the interface to set 1 for the network function that the switch needs to execute in the SFC operation table of the switch on the path. Then the decision generator calls the deployment and delivery application interface with the generated path and the corresponding SPI number as parameters. The deployment and delivery application generates the SI field for each hop switch according to the path, the corresponding SFC operation status table and the component resource table. Then, the matching table is sequentially entered into the switches on the path through the P4Runtime interface to complete the policy delivery. At the same time, the service functions that need to be deployed on the computing node are deployed and managed through the container orchestration engine.
[0087] The above data processing method ensures the smooth progress of the data processing flow by sending the target data to the next-hop functional forwarding switch so that the next-hop functional forwarding switch processes the target data as new data to be processed.
[0088] In one embodiment, if Fig.10 As shown, when data processing is required for the data packet to be processed, the following contents may be included:
[0089] S1001, receiving a data packet to be processed.
[0090] S1002: Use at least one first field in the service index identifier whose field value is a target value as at least one target field.
[0091] S1003: The position sequence of each target field in the service index identifier is used as the processing sequence corresponding to each target function.
[0092] S1004, performing data processing on the data packet to be processed according to each target function and the processing order corresponding to each target function to obtain target data.
[0093] S1005: If the function forwarding switch is not the function forwarding switch of the last hop, determine the function forwarding switch of the next hop according to the switch transmission path.
[0094] S1006, sending the target data to the functional forwarding switch of the next hop, so that the functional forwarding switch of the next hop processes the target data as new data to be processed.
[0095] The above-mentioned data processing method, after receiving the data packet to be processed, determines at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function according to the Internet standard NSH protocol corresponding to the data packet to be processed, and then, according to each target function and the processing order corresponding to each target function, performs data processing on the data packet to be processed to obtain the target data. According to the above content, the present application uses the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol contains a service index identifier, and the service index identifier contains at least one first field; then, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function are determined, ensuring that the execution of some network functions is realized through the field value of the first field, and realizing that the service function chains of different SPIs share the same set of network function flow tables, greatly reducing the occupation of the programmable switch flow table space, and ensuring the isolation of network functions between different paths; thereby reducing the cumbersomeness of the communication volume and the communication steps, and preventing the waste of flow label resources.
[0096] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0097] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.
[0098] In one embodiment, Fig.11 As shown, a data processing device is provided, comprising: a receiving module 10, a determining module 20 and a processing module 30, wherein:
[0099] The receiving module 10 is used to receive a data packet to be processed.
[0100] The determination module 20 is used to determine at least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function according to the Internet standard NSH protocol corresponding to the data packet to be processed.
[0101] The processing module 30 is used to process the data packets to be processed according to each target function and the processing order corresponding to each target function to obtain target data.
[0102] In one embodiment, at least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function are determined according to a field value corresponding to each first field in the service index identifier.
[0103] In one embodiment, at least one first field whose field value in the service index identifier is a target value is used as at least one target field;
[0104] The order of the positions of the target fields in the service index identifier is used as the processing order corresponding to the target functions.
[0105] In one embodiment, if the field value of the second field is the target value, the NSH header of the data packet to be processed is decapsulated, and the decapsulated data packet to be processed is sent to the computing node, so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
[0106] Receive the processed data packets sent by the computing node.
[0107] In one embodiment, if the field value of the second field is not the target value and there is a function forwarding switch at the next hop, the first field is modified according to the network function control information of the function forwarding switch at the next hop.
[0108] In one embodiment, if the function forwarding switch is not the function forwarding switch of the last hop, the function forwarding switch of the next hop is determined according to the switch transmission path;
[0109] The target data is sent to the functional forwarding switch of the next hop, so that the functional forwarding switch of the next hop processes the target data as new data to be processed.
[0110] After receiving the data packet to be processed, the above-mentioned data processing device determines at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function according to the Internet standard NSH protocol corresponding to the data packet to be processed, and then, according to each target function and the processing order corresponding to each target function, performs data processing on the data packet to be processed to obtain the target data. According to the above content, the present application uses the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol contains a service index identifier, and the service index identifier contains at least one first field; then, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed and the processing order corresponding to each target function are determined, ensuring that the execution of some network functions is realized through the field value of the first field, and realizing that the service function chains of different SPIs share the same set of network function flow tables, greatly reducing the occupation of the programmable switch flow table space, and ensuring the isolation of network functions between different paths; thereby reducing the communication volume and the cumbersomeness of the communication steps, and preventing the waste of flow label resources.
[0111] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0112] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.12As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0113] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0114] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0115] Receive data packets to be processed;
[0116] Determine at least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed;
[0117] According to each target function and the processing order corresponding to each target function, data processing is performed on the data packet to be processed to obtain target data.
[0118] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0119] At least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function are determined according to a field value corresponding to each first field in the service index identifier.
[0120] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0121] Taking at least one first field in the service index identifier whose field value is a target value as at least one target field;
[0122] The order of the positions of the target fields in the service index identifier is used as the processing order corresponding to the target functions.
[0123] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0124] If the field value of the second field is the target value, the NSH header of the data packet to be processed is decapsulated, and the decapsulated data packet to be processed is sent to the computing node, so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
[0125] Receive the processed data packets sent by the computing node.
[0126] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0127] If the field value of the second field is not the target value and there is a function forwarding switch at the next hop, the first field is modified according to the network function control information of the function forwarding switch at the next hop.
[0128] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0129] If the function forwarding switch is not the function forwarding switch of the last hop, determine the function forwarding switch of the next hop according to the switch transmission path;
[0130] The target data is sent to the functional forwarding switch of the next hop, so that the functional forwarding switch of the next hop processes the target data as new data to be processed.
[0131] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0132] Receive data packets to be processed;
[0133] Determine at least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed;
[0134] According to each target function and the processing order corresponding to each target function, data processing is performed on the data packet to be processed to obtain target data.
[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0136] At least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function are determined according to a field value corresponding to each first field in the service index identifier.
[0137] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0138] Taking at least one first field in the service index identifier whose field value is a target value as at least one target field;
[0139] The order of the positions of the target fields in the service index identifier is used as the processing order corresponding to the target functions.
[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0141] If the field value of the second field is the target value, the NSH header of the data packet to be processed is decapsulated, and the decapsulated data packet to be processed is sent to the computing node, so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
[0142] Receive the processed data packets sent by the computing node.
[0143] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0144] If the field value of the second field is not the target value and there is a function forwarding switch at the next hop, the first field is modified according to the network function control information of the function forwarding switch at the next hop.
[0145] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0146] If the function forwarding switch is not the function forwarding switch of the last hop, determine the function forwarding switch of the next hop according to the switch transmission path;
[0147] The target data is sent to the functional forwarding switch of the next hop, so that the functional forwarding switch of the next hop processes the target data as new data to be processed.
[0148] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0149] Receive data packets to be processed;
[0150] Determine at least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed;
[0151] According to each target function and the processing order corresponding to each target function, data processing is performed on the data packet to be processed to obtain target data.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0153] At least one target function corresponding to the data packet to be processed and a processing order corresponding to each target function are determined according to a field value corresponding to each first field in the service index identifier.
[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0155] Taking at least one first field in the service index identifier whose field value is a target value as at least one target field;
[0156] The order of the positions of the target fields in the service index identifier is used as the processing order corresponding to the target functions.
[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0158] If the field value of the second field is the target value, the NSH header of the data packet to be processed is decapsulated, and the decapsulated data packet to be processed is sent to the computing node, so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
[0159] Receive the processed data packets sent by the computing node.
[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0161] If the field value of the second field is not the target value and there is a function forwarding switch at the next hop, the first field is modified according to the network function control information of the function forwarding switch at the next hop.
[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0163] If the function forwarding switch is not the function forwarding switch of the last hop, determine the function forwarding switch of the next hop according to the switch transmission path;
[0164] The target data is sent to the functional forwarding switch of the next hop, so that the functional forwarding switch of the next hop processes the target data as new data to be processed.
[0165] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0166] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0167] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0168] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data processing method, characterized in that: Applied to a function forwarding switch, the method comprises: Receive data packets to be processed; Determine, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed, and a processing order corresponding to each of the target functions; According to each of the target functions and the processing order corresponding to each of the target functions, data processing is performed on the data packets to be processed to obtain target data.
2. The method according to claim 1, characterized in that The NSH protocol includes a service index identifier, and the service index identifier includes at least one first field; The determining, according to the Internet standard NSH protocol corresponding to the data packet to be processed, at least one target function corresponding to the data packet to be processed and a processing order corresponding to each of the target functions comprises: At least one target function corresponding to the data packet to be processed and a processing order corresponding to each of the target functions are determined according to a field value corresponding to each of the first fields in the service index identifier.
3. The method according to claim 2, characterized in that The determining, according to the field value corresponding to each of the first fields in the service index identifier, at least one target function corresponding to the data packet to be processed and a processing order corresponding to each of the target functions, comprises: Taking at least one first field in the service index identifier whose field value is a target value as at least one target field; The position sequence of each target field in the service index identifier is used as the processing sequence corresponding to each target function.
4. The method according to claim 3, characterized in that The service index identifier also includes a second field, and the second field is used to indicate whether the to-be-processed data packet needs to enable the NSH proxy function; the method also includes: If the field value of the second field is the target value, decapsulating the data packet to be processed by NSH header processing, and sending the decapsulated data packet to be processed to the computing node, so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed; Receive the processed data packet to be processed sent by the computing node.
5. The method according to claim 4, characterized in that The method further includes: if the field value of the second field is not a target value and there is a next-hop functional forwarding switch, modifying the first field according to network function control information of the next-hop functional forwarding switch.
6. The method according to claim 1, characterized in that The method further comprises: If the function forwarding switch is not the function forwarding switch of the last hop, determining the function forwarding switch of the next hop according to the switch transmission path; The target data is sent to the functional forwarding switch of the next hop, so that the functional forwarding switch of the next hop processes the target data as new data to be processed.
7. A data processing device, characterized in that: Configured in a function forwarding switch, the device includes: A receiving module, used for receiving data packets to be processed; A determination module, used to determine at least one target function corresponding to the data packet to be processed and a processing order corresponding to each of the target functions according to the Internet standard NSH protocol corresponding to the data packet to be processed; The processing module is used to process the data packets to be processed according to the target functions and the processing order corresponding to the target functions to obtain target data.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.