Communication link processing method and device, electronic equipment and storage medium

By obtaining routing information and detection results, the communication link is automatically switched, and the problem of modifying service codes in the prior art is solved, and efficient network acceleration services and communication link adaptability is achieved.

CN119906664APending Publication Date: 2025-04-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311418195.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The prior art requires modifying the service code when selecting a communication link, which affects the access efficiency and user experience of the acceleration link, and lacks an automatic switching mechanism when the acceleration communication link fails, affecting communication availability.

Method used

By obtaining routing information, querying the area of ​​the proxy server, and automatically switching the communication link based on the detection results, thereby improving the access efficiency of the network acceleration service and the adaptability of the communication link.

Benefits of technology

The most suitable communication link can be automatically selected without modifying the service code, which improves the quality of network acceleration services and user experience, and enhances the adaptability and availability of communication links.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906664A_ABST
    Figure CN119906664A_ABST
Patent Text Reader

Abstract

The invention provides a communication link processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring routing information; a region to which the first proxy server belongs and a region to which the second proxy server belongs are queried from the routing information, and the first proxy server and the second proxy server communicate with each other by using a first link; in response to the fact that the first proxy server and the second proxy server belong to different areas, querying the address of the second proxy server from the routing information, and performing detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link; wherein different proxy servers are deployed in different areas; and switching the communication link between the first proxy server and the second proxy server from the first link to the second link in response to the condition that the first detection result meets the link switching condition. According to the invention, the communication link can be efficiently selected to ensure the quality of the network acceleration service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer network technology, and in particular to a method, device, electronic device and storage medium for processing a communication link. Background Art

[0002] In related technologies, network applications that run globally generally divide the world into multiple regions according to geographical areas such as continents. Users actively choose or are passively assigned to a regional server to log in to the application based on their geographical location. The application service content cannot communicate across regional servers, that is, the various service areas around the world are isolated from each other.

[0003] Due to the limited carrying capacity of the business server, not all information can be transmitted through the business server. Therefore, related technologies use accelerated networks to improve network transmission quality. However, ordinary network acceleration service providers only provide access addresses. When using the system, the business code logic needs to be modified to determine which messages need to be accelerated and which messages do not need to be accelerated based on the location of the destination or other strategies, which affects the access efficiency of the acceleration link and affects the user experience. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device, computer program product, and computer-readable storage medium for processing a communication link, which can efficiently select a communication link to ensure the quality of a network acceleration service.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application provides a method for processing a communication link, the method comprising:

[0007] Get routing information;

[0008] querying the region to which the first proxy server belongs and the region to which the second proxy server belongs from the routing information, wherein the first proxy server and the second proxy server communicate with each other using a first link;

[0009] In response to the first proxy server and the second proxy server belonging to different areas, querying the address of the second proxy server from the routing information, and

[0010] Performing a detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link; wherein different proxy servers are deployed in different areas, and one of the first communication link and the second communication link is an accelerated communication link;

[0011] In response to the first detection result meeting a link switching condition, the communication link between the first proxy server and the second proxy server is switched from the first link to the second link.

[0012] The present application provides a processing device for a network acceleration service, the device comprising:

[0013] An acquisition module is used to obtain routing information;

[0014] A query module, used for querying the area to which the first proxy server belongs and the area to which the second proxy server belongs from the routing information, wherein the first proxy server and the second proxy server communicate with each other using a first link;

[0015] a detection module, configured to query the address of the second proxy server from the routing information in response to the first proxy server and the second proxy server belonging to different areas, and perform a detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link; wherein different proxy servers are deployed in different areas, and one of the first communication link and the second communication link is an accelerated communication link;

[0016] The switching module is configured to switch the communication link between the first proxy server and the second proxy server from the first link to the second link in response to the first detection result meeting the link switching condition.

[0017] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0018] A memory for storing computer executable instructions;

[0019] The processor is used to implement the communication link processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0020] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing a communication link processing method provided in an embodiment of the present application when executed by a processor.

[0021] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the communication link processing method provided by the embodiment of the present application is implemented.

[0022] The embodiments of the present application have the following beneficial effects:

[0023] The embodiment of the present application queries whether different proxy servers are in different areas through routing information, which serves as a reference for whether acceleration services need to be used between different proxy servers. When it is confirmed that acceleration services need to be used, the switching of communication links is triggered by whether the detection results of the communication links between different proxy servers meet the conditions for switching links. Compared with the prior art, this saves the work of modifying business codes in business servers, improves the access efficiency of network acceleration services, automatically identifies the most suitable communication link in the current state, enhances the adaptive switching of communication links between different proxy servers, and ensures the communication speed between different proxy servers. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a schematic diagram of the architecture of a communication link processing system 100 provided in an embodiment of the present application;

[0025] Figure 2 is a schematic diagram of the structure of the first proxy server 300 provided in an embodiment of the present application;

[0026] Figure 3A It is a first flow chart of a method for processing a communication link provided in an embodiment of the present application;

[0027] Figure 3B It is a second flow chart of the method for processing a communication link provided in an embodiment of the present application;

[0028] Figure 3C is a third flow chart of the method for processing a communication link provided in an embodiment of the present application;

[0029] Figure 3D is a fourth flow chart of the method for processing a communication link provided in an embodiment of the present application;

[0030] Figure 3E is a fifth flow chart of the method for processing a communication link provided in an embodiment of the present application;

[0031] Figure 3F is a sixth flow chart of the method for processing a communication link provided in an embodiment of the present application;

[0032] Figure 4A It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application;

[0033] Figure 4B It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application;

[0034] Figure 4C It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application;

[0035] Figure 4D It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application;

[0036] Figure 4E It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application;

[0037] Figure 4F It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application;

[0038] Figure 4G It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0040] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0041] If similar descriptions of "first / second" appear in the application documents, the following description is added. In the following description, the terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0042] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0043] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0044] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0045] 1) Routing information, information about the proxy server and the acceleration cluster corresponding to the proxy server, including the address and region of the proxy server, and the address and region of the acceleration cluster.

[0046] 2) Proxy server: a relay server that acts as a message proxy for business servers. When messages are transmitted between different business servers, they need to be relayed through the proxy server. At the same time, communication between business servers in the same area also needs to establish a communication link through the proxy server.

[0047] 3) Business server, a server that provides specific services with the help of the network, for example, a game server, which is a local or remote server used by game clients to play multiplayer games. Most games played over the network are run by connecting to a game server.

[0048] 4) Communication link is a communication channel that connects two or more devices for data transmission. When in different types of network connections, the communication link will change accordingly. Communication links include direct communication links and accelerated communication links.

[0049] 5) Direct communication link: a link based on Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) established between proxy servers through the public network.

[0050] 6) Accelerated communication link, a link carried by a dedicated acceleration network, for example, a link carried by an acceleration network between two proxy servers in different regions. Different clusters of acceleration networks are deployed in different regions. The clusters include multiple nodes. The links between nodes in different regions can provide a faster transmission rate between proxy servers than direct communication links. When two proxy servers communicate across regions, the communication distance is too long. When using a direct communication link for transmission, the transmission efficiency is slow, so accelerated communication links are preferred for cross-region transmission.

[0051] In the existing network acceleration service technology, the network acceleration service provider only provides the access address, and the service server needs to modify the service code logic when using it, and determine which messages need to be accelerated and which messages do not need to be accelerated according to the location of the destination or other strategies. At the same time, when the acceleration communication link fails, there is no mechanism to ensure the availability of communication.

[0052] Based on the above analysis, the applicant found that the prior art requires modification of the service code when selecting a connection link, which increases communication costs and reduces communication efficiency.

[0053] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for processing a communication link, which can efficiently select a communication link to ensure the quality of a network acceleration service.

[0054] The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The electronic device provided by the embodiment of the present application can be implemented as various types of user terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), a smart phone, a smart speaker, a smart watch, a smart TV, and a vehicle-mounted terminal, and can also be implemented as a server. The following describes an exemplary application when the electronic device is implemented as a server.

[0055] See also Figure 1 , Figure 1 1 is a schematic diagram of the architecture of a communication link processing system 100 provided in an embodiment of the present application, for implementing a processing application supporting a network acceleration service. For example, Figure 1 The first business server 700, the second business server 200, the first proxy server 300, the second proxy server 400, the network 500 and the configuration server 600 are involved. The first proxy server 300 and the second proxy server 400 are connected to the configuration server 600 via the network 500. The network 500 can be a wide area network or a local area network, or a combination of the two.

[0056] The first service server 700 performs message proxying through the first proxy server 300, and the second service server 200 performs message proxying through the second proxy server 400. The first proxy server 300 and the second proxy server 400 are connected via a communication link. In different situations, the first link or the second link is selected for communication connection.

[0057] In some embodiments, the first business server 700, the second business server 200, the first proxy server 300, the second proxy server 400 and the configuration server 600 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0058] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the first proxy server 300 provided in an embodiment of the present application, Figure 2 The first proxy server 300 shown includes: at least one processor 310, a memory 340 and at least one network interface 320. The various components in the first proxy server 300 are coupled together via a bus system 330. It is understood that the bus system 330 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 330 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 330 is not described in detail. Figure 2 Various buses are labeled as bus system 330 .

[0059] The processor 310 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0060] The memory 340 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 340 may optionally include one or more storage devices that are physically remote from the processor 310.

[0061] The memory 340 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 340 described in the embodiment of the present application is intended to include any suitable type of memory.

[0062] In some embodiments, memory 340 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0063] Operating system 341, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0064] A network communication module 342, used to reach other electronic devices via one or more (wired or wireless) network interfaces 320, exemplary network interfaces 320 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;

[0065] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The processing device 343 of the network acceleration service stored in the memory 340 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an acquisition module 3431, a query module 3432, a detection module 3433 and a switching module 3434. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0066] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the communication link processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other electronic components.

[0067] The method for processing the communication link provided in the embodiment of the present application will be described in combination with the exemplary application and implementation of the first proxy server provided in the embodiment of the present application.

[0068] See also Figure 3A , Figure 3A is a first flow chart of the method for processing a communication link provided in an embodiment of the present application, taking the above-mentioned first proxy server as an example of the execution subject, combined with Figure 3A The steps shown are used for illustration only. It can be understood that the method described below is also applicable to other proxy servers, such as the second proxy server mentioned above.

[0069] In step 101, routing information is obtained.

[0070] In some embodiments, the routing information is obtained from the configuration server. The routing information includes addresses and regions of multiple proxy servers, the multiple proxy servers include a first proxy server and a second proxy server, and the address and region of each proxy server are synchronized from the proxy server to the configuration server.

[0071] For example, the configuration server can be called a configuration center, which is used to store the routing information of the proxy server. Synchronization can be performed in many ways, such as periodic synchronization or synchronization when information is updated.

[0072] In some embodiments, reference Figure 3B , Figure 3B It is a second flow chart of the communication link processing method provided in an embodiment of the present application. Figure 3A Step 101 can be Figure 3B The step 1011 is implemented as described in detail below.

[0073] In step 1011, the latest version of routing information is periodically obtained from the configuration server.

[0074] Continue to see Figure 3A In step 102, the area to which the first proxy server belongs and the area to which the second proxy server belongs are queried from the routing information, wherein the first proxy server and the second proxy server communicate using a first link.

[0075] In some embodiments, the first proxy server is used to perform message proxy for the first service server, and the second proxy server is used to perform message proxy for the second service server.

[0076] As an example, the first communication link may be a default communication link between the first proxy server and the second proxy server, that is, a communication link that is preferred when establishing communication.

[0077] In step 103, in response to the first proxy server and the second proxy server belonging to different areas, the address of the second proxy server is queried from the routing information, and a detection operation is performed on the second link based on the address of the second proxy server to obtain a first detection result of the second link; wherein different proxy servers are deployed in different areas, and one of the first communication link and the second communication link is an accelerated communication link.

[0078] In some embodiments, the second link is also a communication link between the first proxy server and the second proxy server, and one of the first link and the second link is an accelerated communication link.

[0079] In some embodiments, at least one proxy server is deployed in each area, and proxy servers in different areas need to be connected through the first link or the second link.

