CN119766762A - Data processing method, device, computer equipment and storage medium - Google Patents

Data processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN119766762A
CN119766762A CN202411994361.2A CN202411994361A CN119766762A CN 119766762 A CN119766762 A CN 119766762A CN 202411994361 A CN202411994361 A CN 202411994361A CN 119766762 A CN119766762 A CN 119766762A
Authority
CN
China
Prior art keywords
processed
target
data packet
function
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411994361.2A
Other languages
Chinese (zh)
Inventor
马小婷
陈言
雷波
高德云
张越
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Technology Innovation Center
Priority to CN202411994361.2A priority Critical patent/CN119766762A/en
Publication of CN119766762A publication Critical patent/CN119766762A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请涉及网络服务技术领域,特别是涉及一种数据处理方法、装置、计算机设备和存储介质。方法包括:在接收待处理数据包之后,根据待处理数据包对应的互联网标准NSH协议,确定待处理数据包对应的至少一个目标功能,以及各目标功能对应的处理顺序,进而,根据各目标功能,以及各目标功能对应的处理顺序,对待处理数据包进行数据处理,得到目标数据。本申请实现了让不同SPI的服务功能链共享同一套网络功能的流表,大大减少了可编程交换机流表空间的占用,并保证不同路径间的网络功能隔离;以此实现了降低通信量和通信步骤的繁琐程度,防止出现流标资源的浪费。

The present application relates to the field of network service technology, and in particular to a data processing method, device, computer equipment and storage medium. The method includes: after receiving a data packet to be processed, determining 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, performing data processing on the data packet to be processed to obtain target data. The present application enables service function chains of different SPIs to share the same set of flow tables for network functions, greatly reducing the occupation of the flow table space of the programmable switch, and ensuring the isolation of network functions between different paths; thereby reducing the amount of communication and the complexity of the communication steps, and preventing the waste of flow label resources.

Description

Data processing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of network services, and in particular, to a data processing method, apparatus, computer device, and storage medium.
Background
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.
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 quantity and more complex communication steps, and finally, a programmable switch can store a large number of repeated flow table entries, so that the flow table resource is wasted.
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.
Drawings
Fig. 1 is a schematic diagram of a network architecture system with a depth convergence of computing networks according to an embodiment of the present application;
FIG. 2 is an application environment diagram of a data processing method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a first data processing method according to an embodiment of the present application;
Fig. 4 is a schematic diagram of field location and packet header field definition in an NSH protocol according to an embodiment of the present application;
FIG. 5 is a flowchart of a second data processing method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a third data processing method according to an embodiment of the present application;
fig. 7 is a schematic diagram of a service function chain forwarding flow provided in an embodiment of the present application;
FIG. 8 is a schematic diagram of an SFC_Next action matching table according to an embodiment of the present application;
fig. 9 is a schematic diagram of an implementation flow of control plane policy issuing according to an embodiment of the present application;
FIG. 10 is a flowchart of a fourth data processing method according to an embodiment of the present application;
FIG. 11 is a block diagram illustrating a data processing apparatus according to an embodiment of the present application;
Fig. 12 is an internal structural diagram of a computer device in one embodiment.
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.

Claims (10)

