Message scheduling processing method, system and equipment and computer storage medium
By determining the packet type and calculating the source port data on the forwarding board, and using hash value calculation to distribute the packets to different processing cores, the problem of high network card processor resource consumption is solved, achieving efficient packet processing and prioritizing important packets.
Patent Information
- Application Number
- CN202511916934.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, network interface card (NIC) processors consume high resources when processing protocol messages such as DHCP and PPPoE, which can easily lead to data overflow, affecting user experience and message processing efficiency.
The message type is determined by the forwarding board and the source port data is calculated. The different types of messages are distributed to different processing cores of the service processing board for processing by using the hash value calculation method, so as to realize the distributed processing of messages.
It improves message processing efficiency, avoids data overflow, ensures priority processing of important messages and multi-core parallel processing, and enhances user experience.
Smart Images

Figure CN121691471A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of network technology, and in particular relates to a message scheduling and processing method, system, device and computer storage medium. Background Technology
[0002] In today's digital age, networks have become an indispensable part of computer systems, and the processing effectiveness of network packets directly affects network performance and user experience. Currently, network interface cards (NICs) cannot directly identify certain types of packets, such as DHCP (Dynamic Host Configuration Protocol) packets and PPPoE (Point-to-Point Protocol Over Ethernet) packets. After receiving a packet, the NIC's processor performs a series of processes, including Ethernet processing, IP (Internet Protocol) layer processing, route lookup, VxLAN (Virtual Extensible Local Area Network) decapsulation, and QinQ (802.1Q-in-802.1Q protocol) parsing, to determine the inner packet type before distributing and processing the packet accordingly. This message processing flow consumes a lot of network card processor resources. When the processor load is high, data overflow is likely to occur, which will cause important messages to be dropped indiscriminately. The message processing efficiency is low and the effect is poor, which will affect the user's Internet experience. Summary of the Invention
[0003] This application provides a message scheduling and processing method, system, device, and computer storage medium that can distribute and process different types of messages, improve message processing efficiency, and ensure good message processing results.
[0004] In a first aspect, embodiments of this application provide a message scheduling and processing method applied to a message scheduling and processing system, the system including a forwarding board and a service processing board connected by communication, the method including: The forwarding board determines the message type of the message to be sent; The forwarding board calculates the source port data of the packet based on the hash value calculation method corresponding to the packet type. Different packet types correspond to different hash value calculation methods. The forwarding board will send the packet carrying the source port data to the service processing board; Based on the data from the source port, the service processing board schedules the packet to the corresponding processing core for data processing. Different source port data correspond to different processing cores.
[0005] Secondly, embodiments of this application provide a message scheduling and processing system, which includes a forwarding board and a service processing board connected by communication. The forwarding board is used to determine the message type of the message to be sent; calculate the source port data of the message based on the hash value calculation method corresponding to the message type, with different message types corresponding to different hash value calculation methods; and send the message carrying the source port data to the service processing board. This service processing board is used to schedule the packet to the corresponding processing core for data processing based on the source port data. Different source port data correspond to different service cores.
[0006] Thirdly, embodiments of this application provide a computer device, which includes: a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement any of the message scheduling processing methods in the above embodiments.
[0007] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement any of the message scheduling processing methods described in the above embodiments.
[0008] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when executed, implements any of the message scheduling processing methods described in the above embodiments.
[0009] The message scheduling processing method, system, device, and computer storage medium of this application embodiment determine the message type of the message to be sent through a forwarding board in the message scheduling processing system. Different message types correspond to different hash value calculation methods. Based on the hash value calculation method corresponding to the message type, the forwarding board calculates the source port data of the message and sends the message carrying the source port data to the service processing board in the message scheduling processing system. After receiving the message, the service processing board schedules the message to the corresponding processing core for data processing based on the source port data. In the service processing board, message reception and service processing are separated, reducing... The low data processing volume in the message receiving stage avoids message loss due to data overflow during message reception. Since the source port data can reflect the message type, different source port data corresponds to different processing cores. After receiving the message, the service processing board can distinguish between control type messages and service type messages based on the source port data. During message scheduling, different types of messages can be processed in a distributed manner. For control type messages such as DHCP and PPPoE, it can ensure that they are assigned to the corresponding processing core for priority processing. Different types of messages are processed in parallel by multiple processing cores, thereby improving message processing efficiency and ensuring good message processing results. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of the implementation environment of a message scheduling and processing method provided in an embodiment of this application; Figure 2 This is a flowchart of a message scheduling and processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a message format provided in an embodiment of this application; Figure 4 This is a schematic diagram of a message scheduling process performed by an iBNG device according to an embodiment of this application; Figures 5A to 5B This is a flowchart of a DHCP message scheduling process provided in an embodiment of this application; Figures 6A to 6B This is a flowchart of a PPPoE message scheduling process provided in an embodiment of this application; Figures 7A to 7B This is a flowchart of a service message scheduling process provided in an embodiment of this application; Figure 8 This is a flowchart of a home broadband cloud service provided in an embodiment of this application; Figure 9 This is a schematic diagram of a two-level message scheduling provided in an embodiment of this application; Figure 10 This is a schematic diagram of a message scheduling model provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of a message scheduling and processing system provided in an embodiment of this application; Figure 12 This is a schematic diagram of the hardware structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0012] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0013] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0014] To address the problems of existing technologies, embodiments of this application provide a message scheduling and processing method, system, device, and computer storage medium. This method can apply different hash value calculation methods to different message types to obtain their source port data. Therefore, during message processing, different types of messages can be processed in a distributed manner based on the source port data, improving message processing efficiency and ensuring good message processing results. The following is a detailed description of this solution with reference to the accompanying drawings.
[0015] Figure 1 This is a schematic diagram illustrating the implementation environment of a message scheduling and processing method provided in an embodiment of this application. For example... Figure 1 As shown, in one embodiment, this solution is applied to a message scheduling and processing system. This system may include at least one iBNG (Intelligent Broadband Network Gateway) device 101 and at least one OLT (Optical Line Terminal) device 102, which can be connected via wired or wireless communication. The iBNG device 101 can be used to receive, forward, and process messages; the OLT device 102 can be used for network access, sending user messages to the iBNG device 101, or receiving message processing results from the iBNG device 101 and forwarding them to the user. In one embodiment, the message scheduling and processing system may also include other devices, which are not limited in this application embodiment.
[0016] In this embodiment, the iBNG device 101 may include a forwarding board and a service processing board. The forwarding board is used to encapsulate and forward packets from different networks. In one embodiment, the forwarding board can be divided into a WAN (Wide Area Network) side and a LAN (Local Area Network) side, used for access processing of packets from the WAN side and the LAN side, respectively. The service processing board can receive packets and schedule different types of packets to different service processing cores for processing. In one embodiment, the service processing board is deployed with VCPE (virtual customer premises equipment), which includes a vCPE component and a vSW (virtual switch) component. The vSW component can be used to receive packets, identify packet types, and perform data plane processing on packets. The vSW component receives and identifies protocol packets and can send them to the vCPE component for processing; the vCPE component can be used to process control type packets, such as PPPoE packets and DHCP packets, i.e., protocol packets. In this embodiment of the application, the forwarding board and the service processing board can be connected by wired or wireless communication. For example, the forwarding board and the service processing board can interact and process messages through a VxLAN tunnel.
[0017] Figure 2 This is a flowchart of a message scheduling and processing method provided in an embodiment of this application. This method can be applied to the above-mentioned... Figure 1 The implementation environment shown is as follows: Figure 2 As shown, the method may include the following steps: S201, The forwarding board determines the message type of the message to be sent.
[0018] S202. The forwarding board calculates the source port data of the message based on the hash value calculation method corresponding to the message type. Different message types correspond to different hash value calculation methods.
[0019] S203. The forwarding board sends the packet carrying the source port data to the service processing board.
[0020] S204. Based on the source port data, the service processing board schedules the packet to the corresponding processing core for data processing. Different source port data correspond to different processing cores.
[0021] In this embodiment, the message type of the message to be sent is determined by the forwarding board in the message scheduling and processing system. Different message types correspond to different hash value calculation methods. Based on the hash value calculation method corresponding to the message type, the forwarding board calculates the source port data of the message and sends the message carrying the source port data to the service processing board in the message scheduling and processing system. Based on the source port data, the service processing board schedules the message to the corresponding processing core for data processing. Different source port data correspond to different processing cores, which can distribute the processing of different types of messages, improve message processing efficiency, and ensure good message processing results.
[0022] The specific implementation methods of each of the above steps are described below with reference to the accompanying drawings.
[0023] In this embodiment, the devices in the aforementioned packet scheduling and processing system can be pre-configured. The service processing board deploys a virtual switch component, on which a protocol processing core and a service processing core are configured. The protocol processing core can process control type packets, i.e., protocol packets, such as DHCP packets and PPPoE packets. The service processing core can process service type packets, such as packets used to carry user internet access services. In one embodiment, packet receiving queues corresponding to the protocol processing core and the service processing core can be created in the virtual switch component. These queues can store network data packets, and each processing core can correspond to one receiving queue. In one embodiment, a QinQ sub-interface is deployed on the LAN side of the forwarding board. ACL (Access Control Lists) rules can be configured on the QinQ sub-interface. These ACL rules can be used to distinguish target packets. The specific content of the ACL rules can be set by the developers. In this embodiment, the target packet is a DHCP packet, meaning the LAN side of the forwarding board can identify DHCP packets based on the ACL rules. It should be noted that the above description of the pre-configuration method is only an exemplary description of one possible implementation method, and the embodiments of this application do not limit the specific method of pre-configuration.
[0024] In step S201, the forwarding board determines the message type of the message to be sent.
[0025] In one embodiment, the forwarding board can receive packets from the external network or the local area network. This embodiment does not limit which device sends the packets. In one embodiment, the forwarding board can distinguish between control type packets and service type packets using at least one of protocol identification and ACL rules. Control type packets include protocol packets, such as DHCP packets and PPPoE packets. This embodiment does not limit the method by which the forwarding board identifies packet types.
[0026] In one embodiment, the forwarding board can add a message type tag to the message based on its message type. This message type tag is used to distinguish between service type messages and control type messages. The message type tag can be a TOS (Type of Service) tag. For example, the forwarding board is configured with protocol identification rules, which may include setting the TOS tag for control type messages to CS6 and the TOS tag for service type messages to 0. The TOS tag can be added to the IP TOS (Internet Protocol Type of Service) field of the message through VxLAN encapsulation. For example, the LAN and WAN sides of the forwarding board can perform VxLAN encapsulation on the received messages, thereby adding corresponding TOS tags to different types of messages. In this embodiment, adding corresponding TOS tags to different types of messages enables accurate differentiation and classification of messages during subsequent message scheduling and processing. For messages of high importance, such as protocol messages, they can be separated and processed separately, thus ensuring the processing priority of protocol messages throughout the entire link.
[0027] In step S202, the forwarding board calculates the source port data of the packet based on the hash value calculation method corresponding to the packet type.
[0028] The source port can be represented by 16-bit data, calculated using a hash algorithm. This source port data can be encapsulated in a UDP (User Datagram Protocol) message as a source port identifier, used to identify the source port information of the original Ethernet frame. In this embodiment, different message types can correspond to different hash value calculation methods. In one embodiment, when the message includes an IP type message or a service type message, the forwarding board calculates the hash value based on the inner five-tuple data of the message, the first network identifier, and the second network identifier to obtain the source port data. The first network identifier is used to distinguish different virtual LANs, and the second network identifier is used to distinguish different virtual extended LAN segments. For example, the first network identifier may include a QinQ identifier, and the second network identifier may include a VNI (VXLAN Network Identifier). In one embodiment, when the message includes a control type message, the forwarding board calculates the hash value based on the inner source MAC (Media Access Control) address and the destination MAC address of the message to obtain the source port data. For example, the packets received by the WAN side of the forwarding board include control-type PPPoE packets. The forwarding board can perform hash calculations on the inner source MAC address and destination MAC address of the PPPoE packet, and use the calculation result as the source port data of the packet. The packets received by the LAN side of the forwarding board include IP packets. The forwarding board can perform hash calculations on the inner 5-tuple data, QinQ identifier, and VNI of the IP packet, and use the calculation result as the source port data of the packet. In this embodiment, different types of packets correspond to different source port data calculation methods. When the packet receiving device cannot directly read the packet type, it can distinguish the packet type based on the source port data, thereby ensuring that packet scheduling processing can be performed according to the packet type.
[0029] In step S203, the forwarding board sends the packet carrying the source port data to the service processing board.
[0030] In one embodiment, the forwarding board communicates with the service processing board via a VxLAN tunnel. The forwarding board can encapsulate the packet based on the TOS tag addition rule in step S201 and the source port calculation rule in step S202. That is, the encapsulated packet includes a packet type tag and source port data. The forwarding board sends the encapsulated packet to the service processing board through the VxLAN tunnel. Figure 3 This is a schematic diagram of a message format provided in an embodiment of this application, such as... Figure 3As shown, uplink message 301 may include an outer Ethernet header, an outer IP header, an outer UDP header, a VXLAN header, an inner Ethernet header, a QinQ identifier, and body message data. Downlink message 302 may include an outer Ethernet header, an outer IP header, an outer UDP header, a VXLAN header, an inner Ethernet header, a QinQ identifier, PPPoE, and body message data. The outer Ethernet header may include a message type identifier, and the outer UDP header may include source port data.
[0031] In step S204, the service processing board schedules the packet to the corresponding processing core for data processing based on the source port data.
[0032] In this embodiment, different source port data can correspond to different processing cores. In one possible implementation, the service processing board can store a correspondence table indicating the relationship between source port data and processing cores. The service processing board can match the source port data carried by the packet with each data item in the correspondence table to determine the processing core corresponding to the packet, and schedule the packet to the corresponding processing core for processing.
[0033] In one possible implementation, the virtual switch component in the service processing board can be used to perform the aforementioned packet scheduling process. This virtual switch component can perform packet scheduling based on the packet type tag and the source port data to enhance traffic distribution, achieve more accurate dynamic packet scheduling, and better ensure load balancing and multi-path transmission. For example, the virtual switch component receives a packet, obtains the packet type tag, and, based on the packet type tag and the source port data, schedules the packet to the corresponding processing core for data processing.
[0034] In this embodiment, the virtual switch component can be configured with a protocol processing core and a service processing core. The protocol processing core can be used to process control type messages, such as protocol messages, and the service processing core can be used to process service type messages. The number of both protocol processing cores and service processing cores can be one or more, and this embodiment does not limit this. In one embodiment, the virtual switch group determines the message type flag of the message. In response to the message type flag indicating that the message is a control type message, the virtual switch component schedules the message to the protocol processing core for processing. In response to the message type flag indicating that the message is a service type message, the virtual switch component obtains the source port data of the message; the virtual switch component schedules the message to the service processing core corresponding to the source port data for data processing. In this embodiment, separating the message reception and service processing processes improves message reception efficiency, avoids data overflow during message reception leading to message loss, and schedules messages to the corresponding processing cores for service processing, achieving multi-core parallel processing and improving message processing efficiency.
[0035] Figure 4This is a schematic diagram illustrating packet scheduling processing in an iBNG device according to an embodiment of this application. Data interaction is possible between the iBNG device's forwarding board 401, service processing board 402, and OLT device 403 in the local area network. For example, the OLT device 403 can forward user terminal packets to the LAN side of the forwarding board 401, i.e., the LAN-BD (Local Area Network Bridge Domain) 404. The forwarding board 401 encapsulates the received packets, adds packet type tags and calculates source port data, and then sends the encapsulated packets to the service processing board 402. The virtual switch component 405 in the service processing board 402 receives the packets and, based on the packet type tags and source port data carried in the packets, schedules the packets to the corresponding processing core for processing. In one embodiment, the service processing board also deploys a virtual client component 406. For control type messages, such as DHCP messages, the protocol processing core of the virtual switch component 405 performs preliminary processing and then sends the message to the virtual client component 406 for further processing. The virtual client component 406 generates a reply message and sends it to the virtual switch component. The virtual switch component 405 sends the reply message to the forwarding board 401. The LAN side of the forwarding board 401 can send the message processing result of the service processing board 402, i.e., the reply message, to the OLT device 403, which then forwards it to the user terminal. In one embodiment, for service type messages, after the service processing core of the virtual switch component performs preliminary processing, the message is sent to the WAN side of the forwarding board 401 for further processing. For example, the WAN-BD (Wide Area Network Bridge Domain) 407 on the WAN side sends the data to the BRAS (Broadband Remote Access Server) 408 for processing and access to the Internet. The BRAS408 generates a reply message, which is sent to the virtual switch component 405 via the WAN-BD. The virtual switch component 405 then sends the reply message to the forwarding board 401. The LAN side of the forwarding board 401 can send the message processing result of the service processing board, i.e., the reply message, to the OLT device 403, which then forwards it to the user terminal.
[0036] In this embodiment, the message type of the message to be sent is determined by the forwarding board in the message scheduling and processing system. Different message types correspond to different hash value calculation methods. Based on the hash value calculation method corresponding to the message type, the forwarding board calculates the source port data of the message and sends the message carrying the source port data to the service processing board in the message scheduling and processing system. After receiving the message, the service processing board schedules the message to the corresponding processing core for data processing based on the source port data. In the service processing board, message reception and service processing are separated, reducing the data processing in the message reception stage. To optimize message processing and prevent message loss due to data overflow during message reception, the service processing board can distinguish between control type messages and service type messages based on the source port data after receiving the message. During message scheduling, different types of messages can be distributed for processing. For control type messages such as DHCP and PPPoE, it can ensure that they are assigned to the corresponding processing core for priority processing. Furthermore, different types of messages are processed in parallel by multiple processing cores, thereby improving message processing efficiency and ensuring good message processing results.
[0037] The following section uses DHCP messages, PPPoE messages, and service messages as examples to illustrate the above message scheduling and processing process.
[0038] Figures 5A to 5B This is a flowchart illustrating a DHCP message scheduling process provided in an embodiment of this application. For example, the message to be processed includes a control-type DHCP message, such as... Figure 5A As shown, the uplink processing of this DHCP message may include the following steps.
[0039] When the S501 forwarding board's LAN-side QinQ sub-interface receives a user's DHCP message, the QinQ sub-interface identifies the message type of the DHCP message based on the configured ACL rules and sets the message type flag to CS.
[0040] In this embodiment of the application, the message type marker is TOS marker as an example, that is, the TOS marker is set to CS6.
[0041] The S502 forwarding board's LAN-BD encapsulates DHCP messages using VxLAN, calculates the source port data of the message based on the message type, and sends the DHCP message to the VCPE's virtual switch component through the VxLAN tunnel. The message type flag of the VxLAN tunnel is set to CS6.
[0042] After receiving a DHCP message, the S503 virtual switch component obtains the message type marker as CS6 and sends the DHCP message to the protocol processing core for processing.
[0043] The S504 virtual switch component sends the processed DHCP message to the virtual client component.
[0044] S505, the virtual client component responds to the DHCP message based on the processing result of the DHCP message.
[0045] For example, a virtual client component processes DHCP messages and replies to them. The virtual client component can generate a first reply message and send it to the virtual switch. The virtual switch can then perform subsequent downlink forwarding processing on the first reply message based on its message type tag. The first reply message indicates the processing result of the DHCP message and carries the same message type tag as the DHCP message.
[0046] like Figure 5B As shown, the downlink processing of this DHCP message may include the following steps.
[0047] S506. When the virtual switch component receives the first reply message, it identifies the first reply message as a control type message based on the message type tag and sends it to the protocol processing core for processing.
[0048] S507, the virtual switch component sends the first reply message to the QinQ sub-interface on the LAN side of the forwarding board through the VxLAN tunnel.
[0049] S508, the forwarding board sends the first reply message to the OLT device, which then forwards it to the user terminal.
[0050] Figures 6A to 6B This is a flowchart illustrating a PPPoE message scheduling process provided in an embodiment of this application. For example, the message to be processed includes a control-type PPPoE message, such as... Figure 6A As shown, the uplink processing of the PPPoE message may include the following steps.
[0051] S601, the virtual client component sends PPPOE packets through the VxLAN tunnel.
[0052] In one embodiment, in response to the service activation requirements of a user terminal, the virtual client component can act as a PPPoE Client (Point-to-Point Ethernet Client) to perform PPPoE proxy broadcasting and send control type PPPoE messages. When sending PPPoE messages, the virtual client component can encapsulate them with VxLAN and mark the message type of the PPPoE message as CS6.
[0053] S602. After receiving a PPPoE message, the virtual switch component identifies the message type marker and then sends the PPPoE message to the protocol processing core for processing.
[0054] S603, the virtual switch sends the processed PPPoE packets to the broadband remote access server.
[0055] The broadband remote access server is deployed on this forwarding board. For example, after the virtual switch component processes PPPoE packets in the protocol processing core, it can send the processed PPPoE packets to the BRAS for PPPoE Server (Point-to-Point Ethernet Service) processing through the VxLAN tunnel.
[0056] S604. The broadband remote access server responds to the PPPOE message based on the processing result of the PPPOE message.
[0057] For example, the broadband remote access server can generate a second reply message, wherein the second reply message is used to indicate the processing result of the PPPoE message, and the second reply message carries the same message type tag as the PPPoE message. The broadband remote access server can send the second reply message to the virtual switch; the virtual switch performs downlink forwarding processing on the second reply message based on the message type tag of the second reply message.
[0058] like Figure 6B As shown, the downlink processing of this DHCP message may include the following steps.
[0059] S605. The broadband remote access server responds to the PPPOE message based on the processing result of the PPPOE message.
[0060] S606. When the virtual switch component receives the PPPoE response message, which is the second reply message, it identifies it as a control type message based on the message type tag.
[0061] S607. The virtual switch component, based on the message type label, sends the second reply message to the protocol processing core for processing.
[0062] The S608 virtual switch component sends the processing results of PPPOE packets to the virtual client component through the VxLAN tunnel.
[0063] In this embodiment, to ensure priority processing of protocol messages such as DHCP and PPPoE, a corresponding message type flag CS6 is added to control type protocol messages, and a corresponding message type flag 0 is added to service type messages. The virtual switch component distinguishes between control type messages and service type messages through the message type flags. The virtual switch component can offload DHCP and PPPoE protocol messages to the protocol processing core for processing, which can ensure priority processing of important protocol messages, ensure the reliability of basic services such as PPPoE / DHCP, ensure the smooth operation of online services, and reduce network failures.
[0064] Figures 7A to 7B This is a flowchart illustrating a service message scheduling process provided in an embodiment of this application. For example, the message to be processed includes a service message, such as... Figure 7A As shown, the uplink processing of this service message may include the following steps.
[0065] S701, service packets from home broadband user terminals are sent to the virtual switch component through the VxLAN tunnel, and the virtual switch component receives service packets from the network card queue.
[0066] S702, the virtual switch component obtains the packet type tag of the service packet, and in response to the packet type tag being a service type packet, obtains the source port data, and schedules the service packet to the corresponding service processing core for processing based on the source port data.
[0067] S703. The service processing core receives the service message and performs service processing.
[0068] For example, the service processing core can perform VxLAN decapsulation processing, QinQ identifier recognition, SNAT (Source NAT) processing, policy routing to PPPOE interface processing, VxLAN encapsulation processing, etc. on the service packet. This application embodiment does not limit the service processing process.
[0069] S704. The virtual switch component will send the processed service message to the broadband remote access server for Internet access.
[0070] The broadband remote access server is deployed on this forwarding board. This virtual switch component can send the service packets to the BRAS for processing via a VxLAN tunnel.
[0071] S705. The broadband remote access server responds to the service message based on the processing result of the service message.
[0072] like Figure 7B As shown, the downlink processing of this DHCP message may include the following steps.
[0073] S706, the broadband remote access server generates a third reply message.
[0074] The third reply message is used to indicate the processing result of the service message, and the third reply message may carry the same message type tag as the service message.
[0075] S707, the broadband remote access server sends the third reply message to the virtual switch.
[0076] In one embodiment, the forwarding board determines the source port data of the third reply message for the service type based on the hash value calculation method corresponding to the service type message; the forwarding board sends the third reply message to the virtual switch; the packet receiving core of the virtual switch component receives the downlink message sent from the broadband remote access server from the network card, which is the third reply message.
[0077] S708 and the virtual switch perform downlink forwarding processing on the third reply message based on the message type tag and source port data of the third reply message.
[0078] In one embodiment, the virtual switch can obtain the packet type tag of the third reply packet, and in response to the packet whose packet type tag is a service type, obtain the source port data, and schedule the third reply packet to the corresponding service processing core for processing based on the source port data.
[0079] S709. The service processing core retrieves the third reply message from its corresponding queue and performs service processing.
[0080] In one embodiment, the service processing procedure for verifying the third reply message may include VxLAN decapsulation processing, QinQ identifier recognition, PPPOE decapsulation processing, DNAT (Destination NAT) processing, policy routing to VXLAN interface processing, etc., which are not limited in this embodiment.
[0081] The S710 and virtual switch send the processed third reply message to the QinQ sub-interface on the LAN side of the forwarding board, which then forwards it to the user terminal.
[0082] In this embodiment, the source port data of the packet is obtained by hashing the inner quintuple, QinQ identifier and VNI. The virtual switch component can schedule the packet to the corresponding processing core for processing according to the source port data of the packet, so as to ensure that the same type of service flow is processed on the same processing core.
[0083] The technical solutions provided in this application can be applied to home broadband cloud service scenarios. Figure 8 This is a flowchart of a home broadband cloud service provided in an embodiment of this application, such as... Figure 8 As shown, a home broadband cloud service scenario may include at least one user terminal 801, at least one iBNG device 802, at least one OLT device 803, and a CR (Core Router) 804. This service scenario may also include multiple network devices 805 with data forwarding capabilities; this embodiment does not limit the scope of the application. In one embodiment, any user terminal 801 can send a DHCP message to the iBNG device 802, which is communicatively connected to it. The iBNG device 802 can then send the DHCP message through a VxLAN tunnel to the VCPE device 806, which is also communicatively connected to it. The VCPE device 806 may include a terminal access control module, a DHCP service module, a PPPoE dialing module, a DNS (Domain Name Server) relay module, etc.; this embodiment does not limit the scope of the application. The DHCP service module can respond to the DHCP messages from the user terminal 801, thus responding to user requests. In one embodiment, VCPE device 806 can initiate a PPPoE dial-up connection, sending PPPoE packets to iBNG device 802 via a VXLAN tunnel. iBNG device 802 responds to the PPPoE packets by allocating a WAN port address. In another embodiment, in a user internet access scenario, user terminal packets can be forwarded by iBNG device 802 to the LAN side of VCPE device 806. VCPE device 806 internally performs network address translation and forwards the translation result to iBNG device 802, which then performs network address translation again to enable network access. Figure 8 In the home broadband cloud service process shown, the message scheduling and processing method of this application embodiment can ensure the processing priority of DHCP requests and PPPoE proxy requests of user terminals throughout the entire link. The DHCP TOS mark is marked on the LAN side of the forwarding board of the iBNG device, and the PPPoE message TOS mark is marked on the vCPE of the service processing board. The vSW of the service board identifies DHCP and PPPoE protocol messages based on the TOS mark and schedules them to the protocol processing core for processing. The protocol messages are processed with high performance, ensuring the normal operation of the user's DHCP IP address acquisition function and the cloud PPPoE proxy function.
[0084] Figure 9 This is a schematic diagram of a two-level message scheduling provided in an embodiment of this application, such as... Figure 9As shown in section 901, typically in Level 1 scheduling, the data processing CPU core schedules data packets from one or more queues. The NAT beforer process, i.e., the state or configuration process before network address translation, is handled on this CPU core. In Level 2 scheduling, network address translation is performed on the data packets from each queue. If this processing flow is too long, and the CPU load is high, it can easily lead to network card hardware queue overflow, causing DHCP and PPPoE protocol packets to be indiscriminately dropped, affecting users' normal internet access. Figure 9 As shown in 902, in this embodiment, the RSS algorithm is applied in the first-level scheduling. One receiving core schedules one network interface card (NIC) queue, performing only packet receiving and distribution processing, without handling service processes. This ensures that data quickly moves from the NIC queue to the CPU core for protocol processing, service processing, and NAT processing, preventing the CPU core from dropping control type packets such as DHCP and PPPoE due to insufficient packet receiving performance. In the second-level scheduling, packets are scheduled to different processing cores for processing based on packet type tags. That is, after receiving a data packet containing a packet, the receiving core directly reads the source port data carried in the packet and schedules the packet to the corresponding processing core for processing based on the source port data. All subsequent service processing flows are performed on this processing core. Figure 10 This is a schematic diagram of a message scheduling model provided in an embodiment of this application, such as... Figure 10 As shown, applying the packet scheduling and processing method provided in this application embodiment, the processing core 1001, which previously performed a series of data processing procedures such as data reception and NAT beforer procedures, is now optimized to only perform the data reception process. During this data reception process, the processing core 1001 schedules the packet to other processing cores for processing based on the source port data of the packet. That is, at least one processing core 1002 performs a series of data processing procedures such as NAT beforer procedures, NAT processing, and NATafter procedures. This data processing process is changed from single-core processing to multi-core parallel processing. Therefore, important PPPoE packets can be processed concurrently by multiple cores, while reducing data loss caused by inter-core switching in the service processing flow and improving forwarding performance.
[0085] Figure 11 This is a schematic diagram of the structure of a message scheduling and processing system provided in an embodiment of this application. Figure 11 As shown, the device may include a forwarding board 1101 and a service processing board 1102 for communication connection.
[0086] The forwarding board 1101 is used to determine the message type of the message to be sent; calculate the source port data of the message based on the hash value calculation method corresponding to the message type, with different message types corresponding to different hash value calculation methods; and send the message carrying the source port data to the service processing board. The service processing board 1102 is used to schedule the packet to the corresponding processing core for data processing based on the source port data. Different source port data correspond to different service cores.
[0087] In one embodiment, the forwarding board 1101 is used to calculate the source port data based on the inner five-tuple data, the first network identifier, and the second network identifier of the packet when the packet includes an IP type packet or a service type packet. The first network identifier is used to distinguish different virtual local area networks, and the second network identifier is used to distinguish different virtual extended local area network segments. If the message includes a control type message, the source port data is obtained by calculating the hash value based on the inner source MAC address and destination MAC address of the message.
[0088] In one embodiment, the first network identifier includes a QinQ identifier, and the second network identifier includes a VNI.
[0089] In one embodiment, the forwarding board 1101 is further configured to add a message type tag to the message based on the message type, the message type tag being used to distinguish between service type messages and control type messages.
[0090] In one embodiment, the service processing board 1102 is equipped with a virtual switch component, which is used to obtain the packet type tag of the packet; based on the packet type tag and the source port data, the packet is scheduled to the corresponding processing core for data processing.
[0091] In one embodiment, the virtual switch component is configured with a protocol processing core and a service processing core. The virtual switch component is also configured to schedule the message to the protocol processing core for processing in response to the message type flag indicating that the message is a control type message. In response to the message type flag indicating that the message is a message of the service type, the source port data of the message is obtained; the virtual switch component schedules the message to the service processing core corresponding to the source port data for data processing.
[0092] In one embodiment, the message includes a control-type DHCP message, and the virtual switch component is further configured to send the processed DHCP message to a virtual client component, which is deployed on the service processing board; This virtual client component is also used to reply to the DHCP message based on the processing result of the DHCP message.
[0093] In one embodiment, the virtual client component is further configured to generate a first reply message, the first reply message being used to indicate the processing result of the DHCP message, the first reply message carrying the same message type tag as the DHCP message; and send the first reply message to the virtual switch component; The virtual switch component is used to perform downlink forwarding processing on the first reply message based on the message type tag of the first reply message.
[0094] In one embodiment, the message includes a control type PPPoE message, and the virtual switch component is used to send the processed PPPoE message to a broadband remote access server, which is deployed on the forwarding board. The broadband remote access server is used to reply to the PPPoE message based on the processing result of the PPPoE message.
[0095] In one embodiment, the broadband remote access server generates a second reply message to indicate the processing result of the PPPoE message, and the second reply message carries the same message type tag as the PPPoE message; the second reply message is then sent to the virtual switch. The virtual switch component is used to perform downlink forwarding processing on the second reply message based on the message type tag of the second reply message.
[0096] In one embodiment, the message includes a service message, and the virtual switch component is used to send the processed service message to a broadband remote access server, which is deployed on the forwarding board. The broadband remote access server is used to reply to the service message based on the processing result of the service message.
[0097] In one embodiment, the broadband remote access server is used to generate a third reply message, which is used to indicate the processing result of the service message, and the third reply message carries the same message type tag as the service message; The forwarding board 1101 is used to determine the source port data of the third reply message for the service type based on the hash value calculation method corresponding to the service type message; and to send the third reply message to the virtual switch component. The virtual switch component is used to perform downlink forwarding processing on the third reply message based on the message type tag and source port data of the third reply message.
[0098] In this embodiment, the message type of the message to be sent is determined by the forwarding board in the message scheduling and processing system. Different message types correspond to different hash value calculation methods. Based on the hash value calculation method corresponding to the message type, the forwarding board calculates the source port data of the message and sends the message carrying the source port data to the service processing board in the message scheduling and processing system. Based on the source port data, the service processing board schedules the message to the corresponding processing core for data processing. Different source port data correspond to different processing cores, which can distribute the processing of different types of messages, improve message processing efficiency, and ensure good message processing results.
[0099] Figure 12 This is a schematic diagram of the hardware structure of a computer device provided in an embodiment of this application.
[0100] The computer device may include a processor 1201 and a memory 1202 storing computer program instructions.
[0101] Specifically, the processor 1201 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0102] Memory 1202 may include mass storage for data or instructions. For example, and not limitingly, memory 1202 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 1202 may include removable or non-removable (or fixed) media, or memory 1202 may be non-volatile solid-state memory. Memory 1202 may be internal or external to the integrated gateway disaster recovery device.
[0103] In one instance, memory 1202 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0104] Memory 1202 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0105] The processor 1201 reads and executes computer program instructions stored in the memory 1202 to achieve... Figure 2 The message scheduling and processing method in the illustrated embodiment.
[0106] In one example, the computer device may also include a communication interface 1203 and a bus 1204. Wherein, as... Figure 12 As shown, the processor 1201, memory 1202, and communication interface 1203 are connected through bus 1204 and complete communication with each other.
[0107] The communication interface 1203 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0108] Bus 1204 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 1204 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0109] The computer device can schedule packets based on the source port data of the packets to implement the packet scheduling processing method in the embodiments of this application, thereby achieving, as follows: Figure 2 The message scheduling and processing method described.
[0110] Furthermore, in conjunction with the message scheduling and processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the message scheduling and processing methods in the above embodiments.
[0111] This application also provides a computer program product, including a computer program, which, when executed, implements any of the message scheduling processing methods described in the above embodiments.
[0112] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0113] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0114] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0115] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0116] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A packet scheduling processing method, characterized by, The application is applied to a packet scheduling processing system, the system comprises a forwarding board and a service processing board connected in communication, and the method comprises: The forwarding board determines a packet type of a packet to be sent; The forwarding board calculates source port data of the packet based on a hash value calculation mode corresponding to the packet type, different packet types corresponding to different hash value calculation modes; The forwarding board sends the packet carrying the source port data to the service processing board; The service processing board schedules the packet to a corresponding processing core for data processing based on the source port data, different source port data corresponding to different processing cores.
2. The method of claim 1, wherein, The forwarding board calculates source port data of the packet based on a hash value calculation mode corresponding to the packet type, comprising any of the following: In the case that the packet comprises an Internet Protocol (IP) type packet or a service type packet, the forwarding board performs hash value calculation based on inner layer five-tuple data, a first network identifier and a second network identifier of the packet to obtain the source port data, the first network identifier being used to distinguish different virtual local area networks, and the second network identifier being used to distinguish different virtual extended local area network segments; In the case that the packet comprises a control type packet, the forwarding board performs hash value calculation based on inner layer source Media Access Control (MAC) address and destination MAC address of the packet to obtain the source port data.
3. The method of claim 2, wherein, The first network identifier comprises 802.1Q-in-802.1Q protocol QinQ identifier, and the second network identifier comprises virtual extended local area network identifier (VNI).
4. The method of claim 1, wherein, After the forwarding board determines the packet type of the packet to be sent, the method further comprises: The forwarding board adds a packet type marker to the packet based on the packet type, the packet type marker being used to distinguish service type packets and control type packets.
5. The method of claim 4, wherein, The service processing board is deployed with a virtual switch component, and the service processing board schedules the packet to a corresponding processing core for data processing based on the source port data, comprising: The virtual switch component obtains the packet type marker of the packet; The virtual switch component schedules the packet to a corresponding processing core for data processing based on the packet type marker and the source port data.
6. The method of claim 5, wherein, The virtual switch component is configured with a protocol processing core and a service processing core, and the virtual switch component schedules the packet to a corresponding processing core for data processing based on the packet type marker and the source port data, comprising: In response to the packet type marker indicating that the packet is the control type packet, the virtual switch component schedules the packet to the protocol processing core for processing; In response to the packet type marker indicating that the packet is the service type packet, the virtual switch component obtains the source port data of the packet; and the virtual switch component schedules the packet to the service processing core corresponding to the source port data for data processing.
7. The method of claim 6, wherein, The message includes a control type dynamic address acquisition protocol (DHCP) message, the virtual switch component schedules the message to a protocol processing core for processing in response to the message type marker indicating that the message is the control type message, and the method further includes: The virtual switch component sends the processed DHCP message to a virtual client component deployed on the service processing board. The virtual client component replies to the DHCP message based on a processing result of the DHCP message.
8. The method of claim 7, wherein, The virtual client component replies to the DHCP message based on a processing result of the DHCP message, including: The virtual client component generates a first reply message, the first reply message is used to indicate the processing result of the DHCP message, and the first reply message carries the same message type marker as the DHCP message; The virtual client component sends the first reply message to the virtual switch component; The virtual switch component performs downlink forwarding processing on the first reply message based on the message type marker of the first reply message.
9. The method of claim 6, wherein, The message includes a control type point-to-point Ethernet (PPPOE) message, the virtual switch component schedules the message to a protocol processing core for processing in response to the message type marker indicating that the message is the control type message, and the method further includes: The virtual switch component sends the processed PPPOE message to a broadband remote access server deployed on the forwarding board. The broadband remote access server replies to the PPPOE message based on a processing result of the PPPOE message.
10. The method of claim 9, wherein, The broadband remote access server replies to the PPPOE message based on a processing result of the PPPOE message, including: The broadband remote access server generates a second reply message, the second reply message is used to indicate the processing result of the PPPOE message, and the second reply message carries the same message type marker as the PPPOE message; The broadband remote access server sends the second reply message to the virtual switch component; The virtual switch component performs downlink forwarding processing on the second reply message based on the message type marker of the second reply message.
11. The method of claim 6, wherein, The message includes a service message, and the virtual switch component schedules the message to the service processing core corresponding to the source port data for data processing, including: The virtual switch component sends the processed service message to a broadband remote access server deployed on the forwarding board. The broadband remote access server replies to the service message based on a processing result of the service message.
12. The method of claim 11, wherein, The broadband remote access server replies to the service message based on a processing result of the service message, including: The wideband remote access server generates a third reply message, the third reply message being used for indicating a processing result of the service message, and the third reply message carrying a same message type mark as the service message; The forwarding board determines source port data of the third reply message based on a hash value calculation mode corresponding to the service type message; The forwarding board sends the third reply message to the virtual switch component; The virtual switch component performs downlink forwarding processing on the third reply message based on a message type mark and source port data of the third reply message.
13. A message dispatch processing system characterized by comprising: The system comprises a forwarding board and a service processing board connected in communication, The forwarding board is configured to determine a message type of a message to be sent, calculate source port data of the message based on a hash value calculation mode corresponding to the message type, different message types corresponding to different hash value calculation modes, and send the message carrying the source port data to the service processing board; The service processing board is configured to schedule the message to a corresponding processing core for data processing based on the source port data, different source port data corresponding to different service cores.
14. A computer device, comprising: The device comprises a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the message scheduling processing method according to any one of claims 1-12.
15. A computer readable storage medium, characterized in that, The computer storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the message scheduling processing method according to any one of claims 1-12.
16. A computer program product, characterised in that, The computer program is executed by the processor to implement the message scheduling processing method according to any one of claims 1-12.