[0080] In some embodiments, the acceleration communication link includes the following three communication links: an intranet communication link between the first proxy server and the nodes of the acceleration cluster in the area where the first proxy server is located (i.e., a fast User Datagram Protocol (UDP) network connection (Quick UDP Internet Connections, QUIC) communication link between the nodes of the acceleration cluster in the area where the first proxy server is located and the nodes of the acceleration cluster in the area where the second proxy server is located, and an intranet communication link between the second proxy server and the nodes of the acceleration cluster in the area where the second proxy server is located; the acceleration communication link has a binding relationship with the three communication links, and the binding relationship is used to trigger the disconnection of other communication links that have a binding relationship with the acceleration communication link when any of the three communication links is disconnected. Among them, the first proxy server and the acceleration cluster in the area are in the same intranet, and the second proxy server and the acceleration cluster in the area are also in the same intranet.

[0081] In some embodiments, reference Figure 3C , Figure 3C This is a third flow chart of the communication link processing method provided in an embodiment of the present application. Figure 3A Step 103 of "performing a detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link" can be performed by Figure 3C Steps 1031 to 1032 are implemented as described in detail below.

[0082] In step 1031, based on the address of the second proxy server, a detection packet is periodically sent to the second proxy server through the second link.

[0083] In some embodiments, the source address of the sent detection packet is the address of the first proxy server, and the destination address is the address of the second proxy server.

[0084] In some embodiments, as an alternative to periodically sending detection packets, detection packets may be sent to the second proxy server only when detection conditions are met, and the detection conditions may include at least one of the following: the idle time of the first link reaches an idle time threshold, and the establishment time of the first link reaches an establishment time threshold.

[0085] In step 1032, a detection parameter of the detection packet is obtained to generate a first detection result of the second link.

[0086] In some embodiments, the detection parameter of the detection packet includes at least one of a packet loss rate and a round-trip transmission delay of a response packet of the detection packet.

[0087] The response packet loss rate refers to the ratio of the number of response packets received by the first proxy server to the number of response packets sent by the second proxy server after the first proxy server sends a detection packet to the second proxy server, and the second proxy server receives the detection packet and sends multiple response packets to the first proxy server.

[0088] The round-trip transmission delay refers to the transmission delay generated after the first proxy server sends a detection packet to the second proxy server, the second proxy server receives the detection packet and sends a response packet to the first proxy server, and the first proxy server receives the response packet.

[0089] Continue to see Figure 3A In step 104, in response to the first detection result meeting the link switching condition, the communication link between the first proxy server and the second proxy server is switched from the first link to the second link.

[0090] In some embodiments, the link switching condition may include that a response packet to the detection packet is received in at least one detection within the detection window time, and the detection parameter is less than or equal to the detection parameter threshold.

[0091] For example, the detection parameter may be at least one of a packet loss rate and a round-trip transmission delay, and accordingly, the detection parameter threshold may be at least one of a packet loss rate threshold and a round-trip transmission delay threshold. For example, the packet loss rate threshold may be 0 or a value between 0 and 1. If it is 0, the detection parameter is equal to the packet loss rate threshold; if it is between 0 and 1, the detection parameter is less than or equal to the packet loss rate threshold. For another example, the round-trip transmission delay threshold may be a value greater than 0, and the detection parameter is less than or equal to the round-trip transmission delay threshold.

[0092] In some embodiments, when the detection parameter does not meet the link switching condition, the first link between the first proxy server and the second proxy server is maintained. At this time, the first link continues to be used as the communication link between the first proxy server and the second proxy server.

[0093] For example, according to the detection parameter thresholds set above, such as the packet loss rate threshold and the round-trip transmission delay threshold, when the detection parameter is greater than the detection parameter threshold, the first link continues to be used.

[0094] In some embodiments, after step 104, reference Figure 3D , Figure 3D is a fourth flow chart of the method for processing a communication link provided in an embodiment of the present application, which will be combined with Figure 3D Steps 105 to 106 are shown for explanation.

[0095] Continue to see Figure 3A , in step 105, the number of abnormal times of the second link is detected.

[0096] In some embodiments, reference Figure 3E , Figure 3E This is a fifth flow chart of the communication link processing method provided in an embodiment of the present application. Figure 3D Step 105 can be Figure 3E Steps 1051 to 1052 are implemented as described in detail below.

[0097] In step 1051, when the second link is disconnected and not restored after a preset waiting time, the number of abnormal times of the second link is increased by 1.

[0098] In some embodiments, the abnormal condition includes that the second link is disconnected and is not restored within a preset waiting time.

[0099] For example, the number of exceptions can be set to 0 when the second link is just connected, and the preset waiting time is set to 5 seconds. When the second link is disconnected and is still disconnected after 5 seconds, the number of exceptions of the second link is 1. Then continue to detect. When the second link is disconnected and is still disconnected after another 5 seconds, the number of exceptions of the second link is 2, and so on.

[0100] In step 1052, when the second link is disconnected once and restored after a preset waiting time, the current number of abnormalities of the second link is kept unchanged.

[0101] For example, the number of exceptions when the second link is just connected can be set to 0, the preset waiting time can be set to 5 seconds, and when the second link is disconnected but restored after 5 seconds, the number of exceptions of the second link is still 0.

[0102] Continue to see Figure 3A In step 106, in response to the number of abnormalities being greater than the abnormality threshold, the communication link between the first proxy server and the second proxy server is switched from the second link back to the first link.

[0103] For example, the abnormal number threshold may be set to 6. When the second link is counted by the above abnormal number counting method, when the abnormal number reaches 6 times, the second link is switched back to the first link.

[0104] In the embodiment of the present application, by setting an abnormal number threshold to detect the number of abnormalities of the second link, a failover can be performed when a failure occurs in the second link, and the link can be switched back to the first link to ensure basic communication.

[0105] In some embodiments, reference Figure 3F , Figure 3F is a sixth flow chart of the method for processing a communication link provided in an embodiment of the present application. After step 106, steps 107 to 108 may be performed. Figure 3FSteps 107 to 108 are shown for explanation.

[0106] In step 107, a detection operation is performed on the second link to obtain a second detection result of the second link.

[0107] In some embodiments, when performing a detection operation, the detection parameters and detection parameter thresholds in the above embodiments may be set.

[0108] In the embodiment of the present application, by detecting the link and setting the link switching conditions, the communication link can be automatically switched according to the detection results and whether the link switching conditions are met to ensure the availability of communication.

[0109] In step 108, in response to the second detection result meeting the link switching condition, the communication link between the first proxy server and the second proxy server is switched from the first link back to the second link.

[0110] In some embodiments, the link switching condition set above may be referred to so as to switch from the first link back to the second link.

[0111] In some embodiments, when the first proxy server and the second proxy server are connected through a dedicated network, the first link is a direct communication link, and the second link is an accelerated communication link.

[0112] For example, there may be multiple acceleration communication links between the first proxy server and the second proxy server. Assuming that the first acceleration cluster is connected to the first proxy server and the second acceleration cluster is connected to the second proxy server, the acceleration communication link may be a link between any node of the first acceleration cluster (referred to as the first node) and any node of the second acceleration cluster (referred to as the second node). For example: select the first node with the smallest load in the first acceleration cluster and the second node with the smallest load in the second acceleration cluster, and use the link between the two nodes as the acceleration communication link.

[0113] As an example, the above-mentioned load may be the amount of data transmitted per unit time. Taking the first node as an example, the load of the first node may be the amount of data sent or received by the first node per unit time, or the sum of the two.

[0114] As an example, the above load may be the usage rate of hardware such as a processor and a memory. Taking the first node as an example, the load of the first node may be the average usage rate of the processor of the first node per unit time.

[0115] In some embodiments, when the first proxy server and the second proxy server are connected through a public network, the first link is an accelerated communication link, and the second link is a direct communication link.

[0116] For example, the selection method of the accelerated communication link is the same as that described above when the first proxy server and the second proxy server are connected via a dedicated network.

[0117] The present application determines the current network connection and uses the accelerated communication link and the direct communication link as backup links for each other. Under different network connection conditions, the communication link with higher communication efficiency can be automatically selected.

[0118] In the embodiment of the present application, the business server selects the communication link through the proxy server and the acceleration cluster connected to the proxy server. There is no need to modify the business code, and many development tasks such as complex connection management and routing management are abandoned. Only the proxy server needs to be deployed to access the accelerated communication link and realize automatic acceleration of cross-regional messages.

[0119] The following is an explanation of an exemplary application of an embodiment of the present application in an actual game application scenario.

[0120] In the cross-region scenario of business servers, the process communication of business servers across machines uses a proxy server for message forwarding. Taking tbusd as an example, tbusd is a proxy server for tbus communication, responsible for communication forwarding. In the domestic environment, the communication between tbusd is in the same computer room or short-distance TCP link communication (direct communication link). Among them, tbus is one of the basic components in the game service framework. Its main purpose is to provide a unified thread or inter-process communication interface for upper-level businesses, shielding the details of local inter-process communication and remote process communication, so that developers can focus on business logic. With the trend of cross-region games, more and more games use the global same-server architecture. At this time, the server-side tbusd has a cross-region communication scenario.

[0121] refer to Figure 4A , Figure 4A It is a schematic diagram of an application scenario of the method for processing a communication link provided in an embodiment of the present application. The battle servers within country 1 and country 2 communicate with each other using intranet TCP (direct communication link), while the lobby server of country 3 communicates with each other using public network TCP (accelerated communication link).

[0122] exist Figure 4A In the game, there is long-distance cross-region transmission between the lobby server and the battle server (both are business servers in the game scene). Usually, the solution to long-distance transmission is to use accelerated network to improve network transmission quality. How to perform network acceleration has the following problems:

[0123] Question 1: How does the business server automatically determine whether a message needs to be accelerated?

[0124] Question 2: The acceleration communication link may fail. How to perform network failure rollback to ensure basic communication?

[0125] Question 3: How to select the communication link when connecting through a dedicated network?

[0126] In some embodiments, reference Figure 4B , Figure 4B It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application. Figure 4B It shows the communication architecture when business servers communicate across regions.

[0127] All functions related to communication link processing are integrated in tbusd (proxy server), including: routing management: determining the target address to which messages are forwarded, determining which messages need to be accelerated, and selecting nodes in the acceleration cluster for connection; connection management: managing the establishment and release of connections between nodes; load balancing: sensing the load of nodes in the acceleration cluster and selecting the best node for access; fault recovery: when the acceleration communication link fails, fall back to the direct communication link. Therefore, for the business server of the game, no business code modification is required, and it can be connected to the acceleration communication link without intrusion.

[0128] exist Figure 4B In the process, an acceleration cluster is built in each region (i.e., regions divided by different regions), which can be deployed in the same computer room as tbusd (i.e., in the same intranet). Because the stability of the dedicated network is higher than that of the public network when communicating in the intranet of the same region, the use of TCP link communication is more efficient. Therefore, tbusd and the acceleration cluster use TCP link (also called intranet communication link) for communication. When communicating across regions, the communication distance is too long, so the use of the public network for data transmission is more efficient. Therefore, the acceleration clusters use the Quick UDP Internet Connection (QUIC) protocol link for communication.

[0129] The configuration center harbor (configuration server) stores the IP address of each tbusd and the region information corresponding to tbusd. The region information is the acceleration cluster where the cross-region game service is located, such as regions in different countries and the access address of each regional acceleration cluster. tbusd and the nodes in the acceleration cluster will regularly report and pull this information to harbor.

[0130] exist Figure 4BIn the example, taking the first proxy server as tbusdA2 and the second proxy server as tbusdB1, there is a virtual connection (i.e., the acceleration communication link) between tbusdA2 and tbusdB1. This virtual connection includes three actual communication links: the TCP-based intranet communication link between tbusdA2 and the nodes in acceleration cluster A, the QUIC communication link between the nodes in acceleration cluster A and the nodes in acceleration cluster B, and the TCP-based intranet communication link between the nodes in acceleration cluster B and tbusdB1. The virtual connection and the corresponding three actual communication links are bound one by one, and connection multiplexing is not performed. In other words, if any link in the virtual connection is abnormally disconnected, it will cause the other links bound to the virtual connection to be disconnected.

[0131] exist Figure 4B In FIG. 1 , the dotted line between tbusdA2 and tbusdB1 represents a direct communication link. When a network failure occurs in the virtual connection, the virtual connection can be switched to a direct communication link.

[0132] In some embodiments, reference Figure 4F , Figure 4F Schematic diagram of an application scenario of the method for processing a communication link provided in an embodiment of the present application. Figure 4F The example of displayed routing information is used for illustration.

[0133] For example, the correspondence between tbusd's IP address and the region is shown in Table 1:

[0134] Region Tbusd IP Region A 10.1.1.1 Region A 10.1.1.2 Region B 11.1.1.1 Region B 11.1.1.2

[0135] Table 1

[0136] Among them, region A has two business servers and corresponding proxy servers, and the addresses of the two proxy servers are 10.1.1.1 and 10.1.1.2 respectively; region B has two business servers and corresponding proxy servers, and the addresses of the two proxy servers are 11.1.1.1 and 11.1.1.2 respectively.

[0137] The corresponding relationship between the IP address of the central node of the acceleration cluster and the region is shown in Table 2:

[0138] Region Acceleration node IP Region A 10.1.2.1 Region A 10.1.2.2 Region A 10.1.2.3 Region B 11.1.2.1 Region B 11.1.2.2 Region B 11.1.2.3

[0139] Table 2

[0140] The two proxy servers in region A communicate through acceleration cluster A, which contains three acceleration nodes; the two proxy servers in region B communicate through acceleration cluster B, which contains three acceleration nodes. An acceleration communication link is established between the node with the least load in acceleration cluster A and the node with the least load in acceleration cluster B, thereby completing network acceleration.

[0141] In some embodiments, reference Figure 4C , Figure 4C It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application. Figure 4C The specific communication process of the business server when communicating across zones is demonstrated, solving the above-mentioned problem one.

[0142] exist Figure 4C In the example, gamesvr is the business server and harbor is the configuration server, which stores the IP address and region information of tbusd, as well as the IP address and region information of the nodes in the acceleration cluster. Each tbusd pulls the global routing information from harbor, corresponding to each peer tbusd address and the region where the tbusd is located. If the tbusd with IP address 10.1.1.1 needs to communicate with the tbusd with IP address 10.1.1.2, by querying the routing information, it can be known that the two tbusds belong to the same region, so the message is directly forwarded through the original intranet TCP (direct communication link), where the prerequisite for communication is: tbusd stores a configuration of the communication relationship internally, which is a list of IP addresses of the destination tbusds that need to communicate, and is loaded when tbusd is started.

[0143] If the tbusd of 10.1.1.1 needs to communicate with the tbusd of 11.1.1.1, the two tbusd belong to different regions. Therefore, the tbusd of 10.1.1.1 determines that the message needs to pass through the acceleration network and forwards the message to acceleration cluster A. Acceleration cluster A forwards the message to acceleration cluster B in the target region through the cross-region acceleration network. The target acceleration cluster B then forwards the message to the tbusd of region B, thereby completing the accelerated forwarding of the message.

[0144] In some embodiments, reference Figure 4D , Figure 4D It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application. Figure 4D The link detection process is demonstrated, solving the above-mentioned problem 2.

[0145] exist Figure 4DIn the process, tbusd first establishes direct TCP communication (direct communication link) with the target tbusd when it starts, and then tbusd periodically initiates acceleration detection. The target tbusd replies after receiving the detection packet. The detection packet can communicate normally between the acceleration clusters, proving that the acceleration communication link is available. After a period of continuous successful detection, tbusd switches from TCP direct connection (direct communication link) to the acceleration communication link. At this time, the acceleration connection has been established, and seamless switching can be achieved.

[0146] When tbusd is in the accelerated communication state, it counts the number of accelerated connection exceptions. If it reaches the set threshold, it is considered that the accelerated channel is unstable. At this time, tbusd will fall back to TCP direct connection (direct communication link). After falling back to TCP direct connection, tbusd still continues to perform accelerated detection and switches back to the accelerated communication link after the accelerated communication is restored.

[0147] In a special case, such as when the acceleration communication link is disconnected and then quickly reconnected successfully, the number of acceleration connection exceptions will be reset to 0. If the network jitters frequently at this time, the acceleration link is frequently disconnected and reconnected, which will also have a significant impact on communication. To avoid this situation, tbusd has introduced an additional link quality evaluation mechanism, which sets a time window N. If the acceleration link is disconnected M times cumulatively within the time window, tbusd believes that the current acceleration communication link is jittering, and will fall back to TCP direct communication (direct communication link).

[0148] In some embodiments, reference Figure 4E , Figure 4E It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application. Figure 4E It shows how to select the appropriate communication link when connecting to different types of networks, solving the above problem three.

[0149] exist Figure 4E In the deployment environment, some network links may be connected through dedicated networks. Usually, the stability of dedicated networks is better than that of public networks. tbusd cannot distinguish between accessing dedicated networks and accessing public networks. If it detects directly and switches from direct communication links to accelerated communication links, the actual effect is the opposite. Therefore, tbusd introduces a connection priority mechanism based on connection backup: Accelerated communication link priority: In areas without dedicated networks, accelerated communication links are used as the main link, and direct communication links are used as backup links; Direct communication link priority: In areas with dedicated networks, direct communication links are used as the main link, and accelerated communication links are used as backup links. The dual links back up each other and fall back when a failure occurs. The fallback and recovery mechanisms are the same as those mentioned above. Figure 4D The method of display is the same.

[0150] In some embodiments, reference Figure 4G , Figure 4G It is a schematic diagram of an application scenario of the communication link processing method provided in an embodiment of the present application. Figure 4G The process of sequence number synchronization at the tbusd application layer is shown.

[0151] exist Figure 4G In , tbusd will cache the business server's messages in the local memory, including a send buffer and a receive buffer. Each message has a local sequence number, similar to the TCP buffer.

[0152] After the connection is disconnected, tbusd immediately initiates a reconnection. After the new connection is established, the two tbusds will conduct an application layer handshake negotiation and synchronize the last confirmed send sequence number to ensure that each message is consumed. Figure 4G As shown in the figure, suppose the next message to be sent in the send buffer of tbusdA is X, and the last message received in the receive buffer is M. The next message to be sent in the send buffer of tbusdB is Y, and the last message received in the receive buffer is N. The two tbusds will interact three times to synchronize the buffer sequence numbers of each other. After synchronization, the next message sequence number actually sent by tbusdA is min(N+1, X), ensuring that the message will not be lost.

[0153] Through one-to-one binding of virtual connection and actual connection and three-way handshake negotiation at the application layer, tbusd can achieve the same reliability guarantee as TCP direct connection in complex network environments.

[0154] The embodiment of the present application can automatically identify whether different business servers need to use acceleration services by configuring the routing information stored in the server. When selecting a communication link, the business server does not need to modify the business code, abandoning many complex development tasks such as connection management and routing management, improving processing efficiency, and automatically identifying the most suitable communication link in the current state through the number of exceptions and link switching conditions, enhancing the adaptability and communication speed of the communication link. At the same time, based on the connection binding and application layer sequence number synchronization, the reliability of the message can be guaranteed in network abnormalities such as server restart or communication link switching.

[0155] The following further describes the exemplary structure of the network acceleration service processing device 343 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the processing device 343 of the network acceleration service in the memory 340 may include:

[0156] The acquisition module 3431 is used to acquire routing information.

[0157] The query module 3432 is used to query the area to which the first proxy server belongs and the area to which the second proxy server belongs from the routing information, wherein the first proxy server and the second proxy server communicate with each other using a first link.

[0158] The detection module 3433, in response to the first proxy server and the second proxy server belonging to different areas, queries the address of the second proxy server from the routing information, and performs a detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link; wherein different proxy servers are deployed in different areas, and one of the first communication link and the second communication link is an accelerated communication link.

[0159] In some embodiments, the acceleration communication link includes the following three communication links: an intranet communication link between the first proxy server and the nodes of the acceleration cluster in the area where the first proxy server is located, a QUIC communication link between the nodes of the acceleration cluster in the area where the first proxy server is located and the nodes of the acceleration cluster in the area where the second proxy server is located, and an intranet communication link between the second proxy server and the nodes of the acceleration cluster in the area where the second proxy server is located; the acceleration communication link has a binding relationship with the three communication links, and the binding relationship is used to trigger the disconnection of other communication links that have a binding relationship with the acceleration communication link when any of the three communication links is disconnected.

[0160] The switching module 3434 switches the communication link between the first proxy server and the second proxy server from the first link to the second link in response to the first detection result meeting the link switching condition.

[0161] In some embodiments, when the first proxy server and the second proxy server are connected through a dedicated network, the first link is a direct communication link, and the second link is an accelerated communication link.

[0162] In some embodiments, when the first proxy server and the second proxy server are connected through a public network, the first link is an accelerated communication link, and the second link is a direct communication link.

[0163] In some embodiments, the acquisition module 3431 is further configured to periodically acquire the latest version of routing information from the configuration server.

[0164] In some embodiments, the routing information includes addresses and regions of multiple proxy servers, the multiple proxy servers include a first proxy server and a second proxy server, and the address and region of each proxy server are synchronized from the proxy server to the configuration server.

[0165] In some embodiments, the detection module 3433 is further used to periodically send a detection packet to the second proxy server through the second link based on the address of the second proxy server; and obtain detection parameters of the detection packet to generate a first detection result of the second link.

[0166] In some embodiments, the detection parameters of the detection packet include at least one of the packet loss rate and the round-trip transmission delay of the response packet of the detection packet; the link switching condition includes that the response packet of the detection packet is received in at least one detection within the detection window time, and the detection parameter is less than or equal to the detection parameter threshold.

[0167] In some embodiments, in response to the detection parameter not satisfying the link switching condition, the first link between the first proxy server and the second proxy server continues to be maintained.

[0168] In some embodiments, the switching module 3434 is further configured to detect the number of abnormalities of the second link; in response to the number of abnormalities being greater than an abnormality threshold, switch the communication link between the first proxy server and the second proxy server from the second link back to the first link.

[0169] In some embodiments, the switching module 3434 is also used to increase the number of exceptions of the second link by 1 when the second link is disconnected and not restored after a preset waiting period; when the second link is disconnected once and restored after a preset waiting period, keep the current number of exceptions of the second link unchanged.

[0170] In some embodiments, the switching module 3434 is further used to perform a detection operation on the second link to obtain a second detection result of the second link; in response to the second detection result meeting the link switching condition, the communication link between the first proxy server and the second proxy server is switched from the first link back to the second link.

[0171] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the communication link processing method described in the embodiment of the present application.

[0172] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the communication link processing method provided by the embodiment of the present application, for example, Figure 3A A method for processing a communication link is shown.

[0173] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0174] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0175] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0176] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0177] In summary, by configuring the routing information stored in the server in the embodiment of the present application, it is possible to automatically identify whether different business servers need to use acceleration services. When selecting a communication link, the business server does not need to modify the business code, abandoning many complex development tasks such as connection management and routing management, improving processing efficiency, and automatically identifying the most suitable communication link in the current state through the number of exceptions and link switching conditions, enhancing the adaptability and communication speed of the communication link. At the same time, based on the connection binding and application layer sequence number synchronization, the reliability of the message can be guaranteed in network abnormalities such as server restart or communication link switching.