1.一种数据处理方法,其特征在于,应用于功能转发交换机,所述方法包括:1. A data processing method, characterized in that it is applied to a function forwarding switch, the method comprising: 接收待处理数据包;Receive data packets to be processed; 根据所述待处理数据包对应的互联网标准NSH协议,确定所述待处理数据包对应的至少一个目标功能,以及各所述目标功能对应的处理顺序;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.根据权利要求1所述的方法,其特征在于,所述NSH协议中包含服务索引标识,所述服务索引标识中包含至少一个第一字段;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; 所述根据所述待处理数据包对应的互联网标准NSH协议,确定所述待处理数据包对应的至少一个目标功能,以及各所述目标功能对应的处理顺序,包括:Determining 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 includes: 根据所述服务索引标识中每一所述第一字段对应的字段取值,确定所述待处理数据包对应的至少一个目标功能,以及各所述目标功能对应的处理顺序。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.根据权利要求2所述的方法,其特征在于,所述根据所述服务索引标识中每一所述第一字段对应的字段取值,确定所述待处理数据包对应的至少一个目标功能,以及各所述目标功能对应的处理顺序,包括:3. The method according to claim 2, characterized in that the step of 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 a field value corresponding to each of the first fields in the service index identifier 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.根据权利要求3所述的方法,其特征在于,所述服务索引标识还包括第二字段,所述第二字段用于表征所述待处理数据包是否需要启用NSH代理功能;所述方法还包括:4. The method according to claim 3, characterized in that 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: 若所述第二字段的字段取值为目标取值,则对所述待处理数据包进行解封装NSH包头处理,并将解封装的待处理数据包发送至计算节点,以使所述计算节点对所述解封装的待处理数据包进行NSH代理功能处理;If the field value of the second field is the target value, decapsulate the NSH packet header of the data packet to be processed, and send 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.根据权利要求4所述的方法,其特征在于,所述方法还包括:若所述第二字段的字段取值不是目标取值,且存在下一跳的功能转发交换机的情况下,根据下一跳的功能转发交换机的网络功能控制信息,对所述第一字段进行字段修改。5. The method according to claim 4 is characterized in that the method also includes: if the field value of the second field is not the target value, and there is a functional forwarding switch of the next hop, the first field is modified according to the network function control information of the functional forwarding switch of the next hop. 6.根据权利要求1所述的方法,其特征在于,所述方法还包括: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.一种数据处理装置,其特征在于,配置于功能转发交换机,所述装置包括:7. A data processing device, characterized in that it is configured in a function forwarding switch, the device comprising: 接收模块,用于接收待处理数据包;A receiving module, used for receiving data packets to be processed; 确定模块,用于根据所述待处理数据包对应的互联网标准NSH协议,确定所述待处理数据包对应的至少一个目标功能,以及各所述目标功能对应的处理顺序;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.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至6中任一项所述的方法的步骤。8. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program. 9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的方法的步骤。9. A computer-readable storage medium having a computer program stored thereon, wherein 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.一种计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至6中任一项所述的方法的步骤。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.
CN202411994361.2A 2024-12-31 2024-12-31 Data processing method, device, computer equipment and storage medium Pending CN119766762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411994361.2A CN119766762A (en) 2024-12-31 2024-12-31 Data processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411994361.2A CN119766762A (en) 2024-12-31 2024-12-31 Data processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN119766762A true CN119766762A (en) 2025-04-04

Family

ID=95175316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411994361.2A Pending CN119766762A (en) 2024-12-31 2024-12-31 Data processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN119766762A (en)

Similar Documents

Publication Publication Date Title
CN112470436B (en) Systems, methods, and computer-readable media for providing multi-cloud connectivity
EP3977677B1 (en) Multicast support for a virtual network
CN110169019B (en) Network switch and database system with database function definition
CN103391296B (en) A kind of controller, transponder and Path Setup method and system
CN102185936B (en) DNS (domain name system) service system and method based on Linux operation system
US20240272932A1 (en) Method and apparatus for live migration based on remote direct memory access, and device
US10931559B2 (en) Distribution of network-policy configuration, management, and control using model-driven and information-centric networking
CN110226159B (en) Method for performing database functions on a network switch
CN110730478A (en) Slice association method, device, end-to-end slice organizer and storage medium
CN114513450A (en) Method, device, equipment and storage medium for sending calculation route information
CN111654559B (en) Container data transmission method and device
CN114500171B (en) Network system and message transmission method
CN116455703A (en) SDN data center-based two-layer multipath VPN forwarding method and device
CN119766762A (en) Data processing method, device, computer equipment and storage medium
WO2017173989A1 (en) Method, device, and system for distribution processing on multicast and storage medium
WO2024103817A1 (en) Data packet transmission method, switch, and storage medium
CN116389356A (en) A cross-availability zone communication method, related device, and cloud network
CN112994928B (en) A virtual machine management method, device and system
CN115865801A (en) Message transmission method, electronic device and storage medium
CN116600013A (en) Service implementation method, device, computer equipment and storage medium
CN117041142A (en) Message forwarding methods, devices, equipment, media and program products
CN115834290A (en) Method, device, equipment and medium for dynamically establishing tunnel
CN116346710A (en) A data forwarding method and device
CN120499095B (en) Data transmission method, device, equipment, storage medium and program product
CN119402413B (en) Business processing method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination