Data transmission method and device for edge computing, equipment, medium and product
By detecting the public network address of the client access request in edge computing and generating session records, the quintuple conflict problem is solved, and the data transmission success rate and user experience are improved.
Patent Information
- Application Number
- CN202510779811.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-06-11
AI Technical Summary
In edge computing, when multiple access requests access different public network IP addresses but use the same edge service node, it causes quintuple conflicts, resulting in abnormal data transmission and affecting user experience.
By detecting the public network address of the client access request, determining the session record, and saving it to the virtual switch of the target service node, ensuring that the public network address is included when the response information hits the session record to avoid quintuple conflicts.
It improves the success rate of data transmission, enhances user experience, and avoids data transmission anomalies.
Smart Images

Figure CN120301952B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to data transmission methods, devices, equipment, media, and products for edge computing. Background Art
[0002] Edge computing is a distributed computing model that deploys computing, storage, and network resources at the edge of the network, close to the data source or client. In related data transmission methods, the edge cloud's four-layer load balancing (LoadBalancer, hereinafter referred to as LB) can be used to distribute requests to access the public network to the virtual machines (Real Servers, hereinafter referred to as RS) of multiple edge service nodes according to a certain load balancing algorithm, and generate a session record corresponding to the access request in the edge service node, where the session record is used to indicate the source IP and destination IP, that is, the client's IP and the edge service node's virtual machine IP. Next, if the response information for the access request hits the session record, the response information is returned to the client in response to the access request, where the session record contains the edge service node's virtual machine IP and the public network IP.
[0003] However, if there are multiple access requests, and the public network IP accessed by each access request is different, but the corresponding edge service node is the same, then for these multiple access requests, only the session record of the first access request will be established in the edge service node. This results in the same five-tuple established in the response message for each access request in the edge service node (the source IP and source port are both the IP and port of the public network accessed by the first access request, and the destination IP and destination port are both the IP and port of the virtual machine), resulting in a five-tuple conflict, causing data transmission abnormalities and affecting the user experience. Summary of the Invention
[0004] In view of this, the present disclosure provides a data transmission method, apparatus, device, medium and product for edge computing to solve the problem of data transmission anomalies caused by quintuple conflicts during data transmission.
[0005] In a first aspect, the present disclosure provides a data transmission method for edge computing, the method comprising:
[0006] Detecting an access request sent by a client and determining a first address of a public network accessed by the access request;
[0007] Determine a session record based on the first address, and save the session record to a target service node, wherein the target service node is an edge service node in a content delivery network for processing access requests;
[0008] The response information of the target service node is sent to the client when the response information hits the session record.
[0009] In a second aspect, the present disclosure provides a data transmission apparatus for edge computing, comprising:
[0010] a detection module configured to detect an access request sent by a client and determine a first address of a public network accessed by the access request;
[0011] a determination module configured to determine a session record based on the first address and save the session record to a target service node, wherein the target service node is an edge service node in a content distribution network for processing the access request;
[0012] a sending module configured to send response information of the target service node to the client when the response information hits the session record.
[0013] In a third aspect, the present disclosure provides a computer device, comprising a memory and a processor, which are communicatively connected with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission method for edge computing according to the first aspect or any one of the corresponding embodiments thereof.
[0014] In a fourth aspect, the present disclosure provides a computer readable storage medium, which stores computer instructions for causing a computer to perform the data transmission method for edge computing according to the first aspect or any one of the corresponding embodiments thereof.
[0015] In a fifth aspect, the present disclosure provides a computer program product, which comprises computer instructions for causing a computer to perform the data transmission method for edge computing according to the first aspect or any one of the corresponding embodiments thereof.
[0016] In the embodiments of the present disclosure, first, an access request sent by a client can be detected, and a first address of a public network accessed by the access request can be determined. Next, a session record can be determined based on the first address, and the session record can be saved to a virtual switch of a target service node, wherein the target service node is an edge service node in a content distribution network for processing the access request. Then, response information of the target service node can be sent to the client when the response information hits the session record, so that the first address of the public network can be contained in the session record, so as to avoid five-tuple conflict when responding to access requests accessing different public networks, improve the success rate of data transmission, and further improve user experience. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a schematic diagram of data transmission in a related content distribution network;
[0019] Figure 2 This is a schematic diagram of the quintuple conflict during data transmission;
[0020] Figure 3 is a flow chart of a data transmission method for edge computing according to an embodiment of the present disclosure;
[0021] Figure 4 This is a schematic diagram of data transmission using four-layer load balancing of edge cloud according to an embodiment of the present disclosure;
[0022] Figure 5 is a flow chart of another data transmission method for edge computing according to an embodiment of the present disclosure;
[0023] Figure 6 is a flowchart of another data transmission method for edge computing according to an embodiment of the present disclosure;
[0024] Figure 7 is a structural block diagram of a data transmission device for edge computing according to an embodiment of the present disclosure;
[0025] Figure 8 Schematic diagram of the hardware structure of the computer device according to the embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.
[0027] In conjunction with the application scenarios on which the execution of the data transmission method for edge computing depends, the application scenarios are described here.
[0028] Edge computing is a distributed computing mode that deploys computing, storage and network resources close to data sources or clients on the network edge. In a related data transmission method, a user's access request is usually distributed to an edge service node for processing, and a session record corresponding to the access request is generated in the edge service node, where the edge service node is used for edge computing, and the session record is used to indicate the source IP and the destination IP, i.e., the IP of the client and the IP of the virtual machine of the edge service node. Next, if the response information for the access request hits the session record, the response information is returned to the client in response to the access request, where the session record contains the IP of the virtual machine of the edge service node and the IP of the public network.
[0029] However, if there are multiple access requests, each of which accesses a different IP of the public network but corresponds to the same edge service node, only the session record of the first access request will be established in the edge service node for the multiple access requests, which causes the five-tuple established by the edge service node for the response packet of each access request to be the same (the source IP and the source port are the IP and the port of the public network accessed by the first access request, and the destination IP and the destination port are the IP and the port of the virtual machine), resulting in five-tuple conflict and abnormal data transmission, affecting the user experience.
[0030] In a related data transmission method, the requests for accessing the public network can be distributed to multiple virtual machines (Real Server, hereinafter referred to as RS) of edge service nodes according to a certain load balancing algorithm through the four-layer load balancing (Load Balancer, hereinafter referred to as LB) of the edge cloud. On the host where the RS is located, a virtual switch (Virtual Switch, hereinafter referred to as VS) is usually deployed, which is responsible for managing the network packet transmission of all virtual machines on the host. When there is a request, the path of network traffic is from the client, through the LB, to the host where the RS is located, and finally to the virtual machine where the RS is located. In this process, the role of the LB is to convert the public network IP accessed by the client into the intranet IP where the RS virtual machine is located, and this forwarding mode is called Network Address Translation (Network Address Translation, hereinafter referred to as NAT).
[0031] For the packet path in the response direction, it is transmitted in the reverse path, i.e., from the RS virtual machine, through the VS on the host, through the LB, and finally returned to the client. In this process, the LB converts the IP address of the RS into the public network IP address, and then sends out the packet.
[0032] However, in some business scenarios sensitive to delay, in order to reduce the delay through the LB link and improve the throughput, the industry usually adopts the way of Direct Server Return (DSR hereinafter). In this way, the reply direction message will be transmitted directly from the RS virtual machine to the public network area, rather than through the LB. This requires the VS to change the source IP address of the reply message sent by the RS to the public network IP address (EIP hereinafter), and then send it directly.
[0033] Specifically, as Figure 1 The related four-layer load balancing using edge cloud for data transmission is shown in the schematic diagram, wherein the client IP is the network traffic path of the request direction, which can be expressed as: client-LB-RS located in the edge service node-RS, here, the client IP is 1.1.1.1:32333, the EIP is 2.2.2.2:80, and the virtual machine IP of the edge service node allocated for the access request is 172.168.1.1:80. After receiving the access request of the client to the EIP, the switch TOR (Top of Rack, a kind of data center network architecture) determines the edge service node 172.168.1.1:80 for processing the access request through the LB, and establishes a session record in the VS of the edge service node: 1.1.1.1:32333->172.168.1.1:80.
[0034] Next, the reply message generated by the edge service node can be monitored by the RS, and when the reply message hits the session record, the source IP and source port of the reply message are modified to the public network IP and port 2.2.2.2:80, and the reply message is transmitted directly from the RS virtual machine to the switch TOR in the public network area, and the reply message is fed back to the client through the switch TOR.
[0035] However, in this data transmission method, if there are multiple access requests from the same client with the same source IP (client IP) and using the same source port (client port), and the IP of the public network accessed by each access request is different, but the corresponding edge service node is the same, it may cause the five-tuple established by the edge service node for the reply message of each access request to be the same, resulting in five-tuple conflict.
[0036] Here, as Figure 2 The schematic diagram of five-tuple conflict is shown, wherein the access request 1 requests to access the EIP1:2.2.2.2:80, the access request 2 requests to access the EIP2:2.2.2.3:80, the LB allocates the same edge service node for the access request 1 and the access request 2, and the virtual machine IP is 172.168.1.1:80.
[0037] However, since the source IP and source port of access request 1 and access request 2 are the same, when the VS of the edge service node contains the session record 1.1.1.1:32333->172.168.1.1:80 of access request 1, no duplicate session record will be established when access request 2 is received. In other words, even though the data streams of access request 1 and access request 2 are different, the session records are the same. Therefore, the quintuple of the response message established based on the session record is the same. The quintuple conflict causes an abnormality in the transmission of access request 1 and causes access request 2 to fail to establish a connection.
[0038] Based on this, an embodiment of the present disclosure provides a data transmission method for edge computing, which can first detect the access request sent by the client and determine the first address of the public network accessed by the access request. Next, based on the first address, the session record can be determined, and the session record can be saved in the virtual switch of the target service node, wherein the target service node is an edge service node for processing access requests in the content distribution network. Then, when the response information of the target service node hits the session record, the response information can be sent to the client, so that the first address of the public network can be included in the session record, so that when responding to access requests to different public networks, the generation of quintuple conflicts leading to data transmission anomalies can be avoided, thereby improving the success rate of data transmission and thus improving the user experience.
[0039] According to an embodiment of the present disclosure, an embodiment of a data transmission method for edge computing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0041] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0042] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0043] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0044] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0045] According to an embodiment of the present disclosure, an embodiment of a data transmission method for edge computing is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0046] In this embodiment, a data transmission method for edge computing is provided, which can be used in the above-mentioned CDN. Figure 3 is a flow chart of a data transmission method for edge computing according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:
[0047] Step S301: Detect an access request sent by a client and determine a first address of a public network accessed by the access request.
[0048] In a CDN, when a client first requests a resource, it pulls it from the origin server and stores it on edge service nodes. Subsequently, when other users in the same region request the same resource again, they can retrieve it directly from the edge service nodes, eliminating the need to return to the origin server each time, thus improving access speed and efficiency.
[0049] Based on this, after detecting the access request sent by the client, the CDN can parse the request message of the access request to obtain the first address of the public network accessed by the access request (hereinafter referred to as EIP), and determine the target service node for processing the access request in the edge node of the CDN based on the above-mentioned LB, and route the access request to the target service node.
[0050] Here, as Figure 4The figure shows a schematic diagram of data transmission using the four-layer load balancing of the edge cloud. After receiving the access request sent by the client, the TOR switch can determine the target service node for processing the access request through the LB.
[0051] Step S302: determining a session record based on the first address, and saving the session record to a target service node, wherein the target service node is an edge service node in a content distribution network for processing access requests.
[0052] In the disclosed embodiments, an EIP transparent transmission mode can be used to transmit access request packets to the target service node. In this transparent transmission mode, during the transmission of the request packet from the source device to the target device, the intermediate device is only responsible for relaying the data packet and does not process, parse, or modify the data. This maintains the originality and integrity of the data, as if the data passed through the intermediate device "transparently." Here, the request packet typically includes the source IP address, source port number, and the destination IP address and destination port number (the first address and port number corresponding to the public network).
[0053] In transparent transmission mode, LB can fill the virtual machine address of the target service node into the option field of the request message (a field used to carry additional information in network communication) and encapsulate the request message, thereby transmitting the encapsulated request message to the target service node, so that the target service node establishes a session record based on the first address in the request message.
[0054] Step S303: When the response information of the target service node matches the session record, the response information is sent to the client.
[0055] In the embodiment of the present disclosure, the response information may include a response message, wherein the response message may include information such as a source IP address, a source port number, and a destination IP address and a destination port number to be connected, etc. Here, if the source IP address of the response message hits the first address, it is determined that the response message hits the session record.
[0056] Here, as Figure 4 As shown, after the response information hits the session record, the access request corresponding to the response information can be directly determined, and the response information is fed back to the client to establish a connection with the client.
[0057] It can be seen from the above description that in the embodiment of the present disclosure, first, the access request sent by the client can be detected, and the first address of the public network accessed by the access request can be determined. Next, based on the first address, the session record can be determined, and the session record can be saved in the virtual switch of the target service node, wherein the target service node is an edge service node for processing access requests in the content distribution network. Then, when the response information of the target service node hits the session record, the response information can be sent to the client, so that the first address of the public network can be included in the session record, so that when responding to access requests to different public networks, the generation of quintuple conflicts leading to data transmission anomalies can be avoided, thereby improving the success rate of data transmission and thus improving the user experience.
[0058] In this embodiment, another data transmission method for edge computing is provided, which can be used for the above-mentioned CDN. Figure 5 is a flow chart of a data transmission method for edge computing according to an embodiment of the present disclosure, such as Figure 5 As shown, the process includes the following steps:
[0059] Step S501: Detect an access request sent by a client and determine a first address of a public network accessed by the access request.
[0060] Specifically, the above step S501 includes:
[0061] Step S5011: Obtain a request message corresponding to the access request.
[0062] Step S5012: parse the destination address corresponding to the access request based on the request message to obtain a first address.
[0063] In the embodiment of the present disclosure, the request message corresponding to the access request may include a source IP address, a source port number, and a destination IP address and a destination port number to be connected, etc., wherein the destination IP is the above-mentioned destination address.
[0064] Here, as Figure 4 As shown in , the destination address corresponding to access request 1 can be EIP 12.2.2.2:80 of public network 1, and the destination address corresponding to access request 2 can be 2.2.2.3:80 of public network 2. Next, the first address can be transparently transmitted to the target service node through the above-mentioned TOR switch.
[0065] Step S502: Based on the first address, determine the session record and save the session record to the target service node, wherein the target service node is an edge service node in the content distribution network for processing access requests. Figure 3 Step S302 of the illustrated embodiment will not be described in detail here.
[0066] Step S503: When the response information of the target service node matches the session record, the response information is sent to the client. Figure 3 Step S303 of the illustrated embodiment will not be described in detail here.
[0067] In the disclosed embodiment, the request message of the access request can be parsed to obtain the destination address corresponding to the access request and the first address, thereby providing a technical basis for transparently transmitting the first address to the virtual switch of the target service node.
[0068] In this embodiment, another data transmission method for edge computing is provided, which can be used for the above-mentioned CDN. Figure 6 is a flow chart of a data transmission method for edge computing according to an embodiment of the present disclosure, such as Figure 6 As shown, the process includes the following steps:
[0069] Step S601: Detect the access request sent by the client and determine the first address of the public network accessed by the access request. Figure 3 Step S301 of the illustrated embodiment will not be described in detail here.
[0070] Step S602: determining a session record based on the first address, and saving the session record to a target service node, wherein the target service node is an edge service node in a content distribution network for processing access requests.
[0071] Specifically, the above step S602 includes:
[0072] Step S6021: transparently transmit the first address to the virtual switch of the target service node.
[0073] Step S6022: Acquire the second address of the client and the third address of the target service node.
[0074] Step S6023: Generate a session record corresponding to the public network based on the first address, the second address, and the third address.
[0075] In the embodiment of the present disclosure, the first address is the ip of the public network, that is, the above-mentioned EIP, that is, Figure 4 2.2.2.2:80 and 2.2.2.3:80. The second address is the client's IP address, that is, Figure 4 1.1.1.1:32333 in the address. The third address is the intranet IP of the virtual machine of the target service node, that is, Figure 4 172.168.1.1 in the.
[0076] Here, EIP transparent transmission can be used to transmit the access request message to the target service node. In transparent transmission mode, the LB can fill the virtual machine address of the target service node into the option field of the request message (a field used to carry additional information in network communication) and encapsulate the request message, thus transmitting the encapsulated request message to the target service node.
[0077] Specifically, after receiving the request message, the virtual switch VS of the target service node may parse the request message to create a session record according to the five-tuple of the request message, wherein the session record may include the first address, the second address and the third address.
[0078] by Figure 4 For example, session records can be created in the target service node for access request 1 and access request 2, respectively. The first, second, and third addresses corresponding to access request 1 are 2.2.2.2:80, 1.1.1.1:32333, and RS 172.168.1.1, respectively. The first, second, and third addresses corresponding to access request 2 are 2.2.2.3:80, 1.1.1.1:32333, and RS 172.168.1.1:80, respectively. Then, session record 1 generated for access request 1 can be expressed as 1.1.1.1:32333->2.2.2.2:80 RS 172.168.1.1:80, and session record 2 generated for access request 2 can be expressed as 1.1.1.1:32333->2.2.2.3:80 RS 172.168.1.1:80.
[0079] Step S603: When the response information of the target service node matches the session record, the response information is sent to the client. Figure 3 Step S303 of the illustrated embodiment will not be described in detail here.
[0080] In the embodiment of the present disclosure, the first address can be transparently transmitted to the virtual switch of the target service node, and based on the first address, the second address and the third address, a session record corresponding to the public network is generated, so that the reply message can be directly transparently transmitted to the target service node through the edge cloud network to generate a session record. In the scenario where the server needs to directly return the reply message, a technical basis is provided for resolving the quintuple conflict.
[0081] In some optional embodiments, the above Figure 3 The corresponding embodiment further includes:
[0082] Step S11: Obtain a first address collection, wherein the first address collection includes first addresses of various public networks accessible to the client.
[0083] Step S12: In the target service node, based on each first address in the first address set, a monitoring object is generated for the corresponding public network, wherein the monitoring object is used to monitor whether the response message hits the session record of the public network.
[0084] In the embodiment of the present disclosure, the monitoring object can monitor the EIP and monitoring port of the corresponding public network in real time, receive the request message transmitted by the LB, and monitor the source IP and source port number of the response information. Here, at least one monitoring object can be set in each edge node, and each monitoring object is used to monitor the response information corresponding to a target public network.
[0085] Here, when setting the monitoring object, a corresponding monitoring object can be set for each accessible public network in turn, and the monitoring object can be configured in the target service node. Specifically, the above step S12 generates a monitoring object for the corresponding public network based on each first address in the first address set in the target service node, including:
[0086] Step a1: Obtain a port identifier of a listening port on a public network corresponding to the first address.
[0087] Step a2: Generate a monitoring object for the public network based on the first address and port identifier.
[0088] In an embodiment of the present disclosure, a first address collection can be obtained, wherein the first address collection includes the first address EIP of each public network accessible to the client and the port identifier corresponding to the listening port, that is, the port number, so as to generate a listening object corresponding to the public network based on the EIP and the port number corresponding to the listening port.
[0089] Here Figure 4 For example, the monitoring object generated for the public network 1 may be monitoring object 1 "2.2.2.2:80", and the monitoring object generated for the public network 2 may be monitoring object 2 "2.2.2.3:80".
[0090] In an embodiment of the present disclosure, a corresponding monitoring object can be set for each accessible public network in the edge service node used for edge computing, so as to monitor whether the response message of the edge service node hits the session record of the corresponding public network to avoid quintuple conflicts.
[0091] In some optional implementations, the above step S303, determining whether the response information of the target service node matches the session record, includes:
[0092] Step S21: Acquire a response message of the response information based on the monitoring object corresponding to the target service node.
[0093] Step S22, based on the reply message, the target address is obtained, wherein the target address is used to indicate the first address of the public network accessed by the access request.
[0094] Step S23, when the target address hits the session record, the reply information of the target service node hits the session record.
[0095] In the embodiment of the present disclosure, the reply message corresponding to the request message can include the source IP and the source port number of the reply, the destination IP and the destination port number. Here, the target address can be the destination IP, i.e. the EIP corresponding to the access request.
[0096] Here, for example, if the target address obtained by the monitoring object analyzing the reply message is 2.2.2.2:80, it is determined that the reply information hits the above session record 1, and if the target address obtained by the monitoring object analyzing the reply message is 2.2.2.3:80, it is determined that the reply information hits the above session record 2. Figure 4
[0097] In the embodiment of the present disclosure, the monitoring object can analyze the reply message in the target service node, and when the target address of the reply message matches the first address in the session record, it is determined that the target address hits the session record, and it is determined that the reply message hits the session record, wherein the target address is the destination IP, i.e. the EIP corresponding to the access request, thereby realizing the forwarding of the reply message based on the EIP, and avoiding the five-tuple conflict of the reply message.
[0098] In some optional embodiments, the step S303 of sending the reply information to the client comprises:
[0099] The reply information is sent to the switch corresponding to the public network, and the reply information is returned to the client through the switch.
[0100] In the embodiment of the present disclosure, the switch corresponding to the public network, i.e. the TOR switch, if the reply information is forwarded to the client through the LB, it will cause high delay for some delay-sensitive business scenarios.
[0101] Therefore, as Figure 4 can be known, the present application can directly transmit the reply information from the RS of the target service node to the TOR switch, and transmit the reply information to the corresponding client through the TOR switch, thereby skipping the LB forwarding process, reducing the data transmission delay and improving the data throughput.
[0102] In some optional embodiments, the above Figure 3 The corresponding embodiments further comprise:
[0103] Step S31 : After determining the first address of the public network accessed by the access request, detecting the load status of each edge service node in the content distribution network.
[0104] Step S32: Determine a target service node whose load status satisfies the allocation condition among the edge service nodes.
[0105] In the embodiment of the present disclosure, Figure 4 The LB in the distributed access request for the public network is distributed to the virtual machine of the edge cloud service node according to a certain load balancing algorithm.
[0106] Here, LB can dynamically adjust traffic distribution based on the load status of each edge node virtual machine monitored in real time to ensure that the load of each virtual machine is relatively balanced, thereby improving the overall performance and reliability of the system.
[0107] Specifically, after receiving an access request, the LB can parse the request message to obtain the target IP address and destination port number, and then select a suitable edge service node virtual machine to process the access request based on the load status according to a preset load balancing algorithm. For example, polling, weighted polling, minimum number of connections, source address hashing, etc. This disclosure does not limit the specific load balancing algorithm; it shall prevail based on the implementation.
[0108] In the embodiment of the present disclosure, the LB can be used to distribute the access requests received for the public network, so as to distribute the public network traffic to the virtual machines of the edge cloud service nodes according to a certain load balancing algorithm, thereby ensuring that the load of each virtual machine is relatively balanced and improving the overall performance and reliability of the system.
[0109] In summary, in the embodiment of the present disclosure, the access request sent by the client can be detected first, and the first address of the public network accessed by the access request can be determined. Next, based on the first address, the session record can be determined, and the session record can be saved in the virtual switch of the target service node, wherein the target service node is an edge service node for processing access requests in the content distribution network. Then, when the response information of the target service node hits the session record, the response information can be sent to the client, so that the first address of the public network can be included in the session record, so that when responding to access requests to different public networks, the generation of quintuple conflicts leading to data transmission anomalies can be avoided, thereby improving the success rate of data transmission and thus improving the user experience.
[0110] In this embodiment, a data transmission device for edge computing is also provided, which is used to implement the above-mentioned embodiments and preferred implementation methods. The details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceivable.
[0111] This embodiment provides a data transmission device for edge computing, such as Figure 7 Shown, including:
[0112] A detection module 701 is configured to detect an access request sent by a client and determine a first address of a public network accessed by the access request;
[0113] A determination module 702 is configured to determine a session record based on the first address and save the session record to a target service node, wherein the target service node is an edge service node in a content delivery network for processing access requests;
[0114] The sending module 703 is configured to send the response information to the client when the response information of the target service node matches the session record.
[0115] In some optional implementations, the determining module 702 is further configured to:
[0116] Transparently transmitting the first address to the virtual switch of the target service node;
[0117] Obtain the second address of the client and the third address of the target service node;
[0118] A session record corresponding to the public network is generated based on the first address, the second address, and the third address.
[0119] In some optional embodiments, the device is further used to:
[0120] Obtaining a first address collection, wherein the first address collection includes first addresses of various public networks accessible to the client;
[0121] In the target service node, based on each first address in the first address set, a monitoring object is generated for the corresponding public network, wherein the monitoring object is used to monitor whether the response message hits the session record of the public network.
[0122] In some optional embodiments, the device is further used to:
[0123] Obtaining a port identifier of a listening port on a public network corresponding to the first address;
[0124] The first address and the port identifier are used to generate a monitoring object for the public network.
[0125] In some optional embodiments, the sending module 703 is further configured to:
[0126] obtain a response packet of the response information based on the monitoring object corresponding to the target service node;
[0127] analyze the response packet to obtain a target address, wherein the target address is used to indicate the first address of the public network accessed by the access request;
[0128] when the target address hits the session record, determine that the response information of the target service node hits the session record.
[0129] In some optional embodiments, the detecting module 701 is further configured to:
[0130] obtain a request packet corresponding to the access request;
[0131] analyze the request packet to obtain a destination address corresponding to the access request, and obtain the first address.
[0132] In some optional embodiments, the sending module 703 is further configured to:
[0133] send the response information to a switch corresponding to the public network, and return the response information to the client through the switch.
[0134] Further function descriptions of the above-mentioned various modules and units are the same as those of the above-mentioned corresponding embodiments, and will not be repeated here.
[0135] The data transmission apparatus for edge computing in the embodiment is presented in the form of a functional unit. The unit herein refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory executing one or more software or fixed programs, and / or other devices that can provide the above functions.
[0136] The embodiment of the present disclosure further provides a computer device having the above-mentioned Figure 7 data transmission apparatus for edge computing.
[0137] Please refer to Figure 8 , Figure 8 is a structural schematic diagram of a computer device provided by an optional embodiment of the present disclosure, as Figure 8As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0138] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0139] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.
[0140] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0141] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0142] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0143] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0144] A portion of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes but is not limited to a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0145] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A data transmission method for edge computing, characterized in that: The method comprises: Detecting an access request sent by a client, and determining a first address of a public network accessed by the access request, wherein the first address corresponds to a plurality of edge service nodes in a content delivery network; Determine a session record based on the first address, and save the session record to a target service node, wherein the target service node is an edge service node among the multiple edge service nodes for processing the access request; When the response information of the target service node matches the session record, determining the access request corresponding to the response information, and sending the response information to the client to establish a connection with the client; wherein the response information includes a source address; The method further comprises: Obtaining a first address collection, wherein the first address collection includes first addresses of various public networks accessible to the client; generating, in the target service node, a monitoring object for the corresponding public network based on each first address in the first address set, wherein the monitoring object is used to monitor the first address of the corresponding public network in real time, receive an access request from the corresponding public network, and monitor whether a response message from the corresponding public network matches a session record of the corresponding public network; Determining that the response information of the target service node hits the session record includes: Obtaining a response message of the response information based on the monitoring object corresponding to the target service node; Parsing the response message to obtain the source address; In a case where the source address hits the first address in the session record, it is determined that the response information hits the session record.
2. The method according to claim 1, characterized in that The determining of the session record based on the first address includes: Transparently transmitting the first address to the virtual switch of the target service node; Obtaining a second address of the client and a third address of the target service node; A session record corresponding to the public network is generated based on the first address, the second address, and the third address.
3. The method according to claim 1, characterized in that Generating, in the target service node, a monitoring object for a corresponding public network based on each first address in the first address set, including: Obtaining a port identifier of a listening port on a public network corresponding to the first address; A monitoring object is generated for the public network based on the first address and the port identifier.
4. The method according to claim 1, wherein The determining the first address of the public network accessed by the access request includes: Obtaining a request message corresponding to the access request; The destination address corresponding to the access request is parsed based on the request message to obtain the first address.
5. The method according to claim 1, wherein The sending of the response information to the client includes: The response information is sent to a switch corresponding to the public network, and the response information is returned to the client through the switch.
6. A data transmission device for edge computing, characterized in that: The device comprises: a detection module, configured to detect an access request sent by a client and determine a first address of a public network accessed by the access request, wherein the first address corresponds to a plurality of edge service nodes in a content delivery network; a determination module, configured to determine a session record based on the first address, and save the session record to a target service node, wherein the target service node is an edge service node among the multiple edge service nodes for processing the access request; a sending module, configured to, when the response information of the target service node matches the session record, determine the access request corresponding to the response information, and send the response information to the client to establish a connection with the client; wherein the response information includes a source address; The device is also used for: Obtaining a first address collection, wherein the first address collection includes first addresses of various public networks accessible to the client; generating, in the target service node, a monitoring object for the corresponding public network based on each first address in the first address set, wherein the monitoring object is used to monitor the first address of the corresponding public network in real time, receive an access request from the corresponding public network, and monitor whether a response message from the corresponding public network matches a session record of the corresponding public network; The sending module is further used for: Obtaining a response message of the response information based on the monitoring object corresponding to the target service node; Parsing the response message to obtain the source address; In a case where the source address hits the first address in the session record, it is determined that the response information hits the session record.
7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data transmission method for edge computing according to any one of claims 1 to 5 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the data transmission method for edge computing according to any one of claims 1 to 5.
9. A computer program product, characterized in that It includes computer instructions, which are used to enable a computer to execute the data transmission method for edge computing according to any one of claims 1 to 5.
Citation Information
Patent Citations
Content distribution implementation method and system
CN101984637A
Data transmission method and network address translation device
CN107528932A