[0178] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A method for processing a communication link, characterized in that: The method comprises: Get routing information; querying the region to which the first proxy server belongs and the region to which the second proxy server belongs from the routing information, wherein the first proxy server and the second proxy server currently communicate using a first link; In response to the first proxy server and the second proxy server belonging to different areas, querying the address of the second proxy server from the routing information, and Performing a detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link; wherein different proxy servers are deployed in different areas, and one of the first communication link and the second communication link is an accelerated communication link; In response to the first detection result meeting a link switching condition, the communication link between the first proxy server and the second proxy server is switched from the first link to the second link.

2. The method according to claim 1, characterized in that: The performing a detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link includes: Based on the address of the second proxy server, periodically sending a detection packet to the second proxy server through the second link; Acquire a detection parameter of the detection packet to generate a first detection result of the second link.

3. The method according to claim 2, characterized in that The detection parameters of the detection packet include at least one of a packet loss rate and a round-trip transmission delay of a response packet of the detection packet; The link switching condition includes that a response packet to the detection packet is received in at least one detection within the detection window time, and the detection parameter is less than or equal to a detection parameter threshold.

4. The method according to claim 3, characterized in that The method further comprises: In response to the detection parameter not satisfying the link switching condition, continuing to maintain the first link between the first proxy server and the second proxy server.

