Disclosure of Invention
In view of the foregoing, it is desirable to provide a data processing method, apparatus, computer device, and storage medium that enable efficient utilization of the flow table space of a programmable switch.
In a first aspect, the present application provides a data processing method applied to a functional forwarding switch, the method comprising:
Receiving a data packet to be processed;
Determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed;
And carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In one embodiment, the NSH protocol includes a service index identifier, where the service index identifier includes at least one first field;
The determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to the internet standard NSH protocol corresponding to the data packet to be processed includes:
And determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to the field value corresponding to each first field in the service index identifier.
In one embodiment, the determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to a field value corresponding to each first field in the service index identifier includes:
taking the field value in the service index identifier as at least one first field of a target value as at least one target field;
And taking the position sequence of each target field in the service index identifier as the processing sequence corresponding to each target function.
In one embodiment, the service index identifier further includes a second field, where the second field is used to characterize whether the pending data packet needs to enable an NSH proxy function, and the method further includes:
If the field value of the second field is the target value, performing decapsulation NSH packet header processing on the data packet to be processed, and sending the decapsulated data packet to a computing node, so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
and receiving the processed data packet to be processed, which is sent by the computing node.
In one embodiment, the method further includes performing field modification on the first field according to network function control information of the function forwarding switch of the next hop if the field value of the second field is not the target value and the function forwarding switch of the next hop exists.
In one embodiment, the method further comprises:
If the functional forwarding switch is not the functional forwarding switch of the last hop, determining the functional forwarding switch of the next hop according to the switch transmission path;
And sending the target data to a function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed.
In a second aspect, the present application also provides a data processing apparatus configured to a functional forwarding switch, the apparatus comprising:
the receiving module is used for receiving the data packet to be processed;
the determining module is used for determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an internet standard NSH protocol corresponding to the data packet to be processed;
And the processing module is used for carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Receiving a data packet to be processed;
Determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed;
And carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Receiving a data packet to be processed;
Determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed;
And carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
Receiving a data packet to be processed;
Determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed;
And carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
After receiving the data packet to be processed, the data processing method, the device, the computer equipment and the storage medium determine at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to the internet standard NSH protocol corresponding to the data packet to be processed, and further perform data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data. According to the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol comprises a service index identifier, and the service index identifier comprises at least one first field, so that at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to the Internet standard NSH protocol corresponding to the data packet to be processed, the execution of partial network functions through the field values of the first field is ensured, the flow table of sharing the same set of network functions by service function chains of different SPIs is realized, the occupation of the flow table space of a programmable switch is greatly reduced, and the network function isolation among different paths is ensured, thereby reducing the complexity of communication traffic and communication steps and preventing the waste of flow table resources.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
With the development of network technology and computers, the service demands of people are continuously diversified, and the service flow is also growing, which puts higher demands on the service mode and the computing power of the network. Secondly, along with the concept of 'cloud network convergence', the network is required to provide flexible and customizable computing power service contents for different services besides bearing basic forwarding tasks. In this regard, the fusion network proposes a network architecture system of a network depth fusion based on three layers and three domains, as shown in fig. 1, and the generalized service layer and the fusion network layer are longitudinally decoupled by mapping an adaptation layer, so that coordinated movement and intelligent fusion of the power service layer and the network layer are realized, and customizable power service is provided for users. The mapping adaptation layer deploys the service functions into the converged network layer, so that the service functions are sequentially linked to form a service function chain (Service Function Chain, SFC), and diversified computing power and service requirements are supported.
However, in the traditional power cluster operation mode, the power task is performed only by the computing nodes, and the network is only responsible for realizing the communication among the computing nodes. As the number of computing nodes increases, the latency of the communication may be significantly increased. Particularly when multiple nodes communicate simultaneously, the communication efficiency is greatly reduced due to the suddenly increased communication volume and more complex communication steps. In recent years, programmable switching devices have rapidly developed, which have a certain network function processing capability, so that the computing capability in the network is greatly enhanced. Therefore, in order to realize more flexible and efficient resource utilization, in-network computation needs to be introduced into a fusion network, part of computation tasks are unloaded into network components, communication efficiency is improved, and decoupling of computation time delay and the number of servers is realized, so that the computation time delay is greatly reduced, and the completion speed of the computation tasks is improved. And introducing a fusion network calculated in the network, and expanding the isomorphic service function chain into a heterogeneous service function chain through the cooperative work of the programmable switch and the calculation node.
In the above context, the mainstream NSH protocol, designed for traditional power trunking mode, does not provide support for heterogeneous service function chains joining programmable switches. Even if the heterogeneous service function chain deployment system is designed, the design does not consider part of characteristics of the programmable switch, and finally the programmable switch can store a large number of repeated flow table items, so that the waste of flow table resources is caused.
In view of the above, the present invention proposes a data processing method that can be applied to an application environment as shown in fig. 2. Wherein the functional forwarding switch 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. After receiving the data packet to be processed, determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an internet standard NSH protocol corresponding to the data packet to be processed, and further, performing data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In one embodiment, as shown in fig. 3, a data processing method is provided, and the method is applied to the functional forwarding switch 102 in fig. 1 for illustration, and includes the following steps:
s301, receiving a data packet to be processed.
It should be noted that, before the data processing method is executed, a Linux (UNIX-like operating system) operating system may be installed in advance, and BMv virtual switches may be installed on the basis of this. The data processing operation on the programmable switch is completed by writing the P4 program.
Wherein, P4 (Programming Protocol-INDEPENDENT PACKET Processors) is a high-level programming language for a data plane, which can support the analysis and processing of any protocol message by the P4 language and support the control plane to dynamically control the data forwarding and message processing of the programmable switch.
BMv2 is a software switch, which can support P4 programming.
S302, determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an Internet standard NSH protocol corresponding to the data packet to be processed.
It should be noted that, the NSH protocol includes a service index identifier and a service path identifier, where the service index identifier may be denoted as an SI identifier, and the service path identifier may be denoted as an SPI identifier.
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 shown in fig. 4, where the SPI identifier is used to specify a heterogeneous service function chain path, and the length is 24 bits (binary digits). And the SI mark indicates the network function to be executed by the character to be processed, and the length is 8 bits. The SI field is actually a combined field of 81 bit fields. Wherein each 1bit field corresponds to a network function that needs to be performed. When the value of the 1bit field is set to 1, it indicates that the functional forwarding switch needs to execute the network function corresponding to the field. The order corresponds to the pipeline processing logic of the programmable switch (e.g., the pipeline processing logic defined by switch 1 is to execute network function 1 before network function 2, then the 1 st bit of the SI field corresponds to network function 1 and the 2 nd bit corresponds to network function 2).
Further, the last bit of the SI identifier in the NSH protocol is used to determine whether to enable the NSH proxy function, that is, whether to enable the NSH proxy function for the current data packet to be processed is characterized when the field value of the last bit of the SI identifier is different.
S303, carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
According to the data processing method, after the data packet to be processed is received, at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to the Internet standard NSH protocol corresponding to the data packet to be processed, and further, data processing is carried out on the data packet to be processed according to each target function and the processing sequence corresponding to each target function, so that target data is obtained. According to the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol comprises a service index identifier, and the service index identifier comprises at least one first field, so that at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to the Internet standard NSH protocol corresponding to the data packet to be processed, the execution of partial network functions through the field values of the first field is ensured, the flow table of sharing the same set of network functions by service function chains of different SPIs is realized, the occupation of the flow table space of a programmable switch is greatly reduced, and the network function isolation among different paths is ensured, thereby reducing the complexity of communication traffic and communication steps and preventing the waste of flow table resources.
In one embodiment, the NSH protocol includes a service index identifier, where the service index identifier includes at least one first field.
Therefore, when at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to the internet standard NSH protocol corresponding to the data packet to be processed, the at least one target function corresponding to the data packet to be processed and the processing sequence corresponding to each target function can be determined according to the field value corresponding to each first field in the service index identifier.
Specifically, as shown in fig. 5, when at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function need to be determined according to a field value corresponding to each first field in the service index identifier, the following may be included:
S501, taking at least one first field with a field value in the service index identifier as a target value as at least one target field.
In one embodiment of the present application, the target value may be preset to be 1, so if the field value of a certain first field in the service index identifier is 1, the first field is taken as at least one target field.
S502, the position sequence of each target field in the service index identifier is used as the corresponding processing sequence of each target function.
In one embodiment of the present application, if the service index identifier includes 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 sequence corresponding to each target function is determined according to the sequence of the first bit, the third bit and the last fifth bit.
It should be noted that, the service index identifier further includes a second field, where the second field is used to characterize whether the to-be-processed data packet needs to enable the NSH proxy function;
Wherein the second field may be located at the last bit of the service index identity.
Specifically, if the field value of the second field is the target value, the method includes that decapsulating NSH packet header processing is performed on the data packet to be processed, 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, and the processed data packet to be processed sent by the computing node is received.
In one embodiment of the present application, if the field value of the second field is the target value, then the sfc_decap action is performed to decapsulate the NSH packet header. The data packet will now be sent to the compute node SF connected to the functional forwarding switch. The data packet to be processed received by the container in the computing node is an ipv4 data packet which is removed from the NSH header and can be normally parsed, the network function processing is carried out on the data packet, and the processed data packet to be processed is transmitted back to the forwarding switch of the network function forwarding function.
Further, if the field value of the second field is not the target value and there is a function forwarding switch of the next hop, performing field modification on the first field according to network function control information of the function forwarding switch of the next hop.
According to the data processing method, at least one first field with the field value in the service index identifier as the target value is used as at least one target field, and the position sequence of each target field in the service index identifier is used as the processing sequence corresponding to each target function, so that the execution of part of network functions is realized through the field value of the first field, and the service function chains of different SPIs share the flow table of the same set of network functions, thereby reducing the complexity of the communication quantity and the communication steps and preventing the waste of flow label resources.
In one embodiment, as shown in fig. 6, after performing data processing on the data packet to be processed to obtain the target data, the method further includes the following:
S601, 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 switch transmission path can be obtained according to the service requirement of the user for the data to be processed.
In one embodiment of the present application, it may be determined whether the current functional forwarding switch is the last hop functional forwarding switch according to the switch transmission path.
S602, the target data is sent to the function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed.
In one embodiment of the present application, as shown in fig. 7, an action matching flow for data processing can be determined according to the above content, as shown in fig. 7, a generalized service layer analyzes a service requirement of a user, matches a required service function according to the user requirement, and sends the service requirement to a policy generator of a mapping adaptation layer to generate a deployment policy meeting the constraint of the user requirement, allocates a corresponding SPI identifier, selects a suitable network component, and issues a corresponding flow table through an interface. And then the data packet to be processed corresponding to the user enters the converged network layer to start executing heterogeneous service function chain processing. And the edge node executes an NSH_ ClasSI identifier fier table, matches with SPI identifier identifiers of the header according to user source IP and destination IP, executes SFC_ Encap action to encapsulate and improve NSH protocol packet header, writes relevant information such as SPI identifier, SI identifier and the like according to controller strategy, wherein the switch bit of the SI identifier corresponds to the network function required to be processed by the next hop function forwarding switch. And the forwarding switch node of the first-hop network function receives the data packet, firstly executes the SFC_forward table in the Ingress, matches the SPI identification and the SI identification field in the NSH header, and acquires the forwarding port. And then matching each network function table, wherein the matching fields are fields required by executing the network function and corresponding switch bits in the SI mark, and if the switch bit is set to be 1, executing the corresponding network function. After all network function action matching tables are matched, a switch_to_pod table is matched, and if the last bit of the SI identification field is matched, the SFC_Decap action is executed, and the NSH packet head is unpacked. The data packet will now be sent to the compute node SF connected to the functional forwarding switch. The data packet received by the container in the computing node is an ipv4 data packet which can be normally analyzed and is removed from the NSH header, network function processing is carried out on the data packet, the processed data packet is transmitted back To the network function forwarding Switch, at the moment, the Pod_To_switch table is matched, an entry port is matched, SFC_ Encap _for_Pod action is executed To package the NSH header, and the NSH header is delivered To the next hop network function forwarding Switch node. If the matching result does not need to be unpacked, the SFC_Next table is matched, the SPI identification and the SI identification field are matched, the modification_SI identification action is executed, the SI identification field is modified, and the network function control information of the Next hop switch is modified. A specific network function action matching table and sfc_next are shown in fig. 8. The network function forwarding function thereafter forwards the switch node workflow as the first hop. And the forwarding switch node of the last hop network function receives the data packet, executes an SFC_Forward table in the Ingress, matches SPI identification and SI identification fields in the NSH header, and acquires a forwarding port. And finally, matching the SFC_terminal table, matching the target IP, executing NSH_Decap action, disassembling the NSH packet header and sending out the data packet, and ending the processing flow of all heterogeneous service function chains of the fusion network layer.
Furthermore, in order to implement the data processing method of the present application to implement ordered management of SFC in operation, an application program interface for interfacing the policy generator and the network component needs to be designed. The overall structure corresponding to the application program interface is shown in fig. 9. When the system starts to operate, a component resource table is needed to be generated according to pipeline processing logic of each switch, the row number of the table represents the number of each switch, the column number represents the sequence of the switch for processing the network function, and the content of the table is the name of the network function. And secondly, each switch maintains an SFC running condition table, wherein the row number of the table represents SPI number, the column number represents a certain network function, the table content is 10-1 variable, and the table represents whether the network function corresponding to the column number needs to be executed on the switch or not on the path corresponding to the SPI number. After the policy is generated by the decision generator, the SPI path label is allocated for the service, and the interface is called to set 1 for the network function to be executed by the switch on the SFC running table of the switch on the path. And then the decision generator calls the deployment issuing application program interface by taking the generated path and the corresponding SPI number as parameters. And the deployment issuing application program generates an SI field for each hop of switch according to the path, the corresponding SFC running condition table and the component resource table. And then, the matching table is orderly driven into the switch on the path through the P4run interface to finish the issuing of the strategy, and meanwhile, the service functions required to be deployed on the computing nodes are deployed and managed through the container arrangement engine.
According to the data processing method, the target data is sent to the function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed, and smooth proceeding of a data processing flow is ensured.
In one embodiment, as shown in fig. 10, when the data packet to be processed needs to be processed, the following contents may be included:
s1001, receiving a data packet to be processed.
S1002, taking the field value in the service index identifier as at least one first field of the target value as at least one target field.
S1003, the position sequence of each target field in the service index identifier is used as the corresponding processing sequence of each target function.
S1004, carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
S1005, 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.
S1006, the target data is sent to the function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed.
According to the data processing method, after the data packet to be processed is received, at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to the Internet standard NSH protocol corresponding to the data packet to be processed, and further, data processing is carried out on the data packet to be processed according to each target function and the processing sequence corresponding to each target function, so that target data is obtained. According to the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol comprises a service index identifier, and the service index identifier comprises at least one first field, so that at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to the Internet standard NSH protocol corresponding to the data packet to be processed, the execution of partial network functions through the field values of the first field is ensured, the flow table of sharing the same set of network functions by service function chains of different SPIs is realized, the occupation of the flow table space of a programmable switch is greatly reduced, and the network function isolation among different paths is ensured, thereby reducing the complexity of communication traffic and communication steps and preventing the waste of flow table resources.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data processing device for realizing the above related data processing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the data processing device provided below may refer to the limitation of the data processing method hereinabove, and will not be repeated herein.
In one embodiment, as shown in FIG. 11, there is provided a data processing apparatus comprising a receiving module 10, a determining module 20, and a processing module 30, wherein:
a receiving module 10, configured to receive a data packet to be processed.
The determining module 20 is configured to determine at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an internet standard NSH protocol corresponding to the data packet to be processed.
The processing module 30 is configured to perform data processing on the data packet to be processed according to each target function and a processing sequence corresponding to each target function, so as to obtain target data.
In one embodiment, at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to a field value corresponding to each first field in the service index identifier.
In one embodiment, at least one first field with a field value in the service index identifier as a target value is taken as at least one target field;
and taking the position sequence of each target field in the service index identifier as the corresponding processing sequence of each target function.
In one embodiment, if the field value of the second field is the target value, performing decapsulation NSH packet header processing on the to-be-processed data packet, and sending the decapsulated to-be-processed data packet to the computing node, so that the computing node performs NSH proxy function processing on the decapsulated to-be-processed data packet;
And receiving the processed data packet to be processed, which is sent by the computing node.
In one embodiment, if the field value of the second field is not the target value and there is a function forwarding switch of the next hop, the field modification is performed on the first field according to the network function control information of the function forwarding switch of the next hop.
In one embodiment, if the functional forwarding switch is not the functional forwarding switch of the last hop, determining the functional forwarding switch of the next hop according to the switch transmission path;
and sending the target data to the function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed.
After receiving the data packet to be processed, the data processing device determines at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to an internet standard NSH protocol corresponding to the data packet to be processed, and further performs data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data. According to the NSH protocol corresponding to the data packet to be processed, wherein the NSH protocol comprises a service index identifier, and the service index identifier comprises at least one first field, so that at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function are determined according to the Internet standard NSH protocol corresponding to the data packet to be processed, the execution of partial network functions through the field values of the first field is ensured, the flow table of sharing the same set of network functions by service function chains of different SPIs is realized, the occupation of the flow table space of a programmable switch is greatly reduced, and the network function isolation among different paths is ensured, thereby reducing the complexity of communication traffic and communication steps and preventing the waste of flow table resources.
Each of the modules in the above-described data processing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 12. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. 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. Wherein the processor of the computer device is configured 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 computer programs in the non-volatile storage media. 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 for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data processing method. The display unit of the computer device is used for forming a visual picture, and 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 equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
Receiving a data packet to be processed;
according to an internet standard NSH protocol corresponding to the data packet to be processed, determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function;
and carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In one embodiment, the processor when executing the computer program further performs the steps of:
And determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to the field value corresponding to each first field in the service index identifier.
In one embodiment, the processor when executing the computer program further performs the steps of:
taking the field value in the service index identifier as at least one first field of the target value as at least one target field;
and taking the position sequence of each target field in the service index identifier as the corresponding processing sequence of each target function.
In one embodiment, the processor when executing the computer program further performs the steps of:
If the field value of the second field is the target value, performing decapsulation NSH packet header processing on the data packet to be processed, and sending the decapsulated data packet to the computing node so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
And receiving the processed data packet to be processed, which is sent by the computing node.
In one embodiment, the processor when executing the computer program further performs the steps of:
If the field value of the second field is not the target value and the function forwarding switch of the next hop exists, carrying out field modification on the first field according to the network function control information of the function forwarding switch of the next hop.
In one embodiment, the processor when executing the computer program further performs the steps of:
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;
and sending the target data to the function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Receiving a data packet to be processed;
according to an internet standard NSH protocol corresponding to the data packet to be processed, determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function;
and carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
And determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to the field value corresponding to each first field in the service index identifier.
In one embodiment, the computer program when executed by the processor further performs the steps of:
taking the field value in the service index identifier as at least one first field of the target value as at least one target field;
and taking the position sequence of each target field in the service index identifier as the corresponding processing sequence of each target function.
In one embodiment, the computer program when executed by the processor further performs the steps of:
If the field value of the second field is the target value, performing decapsulation NSH packet header processing on the data packet to be processed, and sending the decapsulated data packet to the computing node so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
And receiving the processed data packet to be processed, which is sent by the computing node.
In one embodiment, the computer program when executed by the processor further performs the steps of:
If the field value of the second field is not the target value and the function forwarding switch of the next hop exists, carrying out field modification on the first field according to the network function control information of the function forwarding switch of the next hop.
In one embodiment, the computer program when executed by the processor further performs the steps of:
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;
and sending the target data to the function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
Receiving a data packet to be processed;
according to an internet standard NSH protocol corresponding to the data packet to be processed, determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function;
and carrying out data processing on the data packet to be processed according to each target function and the processing sequence corresponding to each target function to obtain target data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
And determining at least one target function corresponding to the data packet to be processed and a processing sequence corresponding to each target function according to the field value corresponding to each first field in the service index identifier.
In one embodiment, the computer program when executed by the processor further performs the steps of:
taking the field value in the service index identifier as at least one first field of the target value as at least one target field;
and taking the position sequence of each target field in the service index identifier as the corresponding processing sequence of each target function.
In one embodiment, the computer program when executed by the processor further performs the steps of:
If the field value of the second field is the target value, performing decapsulation NSH packet header processing on the data packet to be processed, and sending the decapsulated data packet to the computing node so that the computing node performs NSH proxy function processing on the decapsulated data packet to be processed;
And receiving the processed data packet to be processed, which is sent by the computing node.
In one embodiment, the computer program when executed by the processor further performs the steps of:
If the field value of the second field is not the target value and the function forwarding switch of the next hop exists, carrying out field modification on the first field according to the network function control information of the function forwarding switch of the next hop.
In one embodiment, the computer program when executed by the processor further performs the steps of:
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;
and sending the target data to the function forwarding switch of the next hop, so that the function forwarding switch of the next hop processes the target data as new data to be processed.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.