A service scheduling communication method and system, electronic equipment and computer storage medium
By keeping the destination address of network packets unchanged and modifying the source port number in a dedicated data processor, the problems of packet forwarding delay and excessive memory usage in DPU communication service scheduling are solved, achieving more efficient scheduling communication.
Patent Information
- Application Number
- CN202311639878.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-12-01
AI Technical Summary
Traditional DPU communication service scheduling suffers from packet forwarding delays and excessive memory usage during network packet forwarding, resulting in low scheduling efficiency.
In a dedicated data processor, the destination address of network packets remains unchanged, the source port number is modified to a fixed port number bound to the service scheduling engine, and this port number is recorded in the data structure. The source port number is modified only when responding to packets, thus avoiding the maintenance of the NAT session table.
It reduces packet forwarding latency, lowers memory usage, improves scheduling efficiency, and avoids the matching load of the NAT session table.
Smart Images

Figure CN117615011B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a service scheduling communication method, system, electronic device, and computer storage medium. Background Art
[0002] Currently, traditional communication service scheduling on the DPU is primarily performed in the following manner: When the DPU receives a request message from a first service to a second service, if it matches a pre-defined NAT rule, it replaces the second address (destination address) and second port number (destination port number) of the second service in the request message with the address and port number of the service scheduling engine. The five-tuple information (source address, source port number, destination address, destination port number, and protocol number) before and after the modification is recorded in the NAT session table. In this way, the request message from the first service is forwarded and processed by the service scheduling engine and then sent to the second service, thereby scheduling communication between the first and second services. After receiving the response from the service scheduling engine, the second address and second port number are restored by referring to the recorded NAT session table. Upon receiving the request message, it undergoes a pre-defined NAT rule match and a NAT session table match. Upon receiving the response, it also undergoes a NAT session table match. This increases message forwarding latency, increases memory usage due to storing the NAT session table, and reduces scheduling efficiency. Summary of the Invention
[0003] In view of this, an embodiment of the present application provides a service scheduling communication method, which can reduce message forwarding delay, reduce memory usage, and improve scheduling efficiency when scheduling communication between at least one service associated with the main device configured with a DPU.
[0004] A first aspect of the present disclosure provides a service scheduling communication method for a dedicated data processor coupled to a master device, wherein the service scheduling communication is communication between a first service and a second service, at least one of the first service and the second service being associated with the master device. The service scheduling communication method includes:
[0005] receiving a request message from the first service to the second service, the request message including the second address and the second port number of the second service;
[0006] Keeping the second address unchanged, changing the second port number to a fixed port number bound to a service scheduling engine dedicated to processing service scheduling in the dedicated data processor, and recording the second port number in the first data structure;
[0007] Sending the request message to a session module interfaced with the service scheduling engine, wherein the session module transmits the request message to a fixed port of the fixed port number bound to the service scheduling engine;
[0008] When the session module receives a response message from the service scheduling engine, the session module modifies the source port number of the response message based on the second port number in the first data structure.
[0009] In some embodiments of the present disclosure, before sending the request message to the session module connected to the service scheduling engine interface, and before the session module passes the request message to the fixed port service scheduling engine bound to the fixed port number of the service scheduling engine interface, the service scheduling communication method further includes:
[0010] Through the session module, the second port number is obtained from the first data structure and recorded in the session structure, so that after the session module receives the response data from the service scheduling engine, the second port number is obtained from the session structure and used to establish communication with the second port number of the second address, thereby generating the response message.
[0011] In some embodiments of the present disclosure, when the session module receives a response message from the service scheduling engine, modifying the source port number of the response message based on the second port number in the first data structure includes:
[0012] The second port number is taken out from the session structure, and the second port number is used as the source port number of the response message.
[0013] In some embodiments of the present disclosure, the first data structure includes a change flag field and a second port number field;
[0014] Said recording the second port number into the first data structure comprises: recording the second port number into the second port number field, and adding a change flag into the change flag field;
[0015] The method of obtaining the second port number from the first data structure and recording it in the session structure through the session module includes: obtaining the second port number from the second port number field and recording it in the session structure through the session module if the change mark field contains the change mark.
[0016] In some embodiments of the present disclosure, before the second address is kept unchanged and the second port number is changed to a fixed port number bound to a service scheduling engine dedicated to processing service scheduling in the dedicated data processor, the service scheduling communication method further includes:
[0017] Determine whether there is a redirection rule corresponding to the second address and the second port in the preset redirection rule table; if the redirection rule exists, change the second port number of the request message to a fixed port number bound to a service scheduling engine specifically used to process service scheduling in a dedicated data processor specified by the redirection rule.
[0018] In some embodiments of the present disclosure, sending the request message to a session module interfaced with the service scheduling engine further includes:
[0019] If the redirection rule exists, before searching the routing table for the request message, the modified request message is sent to the session module interfaced with the service scheduling engine.
[0020] In some embodiments of the present disclosure, sending the request message to a session module interfaced with the service scheduling engine further includes:
[0021] If the redirection rule does not exist, the routing table is searched according to the second address and the second port of the request message, and the request message is sent out or sent to a service scheduling engine in a dedicated data processor dedicated to processing service scheduling according to the routing table.
[0022] A second aspect of the present disclosure further provides a service scheduling communication system for a dedicated data processor coupled to a master device, wherein the service scheduling communication is communication between a first service and a second service, at least one of the first service and the second service being associated with the master device. The service scheduling communication system includes:
[0023] a request data receiving module, configured to receive a request message from the first service to the second service, the request message including the second address and the second port number of the second service;
[0024] a request data modification module, configured to keep the second address unchanged, change the second port number to a fixed port number bound to a service scheduling engine dedicated to processing service scheduling in the dedicated data processor, and record the second port number in a first data structure;
[0025] A request data sending module, configured to send the request message to a session module that interfaces with the service scheduling engine, wherein the session module transmits the request message to the fixed port number of the service scheduling engine interface and the fixed port number bound to the service scheduling engine;
[0026] A response data sending module is configured to modify the source port number of the response message based on the second port number in the first data structure after the session module receives the response message from the service scheduling engine.
[0027] A third aspect of the present disclosure further provides a dedicated data processor, characterized by comprising:
[0028] A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the service scheduling communication method described in any one of the above embodiments is implemented.
[0029] The fourth aspect of the present disclosure further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the service scheduling communication method described in any one of the above embodiments are implemented.
[0030] In the embodiment of the present disclosure, when the DPU performs scheduling communication between the first service and the second service of the main device, only the fixed port of the service scheduling engine is allowed to process the scheduling communication, so the second address can be kept unchanged, and only the second port number is changed to the fixed port number bound to the service scheduling engine. Compared with the method in which the service scheduling engine may have multiple addresses and multiple port numbers processing scheduling communications, this method reduces the workload of changes. Since the service scheduling engine has only one fixed port to process scheduling communications, and the port number is unique, it is no longer necessary to maintain the NAT session table. It eliminates the load of NAT session table matching that the prior art has to go through when receiving a request message. At the same time, it simply records the second port number in the first data structure, so that when receiving the response of the service scheduling engine, it does not need to go through the NAT session table matching, but only needs to simply look up the second port. Therefore, the message forwarding delay is reduced, the memory usage is reduced, and the scheduling efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0032] Figure 1 This is a diagram of the data plane structure of a traditional service mesh implemented in a NAT manner;
[0033] Figure 2 A flow chart of a service scheduling communication method provided according to an embodiment of the present disclosure;
[0034] Figure 3 A system architecture diagram of a service scheduling communication method provided according to an embodiment of the present disclosure;
[0035] Figure 4 A schematic structural diagram of a first data structure provided according to an embodiment of the present disclosure;
[0036] Figure 5 A flowchart of redirecting a request message according to a redirection rule according to an embodiment of the present disclosure is provided;
[0037] Figure 6 A schematic diagram of the structure of a service scheduling communication system provided according to an embodiment of the present disclosure;
[0038] Figure 7 To implement Figure 2 The structure diagram of the dedicated data processor of the service scheduling communication method is shown. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.
[0040] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0041] The present disclosure aims to solve the problems of poor network message processing performance and excessive resource overhead in traditional scenarios where dedicated data processors are used to offload the network processing functions of the main device. It is mainly used in network data proxy distribution scenarios that are replaced by dedicated data processors, such as service grid applications in the field of microservices. Service Mesh is a dedicated infrastructure layer in the microservice architecture, which usually consists of two components: a control plane and a data plane. The control plane is responsible for tasks such as service discovery, load balancing, and traffic management; the service mesh data plane (corresponding to the service scheduling engine below) is the communication plane between businesses, responsible for intercepting network traffic, and proxying and processing requests. Under the traditional service grid, the data plane is usually deployed with each service in the cluster, and sends and receives messages through the kernel protocol stack of the operating system on the main device.
[0042] When using a dedicated data processor to offload the kernel protocol stack on the main device to the dedicated data processor, the service mesh solution implemented with a dedicated data processor will also migrate the service mesh data plane to the dedicated data processor at the same time, use the dedicated data processor to receive request messages sent to each microservice on the main device, and distribute the request messages to each microservice through the service mesh data plane.
[0043] But if Figure 1 As shown in the figure, when the protocol stack + service scheduling engine is traditionally offloaded to the DPU, the request messages of different external devices or other microservices are sent to the service scheduling engine in the "network layer" of the protocol stack process in the form of NAT proxy. At the same time, the response request returned by the service scheduling engine is sent to the corresponding device in the form of NAT.
[0044] This means the network layer of the protocol stack process on the dedicated data processor must maintain NAT session tables for both directions. Maintaining the NAT session tables requires processing, consuming the dedicated data processor's computing resources. Furthermore, the more network connections the dedicated data processor establishes with external devices or other services, the more NAT sessions it must maintain. This creates a dangerous situation: a sudden surge in request messages can easily lead to insufficient memory on the dedicated data processor. In the worst case, the processor will be forced to discard request messages, impacting services. In the worst case, it can trigger unexpected interruptions and cause service downtime.
[0045] To solve the above problems, Figure 2 As shown, a first aspect of the present disclosure provides a service scheduling communication method for a dedicated data processor coupled to a master device, wherein the service scheduling communication is communication between a first service and a second service, at least one of the first service and the second service being associated with the master device, and wherein the service scheduling communication method includes:
[0046] Step S1: Receive a request message from the first service to the second service, where the request message includes a second address and a second port number of the second service;
[0047] Step S2: Keep the second address unchanged, change the second port number to a fixed port number bound to a service scheduling engine in the dedicated data processor dedicated to processing service scheduling, and record the second port number in the first data structure;
[0048] Step S3: sending the request message to the session module interfaced with the service scheduling engine, and the session module passing the request message to the fixed port of the fixed port number bound to the service scheduling engine;
[0049] Step S4: After receiving a response message from the service scheduling engine, the session module modifies the source port number of the response message based on the second port number in the first data structure.
[0050] like Figure 3 As shown, the present disclosure implements the provided service scheduling communication method for application in a computer network processing process, specifically in a protocol stack. A protocol stack, also known as a protocol stack, is a specific software implementation of a computer network protocol suite, involving the network layer, transport layer, and session layer of the OSI (Open System Interconnect) reference model.
[0051] In the embodiment of the present disclosure, the modification of the destination port of the request message is performed at the network layer of the protocol stack, that is, Figure 3 The destination port modification module is extended in the network layer. The source port modification of the response message is in the session layer of the protocol stack, that is, Figure 3 The session module in the session layer.
[0052] In the embodiments of the present disclosure, the first service and the second service in step S1 refer to two physical devices or virtual devices that establish network communication. For example, the first service is a mobile phone, and the second service is a microservice in a microservice framework, or a virtual machine or server that provides web access services. For another example, the first service is a microservice in the microservice framework, and the second service is also a microservice in the microservice framework; they represent two communicating entities using network communication. The request message is a network message sent by the first service to access the second service after the network communication between the first service and the second service is established. The second address is the destination IP address in the quintuple of the network message, and the second port is the destination port.
[0053] The service scheduling engine in step S2 is an application instance (a program) of the application layer in the computer network protocol. It should be noted that the traditional computer processes network data by processing the network message received by the network card and sent to the memory by the protocol stack process of the computer kernel, and then sends the processed network message to the corresponding application layer related program. The related program is a program running on the operating system and bound to a certain port of the operating system. The protocol stack process usually determines the application layer process to which the network message should be sent based on the five-tuple of the message. Common application layer related programs such as the Nginx proxy program, the Nginx proxy program proxies the message data processed by the protocol stack on its local machine to other nodes.
[0054] In the embodiments of the present disclosure, the present disclosure offloads the protocol stack process to a dedicated data processor, and simultaneously offloads the application layer application instance, namely the service scheduling engine, to the dedicated processor. The dedicated data processor can be a hardware device with computing and logical processing capabilities, such as a DPU or FPGA. Therefore, the service scheduling engine in the embodiments of the present disclosure is an application instance for providing data proxy distribution services to other processes on the master device.
[0055] Typically, the service scheduling engine is the data plane in the service mesh mechanism under the microservice framework, which is used to provide network data reception and distribution services to multiple microservices in the main device.
[0056] The first data structure in step S2 is a data structure created in the memory by the protocol stack process when receiving the request message for storing and describing the data packet information, specifically as follows Figure 4 As shown, the data structure consists of three parts:
[0057] Public data structure: The public data structure is the necessary information recorded when the protocol stack process processes the request message;
[0058] Private area: A private area is a space that can be used for customization by individuals or other teams.
[0059] Data area: The data area is used to store message data.
[0060] The session module in step S3 refers to a functional module corresponding to the session layer of the OSI reference model in the aforementioned protocol stack, and is a part of the protocol stack process.
[0061] The response message in step S4 refers to the response message made by the corresponding microservice or application to the request message after the service scheduling engine sends the request message to the corresponding microservice or application. The source port refers to the source port in the response message quintuple.
[0062] Specifically, in step S1, the first service receives a request message for the second service. This is done by a dedicated data processor receiving a request message sent by an external device or another process within the master device. Specifically, the request message is received by a protocol stack process offloaded to the dedicated data processor, corresponding to the network layer logic of the protocol stack process. The second service is a data access service provided by an application program residing in the master device.
[0063] In step S2, the network layer of the protocol stack modifies the destination port of the corresponding message header of the received request message to the corresponding destination port. For example, if the source port number of the message header of the request message for accessing a web service in the main device is "80", and the port number bound to the service scheduling engine is "8000", the source port number of the request message will be changed to "8000". For example, if the five-tuple of the request message is: "192.168.1.2, 566, TCP, 192.168.1.100, 80";
[0064] "192.168.1.2" represents the source IP address, which is the IP address of the first service;
[0065] "566" represents the source port, which is the port used by the first service;
[0066] "TCP" indicates that the message type is TCP message;
[0067] "192.168.1.100" indicates the destination IP address, which is the IP address of the second service;
[0068] "80" indicates the destination port, that is, the second port, which is the port used by the second service.
[0069] If the service scheduling engine is bound to port 8000, change "192.168.1.2, 566, TCP, 192.168.1.100, 80" to:
[0070] "192.168.1.2,566,TCP,192.168.1.100,8000".
[0071] The message header and the data part of the message do not need to be modified, and the port number "80" is saved as follows: Figure 4 It should be noted that, in the protocol stack process, upon receiving the request message, the first data structure of the request message is created in the memory, and all subsequent processing of the request message is performed on the first data structure.
[0072] In step S3, after completing step S2, the protocol stack process passes the first data structure corresponding to the request message with the modified destination port to the session layer, i.e., the session module. The session module then passes the message data of the request message with the modified destination port in the data area of the first data structure to the service scheduling engine via memory sharing. The service scheduling engine then sends the request message to the corresponding second service.
[0073] In particular, unlike the traditional NAT implementation method, the service scheduling engine no longer binds the destination address and destination port in the NAT rule table in the NAT manner, but only needs to bind the specified port, that is, the bound address is all addresses, that is, the bound address is "0.0.0.0". "0.0.0.0" means binding all local addresses in socket communication.
[0074] In step S4, after the service scheduling engine receives the response message sent by the second service, it will send the reply message to the protocol stack process, that is, it will reach the session layer of the protocol stack process. Since the destination port of the request message has been changed in the request message of the response message, the source port of the response message sent by the service scheduling engine should be the port bound to the service scheduling engine. As mentioned above, if the destination port of the request message is "80", but it is modified to "8000", the corresponding source port of the response message is "8000". At this time, in the session module of the protocol stack process, it is necessary to replace the second port number recorded in the first data structure, that is, "80", with the source port of the response message. That is, change "8000" to "80" and then send it out.
[0075] Referring to the above example, if the five-tuple of the request message received by the protocol stack is "192.168.1.2, 566, TCP, 192.168.1.100, 80";
[0076] The five-tuple of the response message sent by the protocol stack should be "192.168.1.100, 80, TCP, 192.168.1.2, 566." This allows data plane forwarding without NAT mode. Furthermore, there is no NAT session table. Simply storing the destination port of the request message in the free area (private area) of the first data structure achieves the same technical effect as NAT mode.
[0077] In some embodiments of the present disclosure, before sending the request message to the session module connected to the service scheduling engine interface, and before the session module passes the request message to the fixed port service scheduling engine bound to the fixed port number of the service scheduling engine interface, the service scheduling communication method further includes:
[0078] Through the session module, the second port number is obtained from the first data structure and recorded in the session structure, so that after the session module receives the response data from the service scheduling engine, the second port number is obtained from the session structure and used to establish communication with the second port number of the second address, thereby generating the response message.
[0079] Some versions of the protocol stack stipulate that after the session layer of the protocol stack process sends the request message to the application layer (such as the service scheduling engine), the first data structure corresponding to the request message will be eliminated in the memory, and a session structure with the application layer will be created, namely, a session, to save the five-tuple of request data and other related information.
[0080] Therefore, in some embodiments of the present disclosure, after the modified request message reaches the session layer of the protocol stack, after the session layer passes the request message to the service scheduling engine, when the session layer creates a session with the service scheduling engine, the embodiments of the present disclosure extend an additional port field beyond the general session field to save the destination port number of the request message, that is, take out the second port number from the private area of the first data structure and save it to the extended port field in the session.
[0081] Furthermore, by storing the second port number in the session extension field corresponding to the session layer of the OSI reference model, only a 16-bit memory space is required to expand the traditional session structure. Compared to the NAT approach that sets up two layers of NAT session structures and corresponding NAT rule tables at the network layer of the OSI reference model, the solution implemented in this disclosure eliminates a large amount of processing logic and significantly reduces memory requirements.
[0082] In some embodiments of the present disclosure, when the session module receives a response message from the service scheduling engine, modifying the source port number of the response message based on the second port number in the first data structure includes:
[0083] The second port number is taken out from the session structure, and the second port number is used as the source port number of the response message.
[0084] In some embodiments of the present disclosure, referring to the above example, after the protocol stack session layer receives the response message sent by the service scheduling engine, the corresponding session is determined according to the five-tuple of the response message, and the source port number of the response message is the binding port of the service scheduling engine, which should be sent to the first service. The port number of the destination port when the first service sends the request message, that is, the second port number is saved in the port field in the session, then the second port number is taken out from the session, and the second port number replaces the source port of the response message.
[0085] In some embodiments of the present disclosure, the first data structure includes a change flag field and a second port number field;
[0086] Said recording the second port number into the first data structure comprises: recording the second port number into the second port number field, and adding a change flag into the change flag field;
[0087] The method of obtaining the second port number from the first data structure and recording it in the session structure through the session module includes: obtaining the second port number from the second port number field and recording it in the session structure through the session module if the change mark field contains the change mark.
[0088] In some embodiments of the present disclosure, referring to the above example, after the destination port of the request message is modified at the network layer of the protocol stack, a modification mark is added to the corresponding first data structure of the request message, so as to facilitate the identification of the modified request message at the session layer of the protocol stack for subsequent processing. Figure 4 The private area of the first data structure shown creates a corresponding change flag field and assigns a predetermined value to the change flag field.
[0089] Furthermore, at the session layer of the protocol stack, when receiving any corresponding request data, it first searches the private area of the first data structure corresponding to the request message data to see whether there is a change flag field, and determines whether the value of the change flag field is a predetermined value. If it is a predetermined value, it means that the second port of the request message data has been changed, then the second port number is taken out from the private area of the first data structure and saved in the corresponding session.
[0090] In some embodiments of the present disclosure, before the second address is kept unchanged and the second port number is changed to a fixed port number bound to a service scheduling engine dedicated to processing service scheduling in the dedicated data processor, the service scheduling communication method further includes:
[0091] Determine whether there is a redirection rule corresponding to the second address and the second port in the preset redirection rule table; if the redirection rule exists, change the second port number of the request message to a fixed port number bound to a service scheduling engine specifically used to process service scheduling in a dedicated data processor specified by the redirection rule.
[0092] In some embodiments of the present disclosure, as to whether to modify the destination address of the received request message, corresponding redirection rules may be formulated as needed to filter the received network messages. The redirection rules are as follows:
[0093] port-redirectrule: dst; ip_b; port_b; protocol: tcp; to_port: listen_port;
[0094] Where dst represents the destination address, ip_b represents the destination IP address, port_b represents the destination port, protocol represents the message type, and to_port represents the redirected destination port. For example, listen_port represents the binding port of the service scheduling engine.
[0095] For example, a redirection rule is as follows:
[0096] port-redirectrule "dst": "192.168.1.101"; 80; "protocol": "tcp"; "to-port": "15001";
[0097] This means that the redirection rule specifies a destination IP address of 192.168.1.101, a destination port of 80, and a TCP packet type of 15001. This means that the protocol stack on the dedicated data processor will change the destination port of any request packet received to 15001, regardless of the source address, as long as the request packet's destination address is 192.168.1.101 and the packet is a TCP packet accessing port 80.
[0098] In some disclosed embodiments, the destination IP addresses in the redirection rules are generally the IP addresses of multiple second services served by the service scheduling engine, and the destination port is generally the service port of the second service, such as port 80 commonly used by web services. If there are multiple second services in the master device, multiple redirection rules are generally set as well.
[0099] Furthermore, after the dedicated data processor receives a network message from the first service requesting access to the second service, the network layer of the protocol stack performs a rule match on the network message according to the redirection rule. Specifically, after obtaining the destination IP address and destination port number in the network message, the dedicated data processor traverses the redirection rules in the redirection rule table to determine whether there is a redirection rule whose destination port and destination IP address are the same as those of the network message. If so, it indicates that the redirection rule is matched, and the redirection destination port in the matched redirection rule is used as the destination port number of the request message, thereby completing the modification of the request message.
[0100] Furthermore, the redirection rules in the redirection rule table can be constructed in the form of key-value pairs, that is, the destination IP address, destination port, and protocol type in the redirection rule are used as the key, and the redirection rule is used as the value, forming a redirection rule table in a dictionary data structure. The destination port and destination IP address of the received network message are used as query conditions to achieve fast query. If the query is found, it is considered a hit. The redirection destination port in the hit redirection rule is used as the target port of the request message, completing the modification of the request message.
[0101] In some embodiments of the present disclosure, sending the request message to a session module interfaced with the service scheduling engine further includes:
[0102] If the redirection rule exists, before searching the routing table for the request message, the modified request message is sent to the session module interfaced with the service scheduling engine.
[0103] In some embodiments of the present disclosure, referring to the above example, Figure 5 As shown in the figure, for a received request message, if a corresponding redirection rule is found based on the request message's destination IP address and destination port, the redirection rule is hit, and the destination port is modified according to the redirection rule. Instead of searching the routing table as traditionally done to determine the request message's destination, the request message is sent directly to the session layer in the protocol stack. This prevents the modified request message from being forwarded to other routing nodes due to a mismatch between the routing table and the modified request message.
[0104] In some embodiments of the present disclosure, sending the request message to a session module interfaced with the service scheduling engine further includes:
[0105] If the redirection rule does not exist, the routing table is searched according to the second address and the second port of the request message, and the request message is sent out or sent to a service scheduling engine in a dedicated data processor dedicated to processing service scheduling according to the routing table.
[0106] In some embodiments of the present disclosure, Figure 5 As shown, if there is no hit, the traditional implementation method is used to search the routing table according to the five-tuple information of the request message. If the result of searching the routing table is to send the request message to other network nodes, the request message is sent to other network nodes. If the result of searching the routing table is to forward the request message to the internal service scheduling engine, the request message is sent to the service scheduling engine according to the traditional processing flow, that is, through the original process of the protocol stack.
[0107] A second aspect of the present disclosure further provides a service scheduling communication system for a dedicated data processor coupled to a master device, wherein the service scheduling communication is communication between a first service and a second service, at least one of the first service and the second service being associated with the master device. The service scheduling communication system includes:
[0108] The request data receiving module 3001 is configured to receive a request message from the first service to the second service, wherein the request message includes the second address and the second port number of the second service;
[0109] a request data modification module 3002, configured to keep the second address unchanged, change the second port number to a fixed port number bound to a service scheduling engine in the dedicated data processor dedicated to processing service scheduling, and record the second port number in a first data structure;
[0110] The request data sending module 3003 is used to send the request message to the session module of the service scheduling engine interface, and the session module transmits the request message to the fixed port number of the service scheduling engine interface and the fixed port number bound to the service scheduling engine;
[0111] The response data sending module 3004 is configured to modify the source port number of the response message based on the second port number in the first data structure after the session module receives the response message from the service scheduling engine.
[0112] In some embodiments of the present disclosure, the system further comprises:
[0113] A session recording module is used to obtain the second port number from the first data structure through the session module and record it in the session structure, so that after the session module receives response data from the service scheduling engine, it obtains the second port number from the session structure and is used to establish communication with the second port number of the second address, thereby generating the response message.
[0114] In some embodiments of the present disclosure, the response data sending module 3004 is further configured to:
[0115] The second port number is taken out from the session structure, and the second port number is used as the source port number of the response message.
[0116] In some embodiments of the present disclosure, the first data structure includes a change flag field and a second port number field;
[0117] The request data modification module 3002 is further configured to record the second port number in the second port number field and add a change flag to the change flag field;
[0118] The method of obtaining the second port number from the first data structure and recording it in the session structure through the session module includes: obtaining the second port number from the second port number field and recording it in the session structure through the session module if the change mark field contains the change mark.
[0119] In some embodiments of the present disclosure, the service communication scheduling system further includes:
[0120] The redirection module is used to determine whether there is a redirection rule corresponding to the second address and the second port in the preset redirection rule table. If the redirection rule exists, the second port number of the request message is changed to a fixed port number bound to the service scheduling engine in the dedicated data processor specified by the redirection rule for processing service scheduling.
[0121] In some embodiments of the present disclosure, the redirection module is further configured to:
[0122] If the redirection rule exists, before searching the routing table for the request message, the modified request message is sent to the session module interfaced with the service scheduling engine.
[0123] In some embodiments of the present disclosure, the redirection module is further configured to:
[0124] If the redirection rule does not exist, the routing table is searched according to the second address and the second port of the request message, and the request message is sent out or sent to a service scheduling engine in a dedicated data processor dedicated to processing service scheduling according to the routing table.
[0125] The third aspect of the present disclosure further proposes a dedicated data processor 500, which is described below with reference to Figure 7 hereinafter, a special purpose data processor 500 according to an embodiment of the present disclosure is described. Figure 7 The dedicated data processor 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0126] Figure 7 The dedicated data processor 500 shown may include, but is not limited to, at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting various system components (including the storage unit 520 and the processing unit 510). The storage unit 520 stores program code, which can be executed by the processing unit 510, causing the processing unit 510 to perform the steps according to various exemplary embodiments of the present disclosure as described in the description of the exemplary method above.
[0127] The storage unit 520 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 5201 and / or a cache memory unit 5202 , and may further include a read-only memory unit (ROM) 5203 .
[0128] The storage unit 520 may also include a program / utility 5204 having a set (at least one) of program modules 8205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0129] Bus 530 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0130] The application-specific data processor 500 can also communicate with one or more external devices 600 (e.g., a keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the application-specific data processor 500, and / or any device that enables the application-specific data processor 500 to communicate with one or more other computing devices (e.g., a router, modem, etc.). Such communication can occur via an input / output (I / O) interface 550. Furthermore, the application-specific data processor 500 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the application-specific data processor 500 via a bus 530. It should be understood that, although not shown, the application-specific data processor 500 can be implemented using other hardware and / or software modules, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0131] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0132] In an exemplary embodiment of the present disclosure, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method described in the above method embodiment.
[0133] According to one embodiment of the present disclosure, a program product for implementing the method in the above method embodiment is also provided. The program product may be a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0134] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0135] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0136] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0137] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0138] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0139] Furthermore, although the steps of the method of the present disclosure are described in a particular order in the accompanying drawings, this does not require or imply that the steps must be performed in this particular order, or that all steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0140] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0141] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the appended claims.
[0142] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0143] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or be implemented as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or be implemented as a computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose data processor or programmable or special-purpose hardware (such as ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the verification code generation method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the verification code generation method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the verification code generation method shown here.
[0144] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of this application.
[0145] The above implementation methods are only used to illustrate the embodiments of the present application, and are not intended to limit the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.
Claims
1. A service scheduling communication method, characterized in that: A dedicated data processor is configured to be coupled to a master device, wherein the service scheduling communication is communication between a first service and a second service, at least one of the first service and the second service being associated with the master device, wherein the service scheduling communication method comprises: receiving a request message from the first service to the second service, the request message including the second address and the second port number of the second service; Keeping the second address unchanged, changing the second port number to a fixed port number bound to a service scheduling engine dedicated to processing service scheduling in the dedicated data processor, and recording the second port number in the first data structure; Sending the request message to a session module interfaced with the service scheduling engine, wherein the session module transmits the request message to a fixed port of the fixed port number bound to the service scheduling engine; When the session module receives a response message from the service scheduling engine, the session module modifies the source port number of the response message based on the second port number in the first data structure.
2. The service scheduling communication method according to claim 1, characterized in that: Before sending the request message to the session module interfaced with the service scheduling engine, and the session module delivering the request message to the fixed-port service scheduling engine of the fixed port number bound to the service scheduling engine, the service scheduling communication method further includes: Through the session module, the second port number is obtained from the first data structure and recorded in the session structure, so that after the session module receives the response data from the service scheduling engine, the second port number is obtained from the session structure and used to establish communication with the second port number of the second address, thereby generating the response message.
3. The method according to claim 2, characterized in that When the session module receives the response message from the service scheduling engine, modifying the source port number of the response message based on the second port number in the first data structure includes: The second port number is taken out from the session structure, and the second port number is used as the source port number of the response message.
4. The service scheduling communication method according to claim 2, characterized in that: The first data structure includes a change flag field and a second port number field; Said recording the second port number into the first data structure comprises: recording the second port number into the second port number field, and adding a change flag into the change flag field; The step of obtaining the second port number from the first data structure and recording the second port number in the session structure includes: Through the session module, if the change mark field contains the change mark, the second port number is obtained from the second port number field and recorded in the session structure.
5. The service scheduling communication method according to claim 1, characterized in that: Before the second address is kept unchanged and the second port number is changed to a fixed port number bound to a service scheduling engine in the dedicated data processor dedicated to processing service scheduling, the service scheduling communication method further includes: Determine whether there is a redirection rule corresponding to the second address and the second port in the preset redirection rule table; if the redirection rule exists, change the second port number of the request message to a fixed port number bound to a service scheduling engine specifically used to process service scheduling in a dedicated data processor specified by the redirection rule.
6. The method according to claim 5, characterized in that The step of sending the request message to the session module interfaced with the service scheduling engine further includes: If the redirection rule exists, before searching the routing table for the request message, the modified request message is sent to the session module interfaced with the service scheduling engine.
7. The method according to claim 6, characterized in that The step of sending the request message to the session module interfaced with the service scheduling engine further includes: If the redirection rule does not exist, the routing table is searched according to the second address and the second port of the request message, and the request message is sent out or sent to a service scheduling engine in a dedicated data processor dedicated to processing service scheduling according to the routing table.
8. A service dispatch communication system for a dedicated data processor coupled to a master device, wherein the service dispatch communication is communication between a first service and a second service, at least one of the first service and the second service being associated with the master device, characterized in that: The service scheduling communication system includes: a request data receiving module, configured to receive a request message from the first service to the second service, the request message including the second address and the second port number of the second service; a request data modification module, configured to keep the second address unchanged, change the second port number to a fixed port number bound to a service scheduling engine dedicated to processing service scheduling in the dedicated data processor, and record the second port number in a first data structure; A request data sending module, configured to send the request message to a session module interfaced with the service scheduling engine, wherein the session module transmits the request message to a fixed port of the fixed port number bound to the service scheduling engine; A response data sending module is configured to modify the source port number of the response message based on the second port number in the first data structure after the session module receives the response message from the service scheduling engine.
9. A special data processor, characterized in that include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the service scheduling communication method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the service scheduling communication method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Spoofing technique for transparent proxy caching
CN104160680A
Message processing method and device
CN113179295A