5. The method according to claim 1, characterized in that After switching the communication link between the first proxy server and the second proxy server from the first link to the second link, the method further includes: Detecting the number of abnormalities of the second link; In response to the number of exceptions being greater than a threshold number of exceptions, the communication link between the first proxy server and the second proxy server is switched from the second link back to the first link.

6. The method according to claim 5, characterized in that The detecting the abnormal number of times of the second link comprises: When the second link is disconnected and not restored after a preset waiting time, the number of abnormalities of the second link is increased by 1; When the second link is disconnected once and restored after a preset waiting time, the current number of exceptions of the second link is kept unchanged.

7. The method according to claim 5, characterized in that After switching the communication link between the first proxy server and the second proxy server from the second link back to the first link, the method further includes: Performing a detection operation on the second link to obtain a second detection result of the second link; In response to the second detection result meeting the link switching condition, the communication link between the first proxy server and the second proxy server is switched back from the first link to the second link.

8. The method according to claim 1, characterized in that The routing information includes addresses and regions of multiple proxy servers, the multiple proxy servers include the first proxy server and the second proxy server, and the address and region of each proxy server are synchronized from the proxy server to the configuration server; The obtaining of routing information includes: The latest version of the routing information is periodically obtained from the configuration server.

9. The method according to any one of claims 1 to 8, characterized in that: When the first proxy server and the second proxy server are connected via a dedicated network, the first link is a direct communication link, and the second link is an accelerated communication link.

10. The method according to any one of claims 1 to 8, characterized in that: When the first proxy server and the second proxy server are connected through a public network, the first link is an accelerated communication link, and the second link is a direct communication link.

11. The method according to any one of claims 1 to 8, characterized in that: The acceleration communication link includes the following three communication links: an intranet communication link between the first proxy server and the node of the acceleration cluster in the area where the first proxy server is located, a fast user datagram protocol communication link between the node of the acceleration cluster in the area where the first proxy server is located and the node of the acceleration cluster in the area where the second proxy server is located, and an intranet communication link between the second proxy server and the node of the acceleration cluster in the area where the second proxy server is located; There is a binding relationship between the acceleration communication link and the three communication links, and the binding relationship is used to trigger the disconnection of other communication links that have the binding relationship with the disconnected acceleration communication link when any one of the three communication links is disconnected.

12. A processing device for a network acceleration service, characterized in that: The device comprises: An acquisition module is used to obtain routing information; A query module, used for querying the area to which the first proxy server belongs and the area to which the second proxy server belongs from the routing information, wherein the first proxy server and the second proxy server communicate with each other using a first link; a detection module, configured to query the address of the second proxy server from the routing information in response to the first proxy server and the second proxy server belonging to different areas, and perform a detection operation on the second link based on the address of the second proxy server to obtain a first detection result of the second link; wherein different proxy servers are deployed in different areas; The switching module is configured to switch the communication link between the first proxy server and the second proxy server from the first link to the second link in response to the first detection result meeting the link switching condition.

13. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the communication link processing method according to any one of claims 1 to 11 when executing the computer executable instructions stored in the memory.

14. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the communication link processing method according to any one of claims 1 to 11 is implemented.

15. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the method for processing a communication link according to any one of claims 1 to 11 is implemented.

Citation Information

Cited By

  • Network link quality test method, test system, storage medium and program product

    CN120710903A