Network access method, and computing device and computing device cluster

HK40138739APending Publication Date: 2026-10-09HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
HK62026127358
Authority / Receiving Office
HK · HK
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-31
Filing Date
2026-08-11
Publication Date
2026-10-09
Estimated Expiration
2044-04-15

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

This application provides a network access method, a computing device, and a computing device cluster. In the method, a first socket creation request initiated by a target application is received, a type parameter of the first socket creation request is modified, and a socket is created based on a modified type parameter. A protocol stack corresponding to the modified type parameter is the same as a protocol stack supported by the second computing device. A first computing device receives a connection request initiated by the target application, and modifies a first IP address in the connection request to a second IP address based on a preset address mapping relationship. The second IP address is an IP address of a second computing device under a second protocol stack supported by the second computing device. The first computing device establishes a connection to the second computing device based on the socket and the connection request. According to the solutions, the first computing device may establish a connection to the second computing device based on an accurate IP address, to implement network access between computing devices under different protocol stacks.
Need to check novelty before this filing date? Find Prior Art

Description

(12) International application published under the Patent Cooperation Treaty (19) International Bureau of WIPO (43) International Publication Date November 14, 2024 (14.11.2024) WIPO I PCT (51) International Patent Classification: H04L 69 / 16 (2022.01) (21) International Application Number: (22) International Application Date: (25) Application Language: (26) Publication Language: (30) Priority: 202310497837.0 202310954685.2 PCT / CN2024 / 088116 April 16, 2024 (16.04.2024) Chinese Chinese May 5, 2023 (05.05.2023) CN July 31, 2023 (31.07.2023) CN (71) Applicant: Huawei Cloud Computing Technologies Co., Ltd. [CN / CN]; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Guian New District, Guiyang City, Guizhou Province, China 550025 (CN) 0 lllllllllllllllllllllllllllllllllll^ (10) International Publication No.: WO 2024 / 230431 Al (72) Inventor: Gao Feng; Huawei Cloud Data Center, Jiaoxinggong Road, Qianzhong Avenue, Guian New District, Guiyang City, Guizhou Province, China 550025 (CN) 0 (74) Agent: TDIP & PARTNERS; Room 2002, Block A, Beihuan Center, No. 18 Yumin Road, Xicheng District, Beijing, China 100029 (CN) 0 (81) Designated Countries (unless otherwise specified, each requiring applicable national protection): AE, AG, AL, AM, AO, AT, AU, AZ, BA, BB, BG, BH, BN, BR, BW, BY, BZ, CA, CH, CL, CN, CO, CR, CU, CV, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, ES, FI, GB, GD, GE, GH, GM, GT, HN, HR, HU, ID, IL, IN, IQ, IR, IS, IT, JM, JO, JP, KE, KG, KH, KN, KP, KR, KW, KZ, LA, LC, LK, LR, LS, LU, LY, MA, MD, MG, MK, MN, MU, MW,MX, MY, MZ, NA, NG, NI, NO, NZ, OM, PA, PE, PG, PH, PL, PT, QA, RO, RS, RU, RW, SA, SC, SD, = -======-========== (54) Title: NETWORK ACCESS METHOD, AND COMPUTING DEVICE AND COMPUTING DEVICE CLUSTER (54) Title of the Invention: A network access method, a computing device and a computing device cluster Figure 4 S401 Receive a first socket creation request initiated by a target application S402 Modify a type parameter of the first socket creation request, and create a socket on the basis of the modified type parameter S403 Receive an address binding request sent by the target application S404 Modify a third IP address in the address binding request into a fourth IP address according to a preset address mapping relationship, and bind the fourth IP address with the socket according to the address binding request S405 Receive a connection request initiated by the target application S406 Modify a first IP address in the connection request into a second IP address according to the preset address mapping relationship S407 Establish a connection with a second computingdevice based on the socket and the connection request S408 Perform system call processing according to the second IP address (57) Abstract: The present application provides a network access method, a computing device and a computing device cluster. The method comprises: receiving a first socket creation request initiated by a target application; modifying a type parameter of the first socket creation request, and creating a socket based on the modified type parameter, wherein the protocol stack corresponding to the modified type parameter is the same as a protocol stack supported by a second computing device; a first computing device receiving a connection request initiated by the target application; and modifying a first IP address in the connection request to a second IP address [see continuation page] WO 2024 / 230431 A1 IIIIIIIIIIIIIIIIIIIIIIIIIIIIM SE, SG, SK, SL, ST, SY SY TH, TJ, TM, TN, TR, TT, TZ, UA, UG, US, UZ, VC, VN, WS, ZA, ZM, ZW (84)Designated States (unless otherwise indicated, for every available regionalProtection): ARIPO (BW, CV, GH, GM, KE, LR, LS, MW, MZ, NA, RW, SC, SD, SL, ST, SZ, TZ, UG, ZM, ZW), Eurasian (AM, AZ, BY, KG, KZ, RU, TJ, TM), European (AL, AT, BE, BG, CH, CY, CZ, DE, DK, EE, ES, FI, FR, GB, GR, HR, HU, IE, IS, IT, LT, LU, LV, MC, ME, MK, MT, NL, NO, PL, PT, RO, RS, SE, SI, SK, SM, TR), OAPI (BF, BJ, CF, CG, CI, CM, GA, GN, GQ, GW, KM, ML, MR, NE, SN, TD, TG). This international publication: ─ includes the international search report (Article 21(3) of the Treaty)______________________________________________________________ according to a preset address mapping relationship, wherein the second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device; and the first computing device establishing a connection with the second computing device on the basis of the socket and the connection request. By means of the solution, a first computing device can establish a connection with a second computing device on the basis of an accurate IP address, such that network access between computing devices underDifferent protocol stacks are realized. (57) Abstract: This application provides a network access method, a computing device, and a computing device cluster. In this method, a first socket creation request initiated by a target application is received, the type parameter of the first socket creation request is modified, and a socket is created based on the modified type parameter; the protocol stack corresponding to the modified type parameter is the same as the protocol stack supported by the second computing device. The first computing device receives a connection request initiated by the target application; according to a preset address mapping relationship, the first IP address in the connection request is modified to a second IP address; the second IP address is the IP address of the second computing device under the second protocol stack supported by the second computing device; the first computing device establishes a connection with the second computing device based on the socket and the connection request. Through this scheme, the first computing device can establish a connection with the second computing device based on the accurate IP address, thereby realizing network access between computing devices under different protocol stacks. WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 Cross-Reference to Related Applications Regarding a Network Access Method, Computing Device, and Computing Device Cluster This application claims priority to Chinese Patent Application No. 202310497837.0, filed on May 5, 2023, entitled "A Network Access Method"; and to Chinese Patent Application No. 2023109546852, filed on July 31, 2023, entitled "A Network Access Method, Computing Device, and Computing Device Cluster," the entire contents of which are incorporated herein by reference. Technical Field This application relates to the field of computer technology, and more particularly to a network access method, computing device, and computing device cluster. Background Technology: With the development of the Internet Protocol (IP), the address pool for Internet Protocol version 4 (IPv4) has been exhausted, and Internet Protocol version 6 (IPv6) has become the mainstream network protocol. However, since IPv4 networks have been around for decades, most services only support IPv4 and have not considered supporting IPv6. To enable current IPv4-enabled services to support IPv6, modifications to a massive number of existing services are required, which is quite difficult. Simultaneously, with the expansion of cloud services, the number of containers far exceeds the number of virtual machines. To meet their address requirements, IPv6 addresses need to be allocated to containers. Existing services...Since most addresses are IPv4, a technology supporting interoperability between IPv4 and IPv6 is required to ensure uninterrupted operation of current services. However, current network access methods that support both IPv4 and IPv6 require code logic to determine address scenarios and modify existing code for different protocol stacks, increasing code complexity and hindering the widespread adoption of IPv6. This application provides a network access method, a computing device, and a computing device cluster to enable network interoperability between devices supporting different protocol stacks. Firstly, this application provides a network access method that can be executed by a first computing device or its kernel. In this method, a first computing device receives a first socket creation request initiated by a target application, the first socket creation request being used to request the creation of a socket for accessing the target application in a second computing device; the first computing device modifies the type parameter of the first socket creation request and creates a socket based on the modified type parameter; the protocol stack corresponding to the modified type parameter is the same as the protocol stack supported by the second computing device; the first computing device receives a connection request initiated by the target application, the connection request being used to request the establishment of a connection with the second computing device, the connection request including a first Internet Protocol (IP) address; the first IP address in the connection request is modified to a second IP address according to a preset address mapping relationship; the first IP address belongs to a first protocol stack, and the second IP address is the IP address of the second computing device under a second protocol stack supported by the second computing device; the first computing device establishes a connection with the second computing device based on the socket and the connection request. In the above method, when the first computing device receives a socket creation request from the target application, it can modify the socket type parameters to generate a socket that matches the protocol stack supported by the second computing device. The first computing device also modifies the peer IP address in the connection request initiated by the target application to the IP address under the actual protocol stack of the second computing device, ensuring that the first computing device can establish a connection with the second computing device based on an accurate IP address, thereby enabling the first computing device to access the network of the second computing device. In one possible design, after creating the socket based on the modified type parameters and before receiving the connection request initiated by the target application, the method further includes: receiving an address binding request initiated by the target application, the address binding request including a third IP address; modifying the third IP address in the address binding request to a fourth IP address according to a preset address mapping relationship; and binding the fourth IP address and the socket according to the address binding request; wherein the third IP address belongs to the first protocol stack, and the fourth IP address is the IP address of the first computing device under the second protocol stack.The step of establishing a connection with the second computing device based on the socket and the connection request includes: establishing a connection with the second computing device based on the socket according to the fourth IP address and the second IP address in the connection request. Through this design, after receiving an address binding request, the first computing device can modify the local IP address in the address binding request to a local IP address belonging to the protocol stack supported by the second computing device. Thus, the first computing device can establish a connection with the second computing device based on the modified local IP address, thereby successfully accessing the second computing device. In one possible design, after receiving the address binding request initiated by the target application and before modifying the third IP address in the address binding request to the fourth IP address according to a preset address mapping relationship, the method further includes: determining that the preset address mapping relationship includes a mapping relationship between the third IP address and the fourth IP address. Through this design, the first computing device can modify the third IP address in the address binding request based on the mapping relationship between the third and fourth IP addresses when the preset address mapping relationship is determined to include the mapping relationship between the third and fourth IP addresses, thus ensuring the accuracy of network address translation. In one possible design, establishing a connection with the second computing device based on the socket and the connection request includes: selecting a fourth IP address from multiple IP addresses of the first computing device, wherein the fourth IP address and the second IP address belong to the same protocol stack; and establishing a connection with the second computing device based on the socket according to the fourth IP address and the second IP address in the connection request. With this design, if the first computing device does not receive an address binding request sent by the target application, the first computing device can select the fourth IP address when establishing a connection with the second computing device and establish a connection based on the fourth IP address, which belongs to the same protocol stack as the second IP address, thereby correctly establishing a network connection and ensuring the accuracy of network access. In one possible design, after receiving the first socket creation request initiated by the target application and before modifying the type parameter of the first socket creation request, the method further includes: determining that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. Through this design, the list of applications requiring network address translation can be pre-stored in the first computing device, allowing the first computing device to monitor the applications in the application list and perform socket type conversion and network address translation in a timely manner. In one possible design, the preset application list is either system-preconfigured or user-defined; the preset address mapping relationship...This can be pre-configured by the system or user-defined. Through this design, the system can pre-configure applications requiring network address translation, or the user can select the applications requiring network address translation. The preset address mapping relationship can also be pre-configured by the system or user-defined, improving the flexibility of network access methods. In one possible design, after receiving a connection request initiated by the target application, before modifying the first IP address in the connection request to a second IP address according to the preset address mapping relationship, the method further includes: determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. Through this design, the first computing device can modify the first IP address in the connection request according to the mapping relationship between the first IP address and the second IP address after determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address, ensuring the accuracy of network address translation. In another possible design, after establishing a connection with the second computing device based on the socket and the connection request, the method further includes: performing system call processing based on the second IP address; the system call processing includes reading messages from the second computing device and / or sending messages to the second computing device. Through this design, the network access method provided in this application can correctly establish a network connection between the first computing device and the second computing device, enabling message passing between them. In one possible design, the first protocol stack is an IPv4 protocol stack and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack and the second protocol stack is an IPv4 protocol stack. This design enables network access between the first and second computing devices under different protocol stacks, which is beneficial to the promotion and application of the IPv4 protocol. Secondly, this application provides a network access method that can be executed by the second computing device or its kernel mode. In this method, a second computing device receives a second socket creation request initiated by a target application. This second socket creation request requests the creation of a socket for listening to messages sent by the target application on other devices. The device modifies the type parameter of the second socket creation request and creates the socket based on the modified type parameter. The protocol stack corresponding to the modified type parameter is the same as the protocol stack supported by the first computing device corresponding to the target application. The second computing device receives an address binding request initiated by the target application in the second computing device. The address binding request includes a first server Internet Protocol (IP) address. The second computing device modifies the first IP address in the address binding request to a second IP address according to a preset address mapping relationship. The first IP address belongs to a first protocol stack, and the second IP address...The second computing device is the IP address of the second computing device under the second protocol stack; the second protocol stack is the protocol stack supported by the first computing device corresponding to the target application; the second computing device binds the socket and the second IP address according to the address binding request. In the above method, when receiving the socket creation request from the target application, the second computing device can modify the socket type parameter to generate a socket matching the protocol stack of the first computing device, and the second computing device modifies the local IP address in the address binding request initiated by the target application to an IP address under the protocol stack supported by the first computing device, ensuring that the second computing device can accept network access from the first computing device based on an accurate IP address. In one possible design, after receiving a second socket creation request initiated by the target application and before modifying the type parameter of the second socket creation request, the method further includes: determining that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. In another possible design, the preset application list is either system-preconfigured or user-defined; the preset address mapping relationship is either system-preconfigured or user-defined. In yet another possible design, after receiving an address binding request initiated by the target application in the second computing device and before modifying the first IP address in the address binding request to a second IP address according to the preset address mapping relationship, the method further includes: determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. In one possible design, after binding the socket and the second IP address according to the address binding request, the method further includes: performing system call processing based on the second TP address; the system call processing includes reading a message from the first computing device of the target application, and / or sending a message to the first computing device of the target application. In one possible design, the first protocol stack is an IPv4 protocol stack and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack and the second protocol stack is an IPv4 protocol stack. Thirdly, this application provides a network access method that can be executed by a first computing device or the kernel mode of the first computing device, such that the method can be executed by the first computing device. In this method, the first computing device receives a first socket creation request initiated by a target application, the first socket creation request being used to request the creation of a socket for accessing the target application in a second computing device; the first computing device creates a first socket according to the first socket creation request; the first computing device receives information from the target application in the first computing device.The first computing device initiates a connection request, which is used to request the establishment of a connection with the second computing device. The connection request includes a first server Internet Protocol (IP) address; the first IP address belongs to a first protocol stack; the first computing device determines a preset address mapping relationship that includes a mapping relationship between the first IP address and a second IP address; the second IP address is the IP address of the second computing device under a second protocol stack supported by the second computing device; the first computing device closes the first socket and generates a third socket creation request. The index of the third socket creation request is the same as the index of the first socket creation request, and the type parameter of the third socket creation request is different from the type parameter of the first socket creation request. The protocol stack corresponding to the type parameter of the third socket creation request is the same as the protocol stack supported by the second computing device; the first computing device creates a second socket according to the third socket creation request; the first computing device modifies the first IP address in the connection request to the second IP address according to the preset address mapping relationship; the protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device; the first computing device establishes a connection with the second computing device based on the second socket and the connection request. In the above method, when the first computing device supports dual stack, after determining that the target IP address requested by the connection request is included in the preset address mapping relationship, the first computing device generates a new socket creation request and translates the IP address of the second computing device, ensuring that the first computing device can accurately identify the service requiring network address translation and establish a connection with the second computing device based on the accurate IP address. In one possible design, before generating the third socket creation request, the method further includes: determining that the target application belongs to a preset application list, wherein the applications in the preset application list are applications requiring network address translation. In one possible design, the preset application list is pre-configured by the system or user-defined; the preset address mapping relationship is pre-configured by the system or user-defined. In one possible design, after establishing a connection with the second computing device based on the second socket and the connection request, the method further includes: performing system call processing based on the second IP address; the system call processing includes reading messages from the second computing device and / or sending messages to the second computing device. In one possible design, generating the third socket creation request includes: generating socket creation requests sequentially according to their index order until the third socket creation request is generated. With this design, since the kernel always allocates resources to the process with the smallest index among the current processes, the first computing device can generate socket creation requests one at a time until a third socket creation request with the same index as the first socket creation request is generated, thus not affecting the normal operation of the target application.Ensure normal operation of network access services. 3 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 Fourthly, this application provides a computing device, the computing device including a kernel network module for receiving a first socket creation request initiated by a target application, the first socket creation request being used to request the creation of a socket for accessing the target application in a second computing device; a conversion module for modifying a type parameter of the first socket creation request, the modified type parameter corresponding to a protocol stack that is the same as the protocol stack supported by the second computing device; the kernel network module is further used to create a socket based on the modified type parameter; receive a connection request initiated by the target application, the connection request being used to request establishing a connection with the second computing device, the connection request including a first Internet Protocol (IP) address, the first IP address belonging to a first protocol stack; the conversion module is further used to modify the first IP address in the connection request to a second IP address according to a preset address mapping relationship; the second IP address is the IP address of the second computing device under a second protocol stack supported by the second computing device; the kernel network module is further used to establish a connection with the second computing device based on the socket and the connection request. In one possible design, the kernel network module is further configured to: after creating a socket based on the modified type parameters, and before receiving a connection request initiated by the target application, receive an address binding request initiated by the target application, wherein the address binding request includes a third IP address, the third IP address belonging to the first protocol stack; the conversion module is further configured to: modify the third IP address in the address binding request to a fourth IP address according to a preset address mapping relationship; the fourth IP address is the IP address of the first computing device under the second protocol stack; the kernel network module is further configured to: bind the fourth IP address and the socket according to the address binding request; when the kernel network module establishes a connection with the second computing device based on the socket and the connection request, it is specifically configured to: establish a connection with the second computing device based on the socket according to the fourth IP address and the second IP address in the connection request. In one possible design, the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the third IP address in the address binding request to a fourth IP address according to a preset address mapping relationship, determine that the preset address mapping relationship includes a mapping relationship between the third TP address and the fourth TP address. In another possible design, the kernel network module is specifically configured to: select a fourth IP address from multiple IP addresses of the first computing device.The fourth IP address and the second IP address belong to the same protocol stack. A connection is established with the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request. In one possible design, the conversion module is further configured to: after receiving the first socket creation request initiated by the target application, and before modifying the type parameter of the first socket creation request, determine that the target application belongs to a preset application list, wherein the applications in the preset application list are applications requiring network address translation. In another possible design, the conversion module is further configured to: before modifying the first server Internet Protocol IP address in the connection request to the second IP address according to a preset address mapping relationship, determine that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. In another possible design, the kernel network module is further configured to: after establishing a connection with the second computing device based on the socket and the connection request, perform system call processing based on the second IP address; the system call processing includes reading messages from the second computing device and / or sending messages to the second computing device. In one possible design, the first IP address and the third IP address belong to the IPv4 protocol stack, and the second IP address and the fourth IP address belong to the IPv6 protocol stack; or the first IP address and the third IP address belong to the IPv6 protocol stack, and the second IP address and the fourth IP address belong to the IPv4 protocol stack. Fifthly, this application provides a computing device, comprising: a kernel network module, configured to receive a second socket creation request initiated by a target application, the second socket creation request being used to request the creation of a socket for listening to messages sent by the target application on other devices; a conversion module, configured to modify the type parameter of the second socket creation request, wherein the protocol stack corresponding to the modified type parameter is the same as the protocol stack supported by the first computing device corresponding to the target application; the kernel network module is further configured to create a socket based on the modified type parameter; receive an address binding request initiated by the target application, the address binding request including a first server Internet Protocol (IP) address; the conversion module is further configured to modify the first IP address in the address binding request to a second IP address according to a preset address mapping relationship; the first IP address belongs to a first protocol stack, the second IP address is the IP address of the second computing device under the second protocol stack; the second protocol stack is the protocol stack supported by the first computing device corresponding to the target application; the kernel network module is further configured to bind the socket and the second IP address according to the address binding request. In one possible design, the conversion module is further configured to: after receiving the second socket creation request initiated by the target application, modify...Before the type parameter of the second socket creation request, it is determined that the target application belongs to a preset application list, and the applications in the preset application list are applications that require network address translation. 4 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 In one possible design, the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the first IP address in the address binding request to the second IP address according to a preset address mapping relationship, determine that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. In one possible design, the kernel network module is further configured to: after binding the socket and the second IP address according to the address binding request, perform system call processing according to the second IP address; the system call processing includes reading messages from the first computing device of the target application, and / or sending messages to the first computing device of the target application. In one possible design, the first IP address belongs to the IPv4 protocol stack and the second IP address belongs to the IPv6 protocol stack; or the first IP address belongs to the IPv6 protocol stack and the second IP address belongs to the IPv4 protocol stack. Sixthly, this application provides a computing device, the computing device comprising: a kernel network module, configured to receive a first socket creation request initiated by a target application, the first socket creation request being used to request the creation of a socket for accessing the target application in a second computing device; create a first socket according to the first socket creation request; receive a connection request initiated by the target application, the connection request being used to request establishing a connection with the second computing device, the connection request including a first server Internet Protocol (IP) address, the first IP address belonging to a first protocol stack; and determine that a preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. The second IP address is the IP address of the second computing device under the second protocol stack supported by the second computing device; the first socket is closed, and a third socket creation request is generated. The index of the third socket creation request is the same as the index of the first socket creation request, and the type parameter of the third socket creation request is different from the type parameter of the first socket creation request. The protocol stack corresponding to the type parameter of the third socket creation request is the same as the protocol stack supported by the second computing device; a second socket is created according to the third socket creation request; a conversion module is used to modify the first IP address in the connection request to the second IP address according to the preset address mapping relationship; the protocol stack to which the second TP address belongs is the same as the protocol stack supported by the second computing device; the internalThe kernel network module is further configured to: establish a connection with the second computing device based on the second socket and the connection request. In one possible design, the conversion module is further configured to: determine, before generating the third socket creation request, that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. In one possible design, the kernel network module is further configured to: after establishing a connection with the second computing device based on the second socket and the connection request, perform system call processing based on the second IP address; the system call processing includes reading messages from the second computing device and / or sending messages to the second computing device. In one possible design, the kernel network module is specifically configured to: generate socket creation requests sequentially according to the index order until the third socket creation request is generated. In a seventh aspect, this application provides a computing device, the device including a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the computing device to perform the methods described in the first aspect and any possible design of the first aspect, or to perform the methods described in the second aspect and any possible design of the second aspect, or to perform the methods described in the third aspect and any possible design of the third aspect. Eighthly, this application provides a computing device cluster, the computing device cluster including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the methods described in the first aspect and any possible design of the first aspect, or performs the methods described in the second aspect and any possible design of the second aspect, or performs the methods described in the third aspect and any possible design of the third aspect. Ninthly, this application provides a computer program product including instructions, which, when executed by a computing device, cause the computing device to perform the methods described in the first aspect and any possible design of the first aspect, or performs the methods described in the second aspect and any possible design of the second aspect, or performs the methods described in the third aspect and any possible design of the third aspect. Tenthly, this application provides a computer-readable storage medium including computer program instructions, which, when executed by a computing device, cause the computing device to perform the methods described in the first aspect and any possible design of the first aspect, or performs the methods described in the second aspect and any possible design of the second aspect, or performs the methods described in the third aspect and any possible design of the third aspect. Based on the implementations provided in the above aspects, embodiments of this application can be further combined to provide more implementations. For the beneficial effects described in aspects four through ten above, please refer to the descriptions of the beneficial effects described in aspects one through three above; they will not be repeated here.5 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 Brief Description of the Drawings: Figure 1 is a schematic diagram of the architecture of NAT64 technology; Figure 2 is a schematic diagram of the architecture of a communication system that can realize network address translation; Figure 3 is a schematic diagram of the structure of a computing device provided in an embodiment of this application; Figure 4 is a flowchart of a network access method provided in an embodiment of this application; Figure 5 is a flowchart of a network access method provided in an embodiment of this application; Figure 6 is a flowchart of a network access method provided in an embodiment of this application; Figure 7 is a flowchart of a network access method provided in an embodiment of this application; Figure 8 is a flowchart of a network access method provided in an embodiment of this application; Figure 9 is a flowchart of a network access method provided in an embodiment of this application; Figure 10 is a schematic diagram of the structure of a computing device provided in an embodiment of this application; Figure 11 is a schematic diagram of a computing device cluster provided in an embodiment of this application; Figure 12 is a schematic diagram of a computing device cluster connection method provided in an embodiment of this application. Detailed Description of Embodiments To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings. In the description of the embodiments of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of that feature. It should be understood that in the embodiments of this application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple. The Transmission Control Protocol / Internet Protocol (TCP / IP) is the most fundamental communication protocol used in networks. The TCP / IP transmission protocol specifies the standards and methods for communication between different parts of the Internet. Internet Protocol Address (IP)...IP (Internet Protocol) is a unified address format provided by the IP protocol. Based on the IP protocol, every network and every host on the Internet can be assigned an IP address, enabling all hosts connected to the network to communicate with each other based on their own IP address and the IP address of the receiving host. Internet Protocol version 4 (IPv4) uses a 32-bit address length, providing approximately 4.3 billion addresses. However, with the development of the Internet Protocol (IP), IPv4 addresses have become scarce, and Internet Protocol version 6 (IPv6) has become the mainstream network protocol. IPv6 uses a 128-bit address length, providing virtually unlimited addresses. However, because IPv4 networks have been around for decades, most services only support IPv4 and have not considered supporting IPv6. Enabling current IPv4 services to support IPv6 would require modifications to a massive number of existing services, which is quite difficult. Simultaneously, with the expansion of cloud services, the number of containers far exceeds the number of virtual machines, requiring the allocation of IPv6 addresses to meet their address requirements. Most existing services use IPv4 addresses, necessitating a technology that supports interoperability between IPv4 and IPv6 to ensure uninterrupted service operation. Current network access methods, to support both IPv4 and IPv6 dual-stack, require code logic to determine address scenarios and modify existing code based on different protocol stacks, increasing code complexity and hindering IPv6 adoption. Figure 1 illustrates a communication system. Referring to Figure 1, this system may include multiple computing devices and gateways. This application embodiment does not limit the number of computing devices in the communication system; the first computing device, gateway, and second computing device in Figure 1 are merely examples and not limitations. In this application embodiment, computing devices refer to various electronic devices that need internet access (connection to a public IPv4 or IPv6 network), such as computers, laptops, smartphones, tablets, smart wearable devices, servers, other home devices, or virtual machines, containers, and other computing instances. Figure 1 illustrates an example with the first computing device as a terminal and the second computing device as a server. This application embodiment does not limit the type of computing device. In this embodiment of the application, the computing device can install an application. The application in the computing device can be a client or a server. The client can request access to the service. (6 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45)On the client side, the client can also request access to other clients, and the server can listen for access requests initiated by clients. In the following description, we will use the example of an application in the first computing device accessing an application in the second computing device. Applications can be installed on the first computing device. When a user uses the network services provided by the application, the first computing device can interact with the second computing device based on the IP addresses of both the first and second computing devices to complete the service. For example, using IPv4, an IPv4 address is 32 bits long. IPv4 divides these 32 bits into two parts: the first part represents the network address, and the second part represents the host's address within the local area network. If two IP addresses are in the same subnet, their network addresses will be the same. To determine the network address within an IP address, the IP protocol also introduces a subnet mask. The network address can be obtained by performing a bitwise AND operation between the IP address and the subnet mask. When a first computing device sends a data packet to a second computing device, it first uses the IPv4 protocol to determine if the two devices are on the same subnet. If they are, the first computing device can use the Address Resolution Protocol (ARP) to query the Media Access Control (MAC) address, allowing it to broadcast the data packet to the second device within that subnet. If the two devices are not on the same subnet, the Ethernet network will forward the data packet to the gateway of that subnet for routing. The gateway can forward the packet multiple times, eventually reaching the subnet of the second computing device. Then, it obtains the MAC address of the second computing device via ARP and finally broadcasts the packet to the second device. Under the IPv4 protocol, when the first computing device needs to send a data packet to the second computing device, it performs the following steps: Step a: Create a socket with type parameter IPv4; Step b: Bind the local IPv4 address; Step c: Connect to the IPv4 address of the second computing device. Similarly, under the IPv6 protocol, when the first computing device needs to send a data packet to the second computing device, the first computing device performs the following steps: Step a: Create a socket with the type parameter set to IPv6; Step b: Bind the local IPv6 address; Step c: Connect to the IPv6 address of the second computing device. Here, the socket in the above process can be viewed as an endpoint in the communication connection between two applications on different hosts; this is a logical concept. A socket is equivalent to an application programming interface (API) for inter-process communication in a network environment.An API (Application Programming Interface) is a named and addressable communication endpoint. Each socket has its type and a process associated with it. Sockets are mechanisms for sending data packets to application layer processes based on IP addresses and ports. Under different versions of the IP protocol, data packets transmitted between a first computing device and a second computing device need to be routed by different gateways. For example, under IPv4, an IPv4 gateway is needed for data packet routing, and under IPv6, an IPv6 gateway is needed for data packet routing. How to achieve network communication between devices under different protocol stacks has become an extremely important issue. In one optional implementation, a network address translation (NAT) device can be deployed at the intermediate node between the IPv6 network and the IPv4 network, such as a NAT64 device (also known as a NAT46 device) that supports IPv6 and IPv4 network address translation. For example, Figure 2 is a schematic diagram of the architecture of a communication system that can implement network address translation. Figure 2 illustrates the interaction between a first computing device supporting IPv6 and a second electronic device supporting IPv4. Referring to Figure 2, the communication system includes an IPv6 device, an IPv6 gateway, a NAT64 device, an IPv4 gateway, and an IPv4 device. Assume the IPv6 device's IP address is fe80::fbaf:32c5:ac97:0102, and the IPv4 device's IP address is 192.168.1.L. The NAT64 device has dual-stack capabilities supporting both IPv6 and IPv4, and it possesses addresses for both networks. To achieve IPv6 and IPv4 address translation, the following mapping needs to be configured in the NAT64 device: For an IPv6 device, the IPv6 address fe80::fbaf:32c5:ac97:0102 corresponds to the IPv4 address 192.16822; for an IPv4 device, the IPv4 address 192.168.1.1 corresponds to the IPv6 address fe80::fbaf:32c5:ac98:0304. When an IPv6 device needs to send a data packet to a server, both the source and destination addresses of the packet are IPv6 addresses. The source address of the packet is fe80::fbaf:32c5:ac97:0102, and the destination address is fe80::fbaf:32c5:ac98:0304. After being forwarded by the IPv6 gateway, the NAT64 device receives the data packet. The NAT64 device queries the pre-configured network address mapping and determines that both the source and destination addresses of the data packet have corresponding IPv4 addresses. Therefore, the NAT64 modifies the source address of the data packet to 192.168.2.2 and the destination address to 192.168.1.L.Data packets with modified network addresses can be forwarded through an IPv4 gateway to reach IPv4 devices. Similarly, when an IPv4 device sends data packets to an IPv6 device, a NAT64 device can modify the source and destination addresses of the data packets to the corresponding IPv6 addresses of the IPv4 addresses, thereby enabling the transmission of data packets from IPv4 devices to IPv6 devices. However, while the above scheme can achieve mutual access between IPv4 and IPv6 networks, it requires the introduction of new devices into the communication system, increasing the complexity of service deployment. Furthermore, forwarding data packets through a NAT64 device also increases latency, and the performance of the NAT64 device can impact service performance. Based on these issues, this application provides a network access method that can be executed by a first computing device and a second computing device. In the network access method provided in this application embodiment, a first computing device receives a first socket creation request initiated by a target application. This first socket creation request requests the creation of a socket for accessing the target application on a second computing device. The first computing device can modify the type parameter of the first socket creation request and create the socket based on the modified type parameter. The protocol stack corresponding to the modified type parameter is the same as the protocol stack supported by the second computing device. The first computing device also receives a connection request initiated by the target application. This connection request requests the establishment of a connection with the second computing device. The connection request includes a first IP address, which belongs to a first protocol stack. The first computing device can modify the first IP address in the connection request to a second IP address according to a preset address mapping relationship. The second IP address is the IP address of the second computing device under a second protocol stack supported by the second computing device. The first computing device can establish a connection with the second computing device based on the created socket and the connection request. Through this scheme, the first computing device can modify the socket type parameter upon receiving a socket creation request from the target application, thereby generating a socket that matches the protocol stack of the second computing device. Furthermore, the first computing device modifies the peer IP address in the connection request initiated by the target application to the actual IP address under the protocol stack of the second computing device, ensuring that the first computing device can establish a connection with the second computing device based on an accurate IP address. In another network access method provided in this application embodiment, the first computing device can support both IPv4 and IPv6 protocols. In this method, the first computing device receives a first socket creation request initiated by the target application in the first computing device and creates a first socket according to the first socket creation request. The first computing device receives a connection request sent by the target application, and the first computing device determines a preset location...The address mapping relationship includes the mapping between the first IP address and the second IP address in the connection request. The first IP address belongs to the first protocol stack, and the second IP address is the IP address of the second computing device under the second protocol stack supported by the second computing device. Therefore, the first computing device can determine that network address translation (NAT) is needed for the connection request. The first computing device can close the first socket and generate a third socket creation request. The index of the third socket creation request is the same as that of the first socket creation request, and the type parameter of the third socket matches the protocol stack of the second computing device. The first computing device creates a second socket based on the third socket creation request and modifies the first IP address in the connection request to the second IP address according to the preset mapping relationship. The protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device. The first computing device can establish a connection with the second computing device based on the second socket and the connection request. Through this scheme, when the first computing device supports dual stack, when the first computing device determines that the target IP address requested by the connection request is included in the preset address mapping relationship, it generates a new socket creation request and translates the IP address of the second computing device. This ensures that the first computing device can accurately identify the service requiring network address translation and establish a connection with the second computing device based on the accurate IP address. The structure of a computing device provided in this application embodiment is described below. This computing device can be either a first computing device or a second computing device. Figure 3 is a schematic diagram of the structure of a computing device provided in this application embodiment. Referring to Figure 3, the computing device can have at least one application installed. As shown in Figure 3, user mode includes three applications (APP1, APP2, APP3) as an example. In kernel mode, the kernel network module is used to execute system calls and the actual execution function of the system calls. This allows it to respond to system call requests initiated by applications, establish a connection with the second computing device, and send or receive data packets from the second computing device. The network access method provided in this application embodiment can be executed by the translation module in the computing device. As shown in Figure 3, the conversion management module can be used to send the list of applications to be monitored, the conversion type, and the address mapping relationship to the conversion module. Optionally, the user can set the list of applications to be monitored and configure the address conversion relationship; or the list of applications to be monitored and the address conversion relationship can be pre-configured by the system. The conversion module can store the list of applications to be monitored and the conversion type, as well as the preset address mapping relationship. Assuming that the list of applications to be monitored includes APP1, when the kernel network module of the computing device receives a system call request initiated by APP1, it can send the context related to the system call request to the conversion module. The conversion module can modify the type parameter of the socket creation request and modify the target address in the connection request. The conversion module can return the processed socket creation request and connection request to the system.The kernel network module creates sockets based on the processed socket creation request and establishes connections with remote devices based on the modified connection request. This enables network access between devices using different protocol stacks without affecting the original data processing and data transmission / reception processes. In some embodiments, the network access method provided in this application can also be used to enable computing devices to support other IP protocols. For example, assuming the first computing device supports IPv4, the user can enable the "Support IPv6" function in the control interface of the first computing device. The first computing device loads the conversion module and conversion management module shown in Figure 3. When loading the conversion module, the first computing device can register the socket interface detection information with the kernel. The conversion management module assigns an IPv6 address to the first computing device and sends a preset application list, conversion type, and preset address mapping relationship to the conversion module. Thus, the first computing device can access the IPv6 second computing device based on the network access method provided in this application, enabling the first computing device to support different protocol stacks. 8 5 10 15 20 25 30 35 40 45 WO 2024 / 230431 PCT / CN2024 / 088116 The network access method provided in this application embodiment can be applied to a first computing device or a second computing device that supports a single stack, and can also be applied to a first computing device that supports a dual stack. The network access method under different protocol stack scenarios is further described below. —. Single stack scenario The single stack scenario in this application embodiment refers to the initial state in which the first computing device supports the IPv4 protocol and the second computing device supports the IPv6 protocol, or the initial state in which the first computing device supports the IPv6 protocol and the second computing device supports the IPv4 protocol. Figure 4 is a flowchart of a network access method provided in this application embodiment. The method can be executed by the first computing device or the kernel mode in the first computing device. In this embodiment, the first computing device receives a request initiated by the target application and accesses the target application in the second computing device. Referring to Figure 4, the method includes the following steps: S401: Receive the first socket creation request initiated by the target application. The first socket creation request is used to request the creation of a client socket for network communication. The target application is an application from a pre-configured application list stored by the first computing device. This application in the pre-configured application list operates on a different protocol stack than the second computing device to which the application requests connection. The first computing device needs to monitor the system call requests initiated by the target application to perform socket type conversion and network address translation. S402: Modify the type parameter of the first socket creation request and create the socket based on the modified type parameter. In an optional implementation, after receiving the first socket creation request, the first computing device can select from the preset application list...The system checks whether the target application is included. Applications in the preset application list are those requiring network address translation. After determining that the target application belongs to the preset application list, the first computing device modifies the type parameters of the first socket creation request and creates the socket based on the modified type parameters. The first socket creation request initiated by the target application includes the type parameters of the first socket creation request. The first computing device can modify the type parameters of the first socket creation request, and the protocol stack corresponding to the modified type parameters is the same as the protocol stack supported by the second computing device. For example, assuming the target application is an IPv4 application, the type parameter of the first socket creation request is AF-INET, and the second computing device supports IPv6, then the first computing device can modify the type parameter of the first socket creation request to AF-INET6. As another example, assuming the target application is an IPv6 application, the type parameter of the first socket creation request is AF INET6, and the second computing device supports IPv4, then the first computing device can modify the type parameter of the first socket creation request to AF INET. The first computing device can create a socket based on the modified type parameter. For example, when the modified type parameter is AF INET6, the first computing device can create an IPv6 socket; when the modified type parameter is AF INET, the first computing device can create an IPv4 socket. Through this design, the first computing device can generate a socket that matches the protocol stack supported by the second computing device, ensuring that the first computing device can correctly access the second computing device based on this socket. S403: Receive the address binding request sent by the target application. Optionally, the address binding request sent by the target application is used to request binding to the local IP address of the first computing device. In this embodiment, the address binding request sent by the target application includes a third IP address, which belongs to the first protocol stack. The target application can obtain the third IP address from the configuration file and generate the address binding request based on the obtained third IP address. Optionally, the third IP address can be the address of the first computing device under the first protocol stack; or the third IP address can be any IP address under the first protocol stack, that is, the third IP address in the address binding request may not be the actual address of the first computing device. In an optional implementation, after receiving the address binding request from the target application, the first computing device can determine whether the preset address mapping relationship includes the mapping relationship between the third IP address and the fourth IP address. After determining that the preset address mapping relationship includes the mapping relationship between the third IP address and the fourth IP address, S404 is executed. S404: Modify the third IP address in the address binding request to the fourth IP address according to the preset address mapping relationship, and bind the fourth IP address and the socket according to the address binding request.In one optional implementation, the first computing device can store a preset address mapping relationship. Taking IPv4 and IPv6 as the first and second protocol stacks, respectively, the address mapping relationship can include the IPv4 and IPv6 addresses corresponding to the first computing device, and can also include the IPv4 and IPv6 addresses corresponding to the second computing device. In this embodiment, IP addresses under other protocol stacks can be assigned to the first computing device. For example, assuming the first computing device initially supports IPv4, an IP address under IPv6 can be assigned to the first computing device, and the mapping relationship between the IPv4 and IPv6 addresses of the first computing device can be stored. In some embodiments, when a target application in the first computing device initiates an address binding request, it can obtain the third IP address of the first computing device from a configuration file. If the third IP address in the configuration file is a pre-configured fake address under the first protocol stack, the address mapping relationship can store the mapping relationship between the fake address and the real address of the first computing device under the second protocol stack. If the third IP address in the configuration file is the real address of the first computing device under the first protocol stack, the address mapping relationship can store the mapping relationship between the real address of the first computing device under the first protocol stack and the real address of the first computing device under the second protocol stack. The first computing device can modify the third IP address in the address binding request to a fourth IP address according to the preset address mapping relationship. The fourth IP address is the IP address of the first computing device under the second protocol stack, and the protocol stack to which the fourth IP address belongs is the same as the protocol stack supported by the second computing device. For example, assuming the target application is an IPv4 application, the third IP address is an IPv4 address, and the second computing device supports IPv6, then the modified fourth IP address of the first computing device becomes the IPv6 address of the first computing device. As another example, assuming the target application is an IPv6 application, the third IP address is an IPv6 address, and the second computing device supports IPv4, then the modified fourth IP address of the first computing device becomes the IPv4 address of the first computing device. The first computing device can bind the fourth IP address and the socket based on the address binding request after the address is modified. Through this design, after receiving an address binding request, the first computing device can modify the local IP address in the address binding request to a local IP address under the protocol stack supported by the second computing device. Thus, the first computing device can bind the modified local IP address and the socket, and then successfully access the second computing device based on the socket. It should be noted that in specific implementations, steps S403-S404 are optional; the target application may not initiate an address binding request, in which case the first...When establishing a connection with the second computing device, the computing device can select a fourth IP address from multiple IP addresses of the first computing device. The protocol to which the fourth IP address belongs is the same as the protocol supported by the second computing device. S405: Receive a connection request initiated by the target application. The connection request initiated by the target application is used to request the first computing device to establish a connection with the second computing device. The connection request includes a first IP address, which belongs to the first protocol stack. The target application can obtain the first IP address from the configuration file and generate a connection request based on the obtained first IP address. Optionally, the first IP address can be any IP address under the first protocol stack, that is, the first IP address in the connection request may not be the actual address of the second computing device. In an optional implementation, after receiving the connection request from the target application, the first computing device can determine whether the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address, wherein the second IP address is the IP address of the second computing device under the second protocol stack supported by the second computing device. After determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address, S406 is executed. S406: Modify the first IP address in the connection request to the second IP address according to the preset address mapping relationship. As described above, when the protocol stack supported by the first computing device is different from the protocol stack supported by the second computing device, the IP address of the second computing device in the connection request is not the actual IP address of the second computing device. Therefore, the first computing device needs to modify the IP address of the second computing device in the connection request. In this embodiment, the first computing device can modify the first IP address in the connection request to the second IP address according to the preset address mapping relationship. Specifically, the protocol to which the first IP address belongs is the same as the protocol supported by the first computing device, and the protocol stack to which the first IP address belongs is the first protocol stack; the protocol to which the second IP address belongs is the same as the protocol supported by the second computing device, and the second IP address is the IP address of the second computing device under the second protocol stack. For example, assuming the target application is an IPv4 application, the first IP address in the connection request is an IPv4 address, and the second computing device supports IPv6, then the modified second IP address of the first computing device is an IPv6 address. For example, assuming the target application is an IPv6 application and the first IP address in the connection request is an IPv6 address, while the second computing device supports IPv4, then the modified second IP address of the first computing device will be an IPv4 address. Through this design, the first computing device can modify the peer IP address in the connection request initiated by the target application to the actual IP address under the second computing device's protocol stack, ensuring that the first computing device can establish a connection with the second computing device based on the accurate IP address, thereby enabling the first computing device to access the network of the second computing device.S407: Establish a connection with the second computing device based on the socket and connection request. In an optional implementation, the first computing device can establish a connection with the second computing device based on the socket created based on the modified type parameters, according to the fourth IP address and the second IP address in the connection request. S408: Perform system call processing based on the second IP address. Optionally, the system call processing includes reading a message from the second computing device and / or sending a message to the second computing device. 10 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 Through the network access method provided in the embodiments of this application, when the first computing device receives a socket creation request from a target application, it can modify the type parameters of the socket to generate a socket that matches the protocol stack of the second computing device, and the first computing device can modify the target IP address in the connection request initiated by the target application to the IP address under the actual protocol stack of the second computing device, ensuring that the first computing device can establish a connection with the second computing device based on the accurate IP address. Based on the structure of the computing device shown in Figure 3, the network access method provided in this application embodiment will be further described below from the interaction of various modules in the first computing device. Figure 5 is a flowchart of a network access method provided in this application embodiment, which can be executed by a target application, a kernel network module, and a conversion module in the first computing device. Referring to Figure 5, the method includes the following steps: S501: The target application sends a first socket creation request to the kernel network module. The first socket creation request is used to request the creation of a socket for accessing the target application in the second computing device. For example, the target application is an IPv6 application, and the type parameter of the first socket creation request is AFJNET6. S502: The kernel network module sends the first socket creation request to the conversion module. Optionally, after receiving the first socket creation request, before modifying the type parameter of the first socket creation request, the conversion module can determine whether the target application belongs to a preset application list. After determining that the target application is included in the preset application list, S503 is executed. S503: The conversion module modifies the type parameter of the first socket creation request. For example, if the target application is an IPv6 application and the second computing device supports IPv4, the conversion module can modify the type parameter of the first socket creation request from AF INET6 to AF_INET. S504: The conversion module sends the modified first socket creation request to the kernel network module. S505: The kernel network module creates the socket according to the modified type parameter. S506: The kernel network module returns the execution result to the target application. S507: The target application sends an address binding request to the kernel network module.Optionally, the address binding request sent by the target application is used to request binding to the IP address of the first computing device. For example, the third IP address included in the address binding request is FE80::1234:2. S508: The kernel network module sends the address binding request to the conversion module. Optionally, after receiving the address binding request, the conversion module can determine whether the preset address mapping relationship includes a mapping relationship between the third IP address and the fourth IP address. After determining that the preset address mapping relationship includes a mapping relationship between the third IP address and the fourth IP address, S509 is executed. S509: The conversion module modifies the third IP address in the address binding request to the fourth IP address according to the preset address mapping relationship. For example, the conversion module modifies the third IP address FE80::1234::2 in the binding request to the fourth IP address 192.168.1.2. S510: The conversion module sends the modified address binding request to the kernel network module. S511: The kernel network module binds the fourth IP address and the socket according to the address binding request. S512: The kernel network module returns the execution result to the target application. S513: The target application sends a connection request to the kernel network module. Optionally, the connection request sent by the target application is used to request the first computing device to establish a connection with the second computing device. For example, the first IP address included in the connection request is FE80::1234::1:80. S514: The kernel network module sends the connection request to the conversion module. Optionally, after receiving the connection request, the conversion module can determine whether the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. After determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address, S515 is executed. S515: The conversion module modifies the first IP address in the connection request to the second IP address according to the preset address mapping relationship. For example, the conversion module modifies the first IP address FE80::1234::1:80 in the binding request to the second IP address 192.168.1.L. S516: The conversion module sends the modified connection request to the kernel network module. S517: The kernel network module establishes a connection with the second computing device based on the socket and connection request. S518: The kernel network module returns the execution result to the target application. S519: The target application sends a write request to the kernel network module. S520: The kernel network module sends a data packet to the second computing device according to the received write request. S521: The target application sends a read request to the kernel network module. S522: The kernel network module receives the data packet sent by the second computing device according to the received read request. (11 5 10 15 20 25 30 35 40 45 WO 2024 / 230431 PCT / CN2024 / 088116)Figure 6 is a flowchart of a network access method provided in an embodiment of this application. This method can be executed by a second computing device or in kernel mode within the second computing device. In this embodiment, the second computing device can listen to messages sent by a target application in other devices. Referring to Figure 6, the method includes the following steps: S601: Receiving a second socket creation request initiated by the target application. Optionally, the second socket creation request is used to request the creation of a socket for listening to messages sent by the target application in other devices. S602: Modifying the type parameter of the second socket creation request and creating the socket based on the modified type parameter. The second socket creation request includes the type parameter of the second socket creation request, and the second computing device can modify the type parameter of the second socket creation request. For example, if the type parameter of the second socket creation request is AF_INET, and the target application is an IPv6 application, then the second computing device can modify the type parameter of the second socket creation request to AF_INET6. As another example, if the type parameter of the second socket creation request is AF_INET6, and the target application is an IPv4 application, then the second computing device can modify the type parameter of the second socket creation request to AF_INET. The second computing device can create a socket based on the modified type parameter. For example, when the modified type parameter is AF_INET6, the second computing device can create an IPv6 socket; when the modified type parameter is AF_INET, the second computing device can create an IPv4 socket. S603: Receive an address binding request initiated by the target application. The address binding request is used to request binding to the IP address of the second computing device. In this embodiment, the address binding request includes a first IP address, which belongs to the first protocol stack. The target application can obtain the first IP address from the configuration file and generate an address binding request based on the obtained first IP address. Optionally, the first IP address can be the address of the second computing device under the first protocol stack; or the first IP address can be any IP address under the first protocol stack, meaning the first IP address in the address binding request may not be the actual address of the second computing device. In one optional implementation, after receiving the address binding request from the target application, the second computing device can determine whether the preset address mapping relationship includes a mapping relationship between the first TP address and the second IP address. If it is determined that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address, then S604 is executed. S604: Modify the first IP address in the address binding request to the second IP address according to the preset address mapping relationship, and bind the socket and the second IP address based on the address binding request. In one optional implementation, the second computing device can store the preset address mapping relationship, using the first protocol stack and the second protocol stack...Taking IPv4 and IPv6 as examples, the address mapping relationship can include the IPv4 address and IPv6 address of the second computing device. In this embodiment, IP addresses under other protocol stacks can be assigned to the second computing device. For example, assuming the second computing device initially supports IPv4, an IP address under IPv6 can be assigned to the second computing device, and the mapping relationship between the IPv4 address and IPv6 address of the second computing device can be stored. In some embodiments, when the target application in the second computing device initiates an address binding request, it can obtain the first IP address of the second computing device from the configuration file. If the first IP address in the configuration file is a pre-configured fake address under the first protocol stack, the address mapping relationship can store the mapping relationship between the fake address and the real address of the second computing device under the second protocol stack. If the first IP address in the configuration file is the real address of the second computing device under the first protocol stack, the address mapping relationship can store the mapping relationship between the real address of the second computing device under the first protocol stack and the real address of the second computing device under the second protocol stack. The second computing device can modify the first IP address in the address binding request to the second IP address according to the preset address mapping relationship. The second IP address is the IP address of the second computing device under the second protocol stack. For example, assuming the first IP address in the address binding request is an IPv4 address, and the target application is an IPv6 application, then the modified second IP address of the second computing device is the IPv6 address of the second computing device. As another example, assuming the first IP address in the address binding request is an IPv6 address, and the target application is an IPv4 application, then the modified second IP address of the second computing device is the IPv4 address of the second computing device. The second computing device can bind the socket and the second IP address according to the modified address binding request, thereby enabling the second computing device to listen for messages with the target address being the second IP address, ensuring that the second computing device can successfully accept network access initiated by the first computing device. S605: Perform system call processing based on the second IP address. Optionally, the system call processing includes reading messages from the first computing device of the target application, and / or sending messages to the first computing device of the target application. 12 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 Through the network access method provided in the embodiments of this application, the second computing device can modify the socket type parameter when receiving the socket creation request of the target application, thereby generating a socket that matches the protocol stack of the first computing device, and the second computing device can modify the server IP address in the binding request initiated by the target application to the IP address under the protocol stack of the first computing device, so as to ensure that the second computing device can interact with the first computing device of the target application.Based on the structure of the computing device shown in Figure 3, the network access method provided in this application embodiment will be further described below from the interaction of various modules in the second computing device. Figure 7 is a flowchart of a network access method provided in this application embodiment, which can be executed by a target application, a kernel network module, and a conversion module in the second computing device. Referring to Figure 7, the method includes the following steps: S701: The target application sends a second socket creation request to the kernel network module. The second socket creation request is used to request the creation of a socket for listening to messages sent by the target application in other devices. For example, the second computing device supports IPv4, and the type parameter of the second socket creation request is AF_INET. S702: The kernel network module sends the second socket creation request to the conversion module. Optionally, after receiving the second socket creation request, before modifying the type parameter of the second socket creation request, the conversion module can determine whether the target application belongs to a preset application list. After determining that the target application is included in the preset application list, S703 is executed. S703: The conversion module modifies the type parameter of the second socket creation request. For example, if the second computing device supports IPv4 and the target application is an IPv6 application, the conversion module can modify the type parameter of the second socket creation request from AF_INET to AF_INET6. S704: The conversion module sends the modified second socket creation request to the kernel network module. S705: The kernel network module creates the socket according to the modified type parameter. S706: The kernel network module returns the execution result to the target application. S707: The target application sends an address binding request to the kernel network module. Optionally, the address binding request sent by the target application is used to request binding the IP address of the second computing device. For example, the first IP address included in the address binding request is 192.168.1.L. S708: The kernel network module sends the address binding request to the conversion module. Optionally, after receiving the address binding request, the conversion module can determine whether the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address. After determining that the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address, S709 is executed. S709: The conversion module modifies the first IP address in the address binding request to the second IP address according to the preset address mapping relationship. For example, the conversion module modifies the first IP address 192.168.L1 in the binding request to the fourth IP address FE80::1234::L. S710: The conversion module sends the modified address binding request to the kernel network module. S711: The kernel network module binds the socket and the second IP address based on the address binding request. S712: The kernel network module returns the execution result to the target application. S713: The target application sends a read request to the kernel network module.S714: The kernel network module receives the data packet sent by the first computing device according to the received read request. S715: The target application sends a write request to the kernel network module. S716: The kernel network module sends a data packet to the first computing device according to the received write request. II. Dual-Stack Scenario The dual-stack scenario in this embodiment refers to the first computing device initially supporting both IPv4 and IPv6 protocols. Figure 8 is a flowchart of a network access method provided in this embodiment. This method can be executed by the first computing device or the kernel mode within the first computing device. In this embodiment, the first computing device receives a request initiated by the target application to access the target application in the second computing device. Referring to Figure 8, the method includes the following steps: S801: Receive a first socket creation request initiated by the target application, and create a first socket according to the first socket creation request. The first socket creation request is used to request the creation of a socket for accessing the target application in the second computing device. The target application is one of the applications in a pre-configured application list stored by the first computing device. This application in the pre-configured application list may be on a different protocol stack than the second computing device that the application requests to connect to. The first computing device needs to monitor the system call requests initiated by the target application. Since the first computing device supports both IPv4 and IPv6 dual stacks in this embodiment, when it receives the first socket creation request initiated by the target application, it cannot determine the IP address of the second computing device that the target application requests to connect to, and therefore cannot determine whether socket type conversion and network address translation are required. The first computing device needs to wait until it receives the connection request initiated by the target application before determining whether socket type conversion and network address translation are required based on the IP address of the second computing device in the connection request. S802: Receive the connection request initiated by the target application. The connection request is used to request the establishment of a connection with the second computing device, and the connection request includes the first IP address. The first IP address belongs to the first protocol stack. The target application can obtain the first IP address from the configuration file and generate a connection request based on the obtained first IP address. Optionally, the first IP address can be any IP address under the first protocol stack, that is, the first IP address in the connection request may not be the actual address of the second computing device. S803: Determine whether the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address. In an optional implementation, the first computing device stores the preset address mapping relationship. When the first computing device receives a connection request, it can obtain the first IP address in the connection request and check whether the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address.The IP address mapping relationship, where the second IP address is the IP address of the second computing device under the second protocol stack supported by the second computing device. If the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address, it means that the first computing device needs to perform address conversion processing in the connection request. S804: Close the first socket and generate a third socket creation request. Optionally, the first computing device can close the first socket created in S801 and generate a third socket creation request. The index of the third socket creation request is the same as the index of the first socket creation request, and the type parameter of the third socket creation request is different from the type parameter of the first socket creation request. In an optional implementation, when creating a new socket creation request, since the kernel always allocates the process with the smallest index in the current process, the first computing device needs to generate socket creation requests sequentially according to the index arrangement until a third socket creation request with the same index as the first socket creation request is generated. After generating the third socket creation request, the first computing device can close other useless socket creation requests. Furthermore, the type parameter of the third socket creation request generated by the first computing device is different from the type parameter of the first socket creation request, and the protocol stack corresponding to the type parameter of the third socket creation request is the same as the protocol stack supported by the second computing device. For example, when the type parameter of the first socket creation request is AF INET, the type parameter of the third socket creation request is AF INET6; when the type parameter of the first socket creation request is AF INET6, the type parameter of the third socket creation request is AF-INET. Optionally, in this embodiment, the index of the socket creation request can be a file descriptor. S805: Create a second socket according to the third socket creation request. In this embodiment, the type parameter of the third socket creation request generated by the first computing device is different from the type parameter of the first socket creation request, and the protocol stack corresponding to the third socket creation request is the same as the protocol stack supported by the second computing device. The first computing device can create a second socket according to the third socket creation request, thereby ensuring that the protocol stack corresponding to the type parameter of the second socket is the protocol stack supported by the second computing device, so that the first computing device can access the second computing device through the network based on the second socket. S806: Modify the first IP address in the connection request to the second IP address according to a preset address mapping relationship. In this embodiment, the first computing device can modify the first IP address in the connection request to the second IP address according to a preset address mapping relationship. The second IP address is the IP address of the second computing device under the second protocol stack. For example, assuming the target application is an IPv4 application, and the first IP address in the connection request is an IPv4 address, the second computing device...If the first computing device supports IPv6, then the modified second IP address of the first computing device is an IPv6 address. For example, assuming the target application is an IPv6 application, the first IP address in the connection request is an IPv6 address, and the second computing device supports IPv4, then the modified second IP address of the first computing device is an IPv4 address. Through the network access method provided in this application embodiment, since the index of the third socket creation request is the same as the index of the first socket creation request, after the first computing device generates the second socket and modifies the address in the connection request, it can continue the original connection request process based on the second socket and the modified second IP address in the connection request, thereby establishing a connection with the second computing device and realizing network access to the second computing device. 14 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 S807: Establishing a connection with the second computing device based on the second socket and the connection request. In an optional implementation, the first computing device can select a fourth IP address from multiple IP addresses of the first computing device, wherein the protocol of the fourth IP address is the same as the protocol supported by the second computing device of the target application. The first computing device can establish a connection with the second computing device based on the second socket according to the fourth IP address and the second IP address in the connection request. S808: Perform system call processing based on the second IP address. Optionally, the system call processing includes reading a message from the second computing device and / or sending a message to the second computing device. Through the network access method provided in the embodiments of this application, when the first computing device supports dual stack, when the first computing device determines that the preset address mapping relationship includes the target IP address requested by the connection request, it generates a new socket creation request and converts the IP address of the second computing device, ensuring that the first computing device can accurately identify the service that needs network address translation and establish a connection with the second computing device based on the accurate IP address. Based on the structure of the computing device shown in Figure 3, the network access method provided in the embodiments of this application will be further described below from the interaction of various modules in the first computing device. Figure 9 is a flowchart of a network access method provided in an embodiment of this application. This method can be executed by a target application, a kernel network module, and a conversion module in a first computing device. Referring to Figure 9, the method includes the following steps: S901: The target application sends a first socket creation request to the kernel network module. The first socket creation request is used to request the creation of a socket for accessing the target application in a second computing device. For example, if the target application is an IPv6 application, the type parameter of the first socket creation request is AF_TNET6. S902: The kernel network module creates the first socket according to the first socket creation request. S903: The target application sends a connection request to the kernel network module.Optionally, the connection request sent by the target application is used to request the first computing device to establish a connection with the second computing device. For example, the first IP address included in the connection request is 192.168.1.E. S904: The kernel network module sends the connection request to the conversion module. S905: The conversion module determines that the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address. S906: The conversion module sends an acknowledgment message to the kernel network module. S907: The kernel network module closes the first socket and generates a third socket creation request. The index of the third socket creation request is the same as the index of the first socket creation request, and the type parameter of the third socket creation request is different from the type parameter of the first socket creation request. S908: The kernel network module generates a second socket based on the third socket creation request. S909: The conversion module modifies the first IP address in the connection request to the second IP address according to the preset address mapping relationship. For example, the conversion module modifies the first IP address 192.168.L1 in the binding request to the second IP address FE80::1234::l:80. S910: The conversion module sends the modified connection request to the kernel network module. S911: The kernel network module establishes a connection with the second computing device based on the second socket and the connection request. S912: The kernel network module returns the execution result to the target application. S913: The target application sends a write request to the kernel network module. S914: The kernel network module sends a data packet to the second computing device according to the received write request. S915: The target application sends a read request to the kernel network module. S916: The kernel network module receives the data packet sent by the second computing device according to the received read request. Furthermore, in some embodiments, the network access method provided in this application can also be applied to network access between devices with multiple IP addresses under the same IP protocol stack. For example, embodiments of this application can also be used to implement network address translation between IPv4 addresses or between IPv6 addresses. In this embodiment, the translation module also needs to pre-store the address mapping relationship and perform network address translation based on the address mapping relationship. Specific implementation details can be found in the above embodiments and will not be repeated here. Based on the above embodiments, this application also provides a computing device 1000. As shown in FIG10, the computing device 1000 includes: a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. The processor 1004, the memory 1006, and the communication interface 1008 communicate via the bus 1002. The computing device 1000 can be a second computing device or a first computing device, and can be used to execute the functions performed by the second computing device or the first computing device in the network access method provided in the embodiments of this application. It should be understood that this application does not limit the 155 in the computing device 1000.10 15 20 25 30 35 40 45 WO 2024 / 230431 PCT / CN2024 / 088116 Number of processors and memories. Bus 1002 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, only one line is used in Figure 10, but this does not mean that there is only one bus or one type of bus. Bus 1002 can include a path for transmitting information between various components of computing device 1000 (e.g., memory 1006, processor 1004, communication interface 1008). Processor 1004 can include any one or more of processors such as a central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP). Memory 1006 may include volatile memory, such as random access memory (RAM). Processor 1004 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). It should be noted that the memory used in the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory. Executable program code is stored in memory 1006, and processor 1004 executes this executable program code to implement the functions performed by the aforementioned first computing device or second computing device, thereby implementing the network access method provided in this application embodiment. That is, instructions for executing the network access method are stored in memory 1006. For example, memory 1006 in computing device 1000 stores instructions for executing the functions of the kernel network module and the translation module. Communication interface 1008 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to realize communication between computing device 1000 and other devices or communication networks. This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can...The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone. As shown in FIG11, the computing device cluster includes at least one computing device 1000. The memory 1006 of one or more computing devices 1000 in the computing device cluster may store the same instructions for executing the methods of the embodiments of this application. In some possible implementations, the memory 1006 of one or more computing devices 1000 in the computing device cluster may also store partial instructions for executing the methods of the embodiments of this application. In other words, a combination of one or more computing devices 1000 can jointly execute the instructions for executing the methods of the embodiments of this application. It should be noted that the memory 1006 of different computing devices 1000 in the computing device cluster may store different instructions, which are respectively used to execute partial functions executed by the first computing device or the second computing device in the above method embodiments. That is, the instructions stored in the memory 1006 of different computing devices 1000 can implement the functions of one or more modules in the first computing device or the functions of one or more modules in the second computing device. In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 12 illustrates one possible implementation. As shown in Figure 12, two computing devices 1000A and 1000B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 1006 in computing device 1000A stores instructions for executing the functions of the kernel network module. Simultaneously, the memory 1006 in computing device 1000B stores instructions for executing the functions of the translation module. This application also provides another computing device cluster. The connection relationship between the computing devices in this cluster can be similarly referenced to the connection methods of the computing device clusters shown in Figures 11 and 12. The difference is that the memory 1006 in one or more computing devices 1000 in this cluster can store the same instructions for executing network access methods. In some possible implementations, the memory 1006 of one or more computing devices 1000 in the computing device cluster may also store partial instructions for executing network access methods. In other words, a combination of one or more computing devices 1000 can jointly execute instructions for executing network access methods. Based on the above embodiments, this application also provides a computer program that, when run on a computer, causes the computer to execute the methods described in the embodiments of this application.Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods described in the embodiments of this application. Based on the above embodiments, this application also provides a chip for reading a computer program stored in a memory to implement the methods described in the embodiments of this application. 16 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the methods described in the embodiments of this application. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. The chip system may be composed of chips or may include chips and other discrete devices. Those skilled in the art should understand that the embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowchart illustrations and / or one or more block diagrams. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of a block diagram.Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of protection of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations. 17 5 10 15 20 25 30 35 40 45 Claims WO 2024 / 230431 PCT / CN2024 / 088116 1. A network access method, characterized in that the method comprises: receiving a first socket creation request initiated by a target application in a first computing device, the first socket creation request being used to request the creation of a socket for accessing a target application in a second computing device; modifying a type parameter of the first socket creation request, and creating a socket based on the modified type parameter; the protocol stack corresponding to the modified type parameter is the same as the protocol stack supported by the second computing device; receiving a connection request initiated by a target application in the first computing device, the connection request being used to request the establishment of a connection with the second computing device, the connection request including a first Internet Protocol (IP) address; modifying the first IP address in the connection request to a second IP address according to a preset address mapping relationship; the first IP address belongs to a first protocol stack, and the second IP address is the IP address of the second computing device under a second protocol stack supported by the second computing device; 2. The method as described in claim 1, characterized in that, after creating the socket based on the modified type parameters and before receiving the connection request initiated by the target application in the first computing device, the method further includes: receiving an address binding request initiated by the target application in the first computing device, the address binding request including a third IP address; modifying the third IP address in the address binding request to a fourth IP address according to a preset address mapping relationship; binding the fourth IP address and the socket according to the address binding request; wherein, the third IP address belongs to a first protocol stack, and the fourth IP address is the TP address of the first computing device under the second protocol stack; the step of establishing a connection with the second computing device based on the socket and the connection request includes: establishing a connection with the second computing device based on the socket according to the fourth IP address and the second IP address in the connection request. 3. The method as described in claim 2, characterized in that, after receiving the address binding request initiated by the target application and before modifying the first IP address in the address binding request to the second IP address according to a preset address mapping relationship, the method further includes: determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. 4.5. The method as described in claim 1, wherein establishing a connection with the second computing device based on the socket and the connection request comprises: selecting a fourth IP address from a plurality of IP addresses of the first computing device, the fourth IP address and the second IP address belonging to the same protocol stack; establishing a connection with the second computing device based on the socket according to the fourth IP address and the second IP address in the connection request. 6. The method as described in any one of claims 1-4, wherein after receiving the first socket creation request initiated by the target application and before modifying the type parameter of the first socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. 7. The method as described in claim 5, wherein the preset application list is pre-configured by the system or user-defined; the preset address mapping relationship is pre-configured by the system or user-defined. 7. The method according to any one of claims 1-6, characterized in that, after receiving a connection request initiated by a target application in the first computing device, and before modifying the first IP address in the connection request to a second IP address according to a preset address mapping relationship, the method further includes: determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. 18 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 8. The method according to any one of claims 1-7, characterized in that, after establishing a connection with the second computing device based on the socket and the connection request, the method further includes: performing system call processing based on the second IP address; the system call processing includes reading messages from the second computing device, and / or sending messages to the second computing device. 9. The method according to any one of claims 1-8, wherein the first protocol stack is an IPv4 protocol stack and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack and the second protocol stack is an IPv4 protocol stack. 10. A network access method, comprising: receiving a second socket creation request initiated by a target application in a second computing device, the second socket creation request being used to request the creation of a socket for listening to messages sent by the target application in other devices; modifying the type parameter of the second socket creation request, and creating a socket based on the modified type parameter; wherein the protocol stack corresponding to the modified type parameter is the same as the protocol stack supported by the first computing device corresponding to the target application;The method comprises: receiving an address binding request initiated by a target application in the second computing device, the address binding request including a first Internet Protocol (IP) address; modifying the first IP address in the address binding request to a second IP address according to a preset address mapping relationship; the first IP address belongs to a first protocol stack, and the second IP address is the IP address of the second computing device under the second protocol stack; the second protocol stack is the protocol stack supported by the first computing device corresponding to the target application; and binding the socket and the second IP address according to the address binding request. 11. The method of claim 10, wherein after receiving a second socket creation request initiated by the target application in the second computing device and before modifying the type parameter of the second socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. 12. The method of claim 11, wherein the preset application list is pre-configured by the system or user-defined; and the preset address mapping relationship is pre-configured by the system or user-defined. 13. The method of any one of claims 10-12, characterized in that, after receiving the address binding request initiated by the target application in the second computing device, and before modifying the first IP address in the address binding request to the second IP address according to a preset address mapping relationship, the method further includes: determining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. 14. The method of any one of claims 10-13, characterized in that, after binding the socket and the second IP address according to the address binding request, the method further includes: performing system call processing based on the second IP address; the system call processing includes reading a message from the first computing device, and / or sending a message to the first computing device. 15. The method of any one of claims 10-14, characterized in that, the first protocol stack is an IPv4 protocol stack and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack and the second protocol stack is an IPv4 protocol stack. 16. A network access method, characterized in that the method comprises: receiving a first socket creation request initiated by a target application in a first computing device, the first socket creation request being used to request the creation of a socket for accessing the target application in a second computing device; creating a first socket according to the first socket creation request; receiving a connection request initiated by the target application in the first computing device, the connection request being used to request connection with the second computing device.25 30 35 40 45 Establish a connection, the connection request including a first Internet Protocol (IP) address; the first IP address belongs to a first protocol stack; Determine a preset address mapping relationship including a mapping relationship between the first IP address and a second IP address; the second IP address is the IP address of the second computing device under the second protocol stack supported by the second computing device; Close the first socket, generate a third socket creation request, the index of the third socket creation request is the same as the index of the first socket creation request, and the type parameter of the third socket creation request is different from the type parameter of the first socket creation request, the protocol stack corresponding to the type parameter of the third socket creation request is the same as the protocol stack supported by the second computing device; Create a second socket according to the third socket creation request; Modify the first IP address in the connection request to the second IP address according to the preset address mapping relationship; the protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device; Establish a connection with the second computing device based on the second socket and the connection request. 17. The method of claim 16, wherein before generating the third socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. 18. The method of claim 17, wherein the preset application list is pre-configured by the system or user-defined; the preset address mapping relationship is pre-configured by the system or user-defined. 19. The method of any one of claims 16-18, wherein after establishing a connection with the second computing device based on the second socket and the connection request, the method further comprises: performing system call processing based on the second IP address; the system call processing includes reading messages from the second computing device and / or sending messages to the second computing device. 20. The method of any one of claims 16-19, wherein generating the third socket creation request comprises: generating socket creation requests sequentially according to index order until the third socket creation request is generated. 21. A computing device, characterized in that the computing device comprises: a kernel network module, configured to receive a first socket creation request initiated by a target application, the first socket creation request being used to request the creation of a socket for accessing the target application in a second computing device; a conversion module, configured to modify a type parameter of the first socket creation request, the modified type parameter corresponding to a protocol stack that is the same as a protocol stack supported by the second computing device; the kernel network module is further configured to create a socket based on the modified type parameter; and receive a connection request initiated by the target application.The connection request is used to request the establishment of a connection with the second computing device. The connection request includes a first Internet Protocol (IP) address, which belongs to a first protocol stack. The conversion module is further used to modify the first IP address in the connection request to a second IP address according to a preset address mapping relationship. The second IP address is the IP address of the second computing device under a second protocol stack supported by the second computing device. The kernel network module is further used to establish a connection with the second computing device based on the socket and the connection request. 22. The device as described in claim 21, wherein the kernel network module is further configured to: after creating a socket based on the modified type parameters, and before receiving a connection request initiated by the target application, receive an address binding request initiated by the target application, the address binding request including a third IP address, the third IP address belonging to the first protocol stack; the conversion module is further configured to: modify the third IP address in the address binding request to a fourth IP address according to a preset address mapping relationship; the fourth IP address is the IP address of the first computing device under the second protocol stack; the kernel network module is further configured to: bind the fourth IP address and the socket according to the address binding request; when the kernel network module establishes a connection with the second computing device based on the socket and the connection request, it is specifically configured to: establish a connection with the second computing device based on the socket according to the fourth IP address and the second IP address in the connection request. 20 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 23. The device as claimed in claim 22, wherein the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the third IP address in the address binding request to the fourth IP address according to the preset address mapping relationship, determine that the preset address mapping relationship includes the mapping relationship between the third IP address and the fourth IP address. 24. The device as claimed in claim 21, wherein the kernel network module is specifically configured to: select a fourth IP address from multiple IP addresses of the computing device, wherein the fourth IP address and the second IP address belong to the same protocol stack; establish a connection with the second computing device based on the socket according to the fourth IP address and the second IP address in the connection request. 25. The device according to any one of claims 22-24, wherein the conversion module is further configured to: after receiving the first socket creation request initiated by the target application, and before modifying the type parameter of the first socket creation request,The device is determined to belong to a preset application list, wherein the applications in the preset application list are applications that require network address translation. 26. The device according to any one of claims 21-25, wherein the translation module is further configured to: after receiving a connection request initiated by the target application, and before modifying the first IP address in the connection request to a second IP address according to a preset address mapping relationship, determine that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. 27. The device according to any one of claims 21-26, wherein the kernel network module is further configured to: after establishing a connection with the second computing device based on the socket and the connection request, perform system call processing according to the second IP address; the system call processing includes reading messages from the second computing device and / or sending messages to the second computing device. 28. A computing device, characterized in that the computing device comprises: a kernel network module, configured to receive a second socket creation request initiated by a target application, the second socket creation request being used to request the creation of a socket for listening to messages sent by the target application in other devices; a conversion module, configured to modify a type parameter of the second socket creation request, wherein the modified type parameter corresponds to a protocol stack that is the same as a protocol stack supported by a first computing device; the kernel network module is further configured to create a socket based on the modified type parameter; receive an address binding request initiated by the target application, the address binding request including a first server Internet Protocol (IP) address; the conversion module is further configured to modify the first IP address in the address binding request to a second IP address according to a preset address mapping relationship; the first IP address belongs to a first protocol stack, the second IP address is the IP address of the second computing device under the second protocol stack; the second protocol stack is a protocol stack supported by the first computing device corresponding to the target application; the kernel network module is further configured to bind the socket and the second IP address according to the address binding request. 29. The device of claim 28, wherein the kernel network module is further configured to: after receiving a second socket creation request initiated by a target application and before modifying the type parameter of the second socket creation request, determine that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. 30. The device of claim 28 or 29, wherein the translation module is further configured to: after receiving an address binding request initiated by the target application and before modifying the first IP address in the address binding request to a second IP address according to a preset address mapping relationship, determine that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address. 31.The device as described in any one of claims 28-30, wherein the kernel network module is further configured to: 21 WO 2024 / 230431 PCT / CN2024 / 088116 5 10 15 20 25 30 35 40 45 After binding the socket and the second IP address according to the address binding request, perform system call processing according to the second IP address; the system call processing includes reading messages from the first computing device, and / or sending messages to the first computing device. 32. A computing device, characterized in that the computing device comprises: a kernel network module, configured to receive a first socket creation request initiated by a target application, the first socket creation request being used to request the creation of a socket for accessing the target application in a second computing device; create a first socket according to the first socket creation request; receive a connection request initiated by the target application, the connection request being used to request establishing a connection with the second computing device, the connection request including a first server Internet Protocol (IP) address, the first IP address belonging to a first protocol stack; determine a preset address mapping relationship including a mapping relationship between the first IP address and a second IP address, the second IP address being the IP address of the second computing device under a second protocol stack supported by the second computing device; close the first socket; generate a third socket creation request, the index of the third socket creation request being the same as the index of the first socket creation request, and the type parameter of the third socket creation request being different from the type parameter of the first socket creation request, the protocol stack corresponding to the type parameter of the third socket creation request being the same as the protocol stack supported by the second computing device; and create a second socket according to the third socket creation request. A conversion module is used to modify the first IP address in the connection request to a second IP address according to the preset address mapping relationship; the protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device; the kernel network module is further used to: establish a connection with the second computing device based on the second socket and the connection request. 33. The device as described in claim 32, wherein the conversion module is further used to: determine, before generating a third socket creation request, that the target application belongs to a preset application list, wherein the applications in the preset application list are applications that require network address translation. 34. The device as described in claim 32 or 33, wherein the kernel network module is further used to: after establishing a connection with the second computing device based on the second socket and the connection request, perform system call processing based on the second IP address; the system call processing includes reading messages from the second computing device, and / or sending messages to the second computing device. 3536. A device as claimed in any one of claims 32-34, wherein the kernel network module is specifically configured to: generate socket creation requests sequentially according to the index arrangement order until the third socket creation request is generated. 37. A computing device, wherein the computing device includes a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the computing device to perform the method as claimed in any one of claims 1-9, or the method as claimed in any one of claims 10-15, or the method as claimed in any one of claims 16-20. 38. A computing device cluster, comprising at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to perform the method as claimed in any one of claims 1-9, or the method as claimed in any one of claims 10-15, or the method as claimed in any one of claims 16-20. 38. A computer program product comprising instructions, characterized in that, when the instructions are executed by a computing device, the computing device performs the method as claimed in any one of claims 1-9, or the method as claimed in any one of claims 10-15, or the method as claimed in any one of claims 16-20. 39. A computer-readable storage medium, characterized in that it comprises computer program instructions, which, when executed by a computing device, perform the method as claimed in any one of claims 1-9, or the method as claimed in any one of claims 10-15, or the method as claimed in any one of claims 16-20. 22 WO 2024 / 230431 PCT / CN2024 / 088116 First Computing Device Second Computing Device Figure 1 IPv4 Gateway IPv4 Device Figure 2 Computing Device APP1 APP2 APP3 , ~ ~ ~ [Conversion Management Module\1_________ __________ User-mode System Call' * [System Call Actual Execution Function' Kernel Network Module, ------- , —Application List and Conversion Type 4 Conversion Module T— k--------------1 1—Address Mapping Relationship Figure 3 1 / 9 WO 2024 / 230431 PCT / CN2024 / 088116 Figure 4 2 / 9 WO 2024 / 230431 PCT / CN2024 / 088116 Figure 5 3 / 9 WO 2024 / 230431 PCT / CN2024 / 088116 Figure 6 4 / 9 WO 2024 / 230431 PCT / CN2024 / 088116 Figure 7 5 / 9 WO2024 / 230431 PCT / CN2024 / 088116 Figure 8 6 / 9 WO 2024 / 230431 PCT / CN2024 / 088116 Figure 9 7 / 9 WO 2024 / 230431 PCT / CN2024 / 088116 Figure 10 Figure 11 8 / 9 WO 2024 / 230431 PCT / CN2024 / 088116 ZI Zun9 / 9 INTERNATIONAL SEARCH REPORT International application No. PCT / CN2024 / 088116 A. CLASSIFICATION OF SUBJECT MATTER H04L 69 / 16(2022.01)1 According to International Patent Classification (IPC) or to both national classification and IPC B. FIELDS SEARCHED Minimum documentation searched (classification system (followed by classification symbols) IPC:H04L Documentation searched other than minimum documentation to the extent that such documents are included in the fields searched Electronic database consulted during the international search (name of database and, where practicable, search terms used) CNTXT, ENTXT, DWPI, CNKI, IEEE: IP, address, access, change, update, establish, create, parameter, listen, bind, second type, conversion, connection, application, target, socket, call, protocol, modify, map, IPv4, IPv6, INET, socket, mapping, address, modif+, transfer, listen C. DOCUMENTS CONSIDERED TO BE RELEVANT Category* Citation of document,with indication, where appropriate, of the relevant passages Relevant to claim No. X US 2022012110 Al (NETFLIX, INC.) 13 January 2022 (2022-01-13) description, paragraphs 47-130 1-9, 21-27, 36-39 Y US 2022012110 Al (NETFLIX, INC.) 13 January 2022 (2022-01-13) description, paragraphs 47-130 10-15,28-31 Y US 2014079066 Al (HON HAI PRECISION INDUSTRY CO., LTD.) 20 March 2014 (2014-03-20) description, paragraphs 15-39 10-15,28-31 A US 2022012110 Al (NETFLIX, INC.) 13 January 2022 (2022-01-13) description, paragraphs 47-130 16-20, 32-35 A CN 104639578 A (HUAWEI TECHNOLOGIES CO., LTD.) 20 May 2015 (2015-05-20) entire document 1-39 A CN 112187964 A (BEUING SANKUAI ONLINE TECHNOLOGY CO., LTD.) 05 January 2021 (2021-01-05) entire document 1-39 | | Further documents are listed in the continuation of Box C. | / 1 See patent family annex. * Special categories of cited documents: “T" later document published after the international filing date or priority “A" document defining the general state ofthe art which is not considered date and not in conflict with the application but cited to understand the to be of paiticulai' relevance principle or theory underlying the invention "D” document cited by the applicant in the international application “χ” document of particular relevance; the claimed invention cannot be “E” eailier application or patent but published on or after the international considered novel or cannot be considered to involve an inventive step filing date when the document is taken alone “L" document which may thi'ow doubts on priority claim(s) or which is “Y" document of paiticulai' relevance; the claimed invention cannot be cited to establish the publication date of another citation or other considered to involve an inventive step when the document is special reason (as specified) combined with one or more other such documents, such combination "O” document refen'ing to an oral disclosure, use, exhibition or other being obvious to a person skilled in the artmeans document member of the same patent family "P” document published prior to the international filing date but later than the priority date claimed Date of the actual completion of the international search 04 July 2024 Date of mailing of the international search report 18 July 2024 Name and mailing address of the ISA / CN China National Intellectual Property Administration (ISA / CN) China No. 6, Xitucheng Road, Jimenqiao, Haidian District, Beijing 100088 Authorized officer Telephone No. Form PCT / ISA / 210 (second sheet) (July 2022) INTERNATIONAL SEARCH REPORT International application No. PCT / CN2024 / 088116 C. DOCUMENTS CONSIDERED TO BE RELEVANT Category* Citation of document, with indication, where appropriate, of the relevant passages Relevant to claim No. A US 2014156857 Al (INTERNATIONAL BUSINESS MACHINES CORP.) 05 June 2014 (2014-06-05) entire document 1-39 Form PCT / ISA / 210 (second sheet) (July 2022) INTERNATIONAL SEARCH REPORT Information on patent family members PCT / CN2024 / 088116International application No. Patent document cited in search report Publication date (day / month / year) Patent family member(s) Publication date (day / month / year) US 2022012110 Al 13 January 2022 None US 2014079066 Al 20 March 2014 TW 201414253 A 01 April 2014 CN 104639578 A 20 May 2015 WO 2015067118 Al 14 May 2015 CN 112187964 A 05 January 2021 None US 2014156857 Al 05 June 2014 WO 2014087285 Al 12 June 2014 US 2014156855 Al 05 June 2014 Form PCT / ISA / 210 (Patent Family Annex) (July 2022) International Application No. PCT / CN2024 / 088116 International Search Report A. Subject Classification H04L 69 / 16 (2022.01) 1 Classified according to the International Patent Classification (IPC) or both national classification and IPC classification. B. Minimum Documents Searched in the Search Field (Indicate classification system and classification number) IPC:H04L Electronic databases consulted during the international search, excluding the minimum documents included in the search field (database name and search terms used, if applicable) CNTXT,ENTXT,DWPI,CNKI,IEEE:IP, address, access, change, update, establish, create, parameter, listen, bind, second, type, conversion, connection, application, target, socket, call, protocol, modify, map, IPv4, IPv6, INET, socket, mapping, address, modify, transfer, listen c. Related File Types* References, where necessary, specify the relevant paragraphs and claims. X US 2022012110 A1 (NETFLIX, INC.) January 13, 2022 (2022-01-13) Specification, paragraphs 47-130, 1-9, 21-27, 36-39 Y US 2022012110 A1(NETFLIX,INC.) January 13, 2022 (2022-01-13) Specification Section 47-130, Sections 10-15, 28-31 Y US 2014079066 A1 (HON HAI PRECISION INDUSTRY CO., LTD.) March 20, 2014 (2014-03-20) Specification Section 15-39, Sections 10-15, 28-31 A US 2022012110 A1 (NETFLIX,INC.) January 13, 2022 (2022-01-13) Specification Section 47-130, Sections 16-20, 32-35 A CN 104639578 A (Huawei Technologies Co., Ltd.) May 20, 2015 (2015-05-20) Full text 1-39 A CN 112187964 A (Beijing Sankuai Online Technology Co., Ltd.) January 5, 2021 (2021-01-05) Full text 1-39 The remaining documents are listed on the continuation page in column C. *Specific types of cited documents: "A" Documents that are considered not particularly relevant and represent the general state of the prior art "D" Documents cited by the applicant in an international application "E" Prior applications or patents published on or after the international filing date "L" Documents that may raise doubt about the priority claim, or documents cited to determine the publication date of another cited document or for other specific reasons (as specifically stated) Documents involving disclosure, use, exhibition or other means of disclosure "P" Documents published before the international filing date but later than the claimed priority date See the patent family appendix. "A document published after the claim date or priority date, which does not conflict with the application, but is particularly different from the subsequent document for understanding the inventive theory or principle, is considered alone and the claimed invention is deemed not novel or inventive. A document particularly related to "Y" is also considered when the document is not combined with any of the other documents of the same class and such combination is obviously excessive to those skilled in the art. The claimed invention is not inventive. International search of patent family documents: Date of actual completion: July 4, 2024. Name and mailing address of ISA / CN: China National Intellectual Property Administration, No. 6, Tucheng Road, Xijimenqiao, Haidian District, Beijing 100088, China. International search report mailing date: July 18, 2024. Authorized officer: Hou Yanlan. Telephone number: (+86) 010-53961644. PCT / ISA / 210 Form (Page 2) (July 2022) International Search Report International Application No. PCT / CN2024 / 088116 C. Related Document Types* Referenced documents, specifying relevant paragraphs and claims where necessary.US 2014156857 A1 (INTERNATIONAL BUSINESS MACHINES CORPORATION) June 5, 2014 (2014-06-05) Full text 1-39 PCT / ISA / 210 Form (Page 2) (July 2022) International Application Number PCT / CN2024 / 088116 International Search Report Information Search Report on Patent Family Publication Date of Referenced Patent Documents (Year / Month / Day) Publication Date of Patent Family (Year / Month / Day) US 2022012110 A1 January 13, 2022 None US 2014079066 A1 March 20, 2014 TW 201414253 A April 1, 2014 CN 104639578 A May 20, 2015 WO 2015067118 Al May 14, 2015 CN 112187964 A January 5, 2021 No US 2014156857 Al June 5, 2014 WO 2014087285 Al June 12, 2014 US 2014156855 Al June 5, 2014 PCT / ISA / 210 Form (Appendix to Patent Family) (July 2022) (19) *EP004694092A1* (11) EP 4 694 092 A1 (12) EUROPEAN PATENT APPLICATION published in accordance with Art. 153(4) EPC (43) Date of publication: 11.02.2026 Bulletin 2026 / 07 (21) Application number: 24802717.9 (22) Date of filing: 16.04.2024 (51) International Patent Classification (IPC): H04L 69 / 16 (2022.01) (52) Cooperative Patent Classification (CPC): H04L 67 / 141; H04L 69 / 08; H04L 69 / 16 (86) International application number: PCT / CN2024 / 088116 (87) International publication number: WO 2024 / 230431(14.11.2024 Gazette 2024 / 46) (84) Designated Contracting States: AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC ME MK MT NL NO PL PT RO RS SE SI SK SM TR Designated Extension States: BA Designated Validation States: GE KH MA MD TN (30) Priority: 05.05.2023 CN 202310497837 31.07.2023 CN 202310954685 (71) Applicant: Huawei Cloud Computing Technologies Co., Ltd. Guiyang, Guizhou 550025 (CN) (72) Inventor: GAO, Feng Guiyang, Guizhou 550025 (CN) (74) Representative: Goddar, Heinz J. Boehmert & Boehmert Anwaltspartnerschaft mbB Pettenkoferstrasse 22 80336 München (DE) (54) NETWORK ACCESS METHOD, AND COMPUTING DEVICE AND COMPUTING DEVICE CLUSTER (57) This application provides a network access method, a computing device, and a computing device cluster. In the method, a first socket creation request initiated by a target application is received, a type para- meter of the first socket creation request is modified, and a socket is created based on a modified typeparameter. A protocol stack corresponding to the modified type parameter is the same as a protocol stack supported by the second computing device. A first computing device receives a connection request initiated by the target application, and modifies a first IP address in the con- nection request to a second IP address based on a preset address mapping relationship. The second IP address is an IP address of a second computing device under a second protocol stack supported by the second comput- ing device. The first computing device establishes a connection to the second computing device based on the socket and the connection request. According to the solutions, the first computing device may establish a connection to the second computing device based on an accurate IP address, to implement network access between computing devices under different protocol stacks. EP 4 69 4 09 2 A 1 Processed by Luminess, 75001 PARIS (FR) 2 1 EP 4 694 092 A1 2 Description CROSS-REFERENCE TO RELATEDAPPLICATIONS

[0001] This application claims priority to Chinese Pa- tent Application No. 202310497837.0, filed with the Chi- na National Intellectual Property Administration on May 5, 2023 and entitled "NETWORK ACCESS METHOD", and claims priority to Chinese Patent Application No. 202310954685.2, filed with the China National Intellec- tual Property Administration on July 31, 2023 and entitled "NETWORK ACCESS METHOD, COMPUTING DE- VICE, AND COMPUTING DEVICE CLUSTER", which are incorporated herein by reference in their entireties. TECHNICAL FIELD

[0002] This application relates to the field of computer technologies, and in particular, to a network access method, a computing device, and a computing device cluster. BACKGROUND

[0003] With the development of the internet protocol (internet protocol, IP), internet protocol version 4 (internet protocol version 4, IPv4) addresses have been ex- hausted, and the internet protocol version 6 (internet protocol version 6, IPv6) has become amainstream network protocol being promoted.

[0004] However, IPv4 networks have developed for decades, and a vast majority of services support only IPv4 without considering supporting IPv6. Therefore, to enable existing IPv4-based services to support IPv6, modifications need to be made to current massive ser- vices, making the implementation highly challenging. In addition, with the expansion of cloud services, a quantity of containers has far exceeded that of virtual machines. To meet address requirements of the containers, IPv6 addresses need to be assigned to the containers. How- ever, most existing services are based on IPv4 ad- dresses. Therefore, a technology that supports intero- perability between IPv4 and IPv6 is required, to ensure normal running of current services.

[0005] However, in an existing network access meth- od, to support IPv4 and IPv6 dual stacks, determining needs to be performed in code logic based on an address scenario, and existing code needs to be modifiedbased on different protocol stack scenarios. This increases complexity of the code, and consequently causes diffi- culty in promoting IPv6. SUMMARY

[0006] This application provides a network access method, a computing device, and a computing device cluster, to implement mutual network access between devices supporting different protocol stacks.

[0007] According to a first aspect, this application pro- vides a network access method. The method may be performed by a first computing device or a kernel mode of the first computing device. In the method, the first com- puting device receives a first socket creation request initiated by a target application. The first socket creation request is used to request to create a socket for acces- sing a target application in a second computing device. The first computing device modifies a type parameter of the first socket creation request, and creates a socket based on a modified type parameter. A protocol stack corresponding to the modified typeparameter is the same as a protocol stack supported by the second com- puting device. The first computing device receives a connection request initiated by the target application, where the connection request is used to request to es- tablish a connection to the second computing device, and the connection request includes a first internet protocol IP address; and modifies the first IP address in the connec- tion request to a second IP address based on a preset address mapping relationship, where the first IP address belongs to a first protocol stack, and the second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device. The first computing device estab- lishes a connection to the second computing device based on the socket and the connection request.

[0008] In the foregoing method, when receiving the socket creation request from the target application, the first computing device may modify a type parameter ofthe socket, to generate a socket that matches the proto- col stack supported by the second computing device, and the first computing device modifies a peer IP address in the connection request initiated by the target application to an IP address of the second computing device under an actual protocol stack, to ensure that the first computing device can establish a connection to the second comput- ing device based on an accurate IP address, thereby achieving network access from the first computing device to the second computing device.

[0009] In a possible design, after creating the socket based on the modified type parameter, and before re- ceiving the connection request initiated by the target application, the method further includes: receiving an address binding request initiated by the target applica- tion, where the address binding request includes a third IP address; modifying the third IP address in the address binding request to a fourth IP address based on the preset addressmapping relationship; and binding the fourth IP address to the socket according to the address binding request. The third IP address belongs to the first protocol stack, and the fourth IP address is an IP address of the first computing device under the second protocol stack.

[0010] Establishing the connection to the second com- puting device based on the socket and the connection request includes: establishing the connection to the sec- ond computing device based on the socket, the fourth IP 5 10 15 20 25 30 35 40 45 50 55 3 3 EP 4 694 092 A1 4 address, and the second IP address in the connection request.

[0011] According to this design, after receiving the address binding request, the first computing device may modify a local IP address in the address binding request to a local IP address that belongs to the protocol stack supported by the second computing device, so that the first computing device may establish a connection to the second computing device based on a modified local IPaddress, thereby successfully accessing the second computing device.

[0012] In a possible design, after receiving the address binding request initiated by the target application, and before modifying the third IP address in the address binding request to the fourth IP address based on the preset address mapping relationship, the method further includes: determining that the preset address mapping relationship includes a mapping relationship between the third IP address and the fourth IP address.

[0013] According to this design, when determining that the preset address mapping relationship includes the mapping relationship between the third IP address and the fourth IP address, the first computing device may modify the third IP address in the address binding request based on the mapping relationship between the third IP address and the fourth IP address, to ensure accuracy of network address translation.

[0014] In a possible design, establishing the connec- tion to the second computingdevice based on the socket and the connection request includes: selecting a fourth IP address from a plurality of IP addresses of the first computing device, where the fourth IP address and the second IP address belong to a same protocol stack; and establishing the connection to the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request.

[0015] According to this design, if the first computing device does not receive the address binding request sent by the target application, the first computing device may select the fourth IP address when establishing the con- nection to the second computing device, and establish the connection to the second computing device based on the fourth IP address. The fourth IP address and the second IP address belong to a same protocol stack, so that a network connection can be correctly established, and accuracy of network access is ensured.

[0016] In a possible design, after receiving thefirst socket creation request initiated by the target application, and before modifying the type parameter of the first socket creation request, the method further includes: determining that the target application belongs to a pre- set application list. An application in the preset applica- tion list is an application for which network address translation is to be performed.

[0017] According to this design, an application list for which network address translation is to be performed may be prestored in the first computing device, so that the first computing device can monitor an application in the application list, and perform socket type conversion and network address translation in time.

[0018] In a possible design, the preset application list is preconfigured by a system or is customized by a user, and the preset address mapping relationship is precon- figured by the system or is customized by the user.

[0019] According to this design, the system may pre- configure an applicationfor which network address trans- lation is to be performed, or the user may select an application for which network address translation is to be performed. The preset address mapping relationship may also be preconfigured by the system or customized by the user, thereby improving flexibility of the network access method.

[0020] In a possible design, after receiving the connec- tion request initiated by the target application, and before modifying the first IP address in the connection request to the second IP address based on the preset address mapping relationship, the method further includes: de- termining that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address.

[0021] According to this design, when determining that the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address, the first computing device may modify the first IP address in theconnection request based on the mapping relationship between the first IP address and the second IP address, to ensure accuracy of network address translation.

[0022] In a possible design, after establishing the con- nection to the second computing device based on the socket and the connection request, the method further includes: performing system call processing based on the second IP address. The system call processing in- cludes reading a message from the second computing device and / or sending a message to the second comput- ing device.

[0023] According to this design, based on the network access method provided in this application, a network connection between the first computing device and the second computing device can be correctly established, to implement message transmission between the first com- puting device and the second computing device.

[0024] In a possible design, the first protocol stack is an IPv4 protocol stack, and the second protocol stack is an IPv6 protocolstack; or the first protocol stack is an IPv6 protocol stack, and the second protocol stack is an IPv4 protocol stack.

[0025] According to this design, mutual network ac- cess between the first computing device and the second computing device in different protocol stacks can be implemented, which is beneficial to promotion and appli- cation of the IPv4 protocol.

[0026] According to a second aspect, this application provides a network access method. The method may be performed by a second computing device or a kernel mode of the second computing device. In the method, the 5 10 15 20 25 30 35 40 45 50 55 4 5 EP 4 694 092 A1 6 second computing device receives a second socket creation request initiated by a target application, where the second socket creation request is used to request to create a socket for listening for a message sent by a target application in another device; and modifies a type parameter of the second socket creation request, and creates a socket based on a modifiedtype parameter, where a protocol stack corresponding to the modified type parameter is the same as a protocol stack that is supported by a first computing device and that corre- sponds to the target application. The second computing device receives an address binding request initiated by the target application in the second computing device. The address binding request includes a first server inter- net protocol IP address. The second computing device modifies the first IP address in the address binding re- quest to a second IP address based on a preset address mapping relationship. The first IP address belongs to a first protocol stack, the second IP address is an IP ad- dress of the second computing device under the second protocol stack, and the second protocol stack is the protocol stack that is supported by the first computing device and that corresponds to the target application. The second computing device binds the socket to the second IP address according to the addressbinding request.

[0027] In the foregoing method, when receiving the socket creation request from the target application, the second computing device may modify a type parameter of the socket, to generate a socket that matches the protocol stack of the first computing device, and the second computing device modifies a local IP address in the address binding request initiated by the target application to an IP address under the protocol stack supported by the first computing device, to ensure that the second computing device can receive network ac- cess from the first computing device based on an accu- rate IP address.

[0028] In a possible design, after receiving the second socket creation request initiated by the target application, and before modifying the type parameter of the second socket creation request, the method further includes: determining that the target application belongs to a pre- set application list. An application in the preset applica- tion list is an application forwhich network address translation is to be performed.

[0029] In a possible design, the preset application list is preconfigured by a system or is customized by a user, and the preset address mapping relationship is precon- figured by the system or is customized by the user.

[0030] In a possible design, after receiving the address binding request initiated by the target application in the second computing device, and before modifying the first IP address in the address binding request to the second IP address based on the preset address mapping rela- tionship, the method further includes: determining that the preset address mapping relationship includes a map- ping relationship between the first IP address and the second IP address.

[0031] In a possible design, after binding the socket to the second IP address according to the address binding request, the method further includes: performing system call processing based on the second IP address. The system call processing includesreading a message from the first computing device of the target application and / or sending a message to the first computing device of the target application.

[0032] In a possible design, the first protocol stack is an IPv4 protocol stack, and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack, and the second protocol stack is an IPv4 protocol stack.

[0033] According to a third aspect, this application provides a network access method. The method may be performed by a first computing device or a kernel mode of the first computing device. For example, the method may be performed by the first computing device. In the method, the first computing device receives a first socket creation request initiated by a target application. The first socket creation request is used to request to create a socket for accessing a target application in a second computing device. The first computing device creates a first socket according to the firstsocket creation request. The first computing device receives a connec- tion request initiated by the target application in the first computing device. The connection request is used to request to establish a connection to the second comput- ing device, the connection request includes a first server internet protocol IP address, and the first IP address belongs to a first protocol stack. The first computing device determines that a preset address mapping rela- tionship includes a mapping relationship between the first IP address and a second IP address. The second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device. The first computing device closes the first socket, and generates a third socket creation re- quest. An index of the third socket creation request is the same as an index of the first socket creation request, a type parameter of the third socket creation request is different from a type parameterof the first socket creation request, and a protocol stack corresponding to the type parameter of the third socket creation request is the same as a protocol stack supported by the second computing device. The first computing device creates a second socket according to the third socket creation request. The first computing device modifies the first IP address in the connection request to the second IP address based on the preset address mapping relationship. A protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device. The first computing device establishes a connec- tion to the second computing device based on the second socket and the connection request.

[0034] In the foregoing method, when the first comput- ing device supports dual stacks, the first computing de- 5 10 15 20 25 30 35 40 45 50 55 5 7 EP 4 694 092 A1 8 vice determines that the preset address mapping rela- tionship includes a destination IP address towhich the connection request requests to connect, and then gen- erates a new socket creation request and translates an IP address of the second computing device, to ensure that the first computing device can accurately identify a ser- vice for which network address translation is to be per- formed, and establish a connection to the second com- puting device based on an accurate IP address.

[0035] In a possible design, before generating the third socket creation request, the method further includes: determining that the target application belongs to a pre- set application list. An application in the preset applica- tion list is an application for which network address translation is to be performed.

[0036] In a possible design, the preset application list is preconfigured by a system or is customized by a user, and the preset address mapping relationship is precon- figured by the system or is customized by the user.

[0037] In a possible design, after establishing the con- nection to thesecond computing device based on the second socket and the connection request, the method further includes: performing system call processing based on the second IP address. The system call pro- cessing includes reading a message from the second computing device and / or sending a message to the sec- ond computing device.

[0038] In a possible design, generating the third socket creation request includes: sequentially generate socket creation requests according to an index order until the third socket creation request is generated.

[0039] According to this design, because a kernel al- ways assigns a process with a smallest index in current processes, the first computing device may sequentially generate socket creation requests until the third socket creation request with the same index as the first socket creation request is generated, so that a normal service of the target application is not affected, and a normal net- work access service is ensured.

[0040] According to a fourth aspect,this application provides a computing device. The computing device includes: a kernel network module, configured to receive a first socket creation request initiated by a target appli- cation, where the first socket creation request is used to request to create a socket for accessing a target applica- tion in a second computing device; and a conversion module, configured to modify a type parameter of the first socket creation request, where a protocol stack corresponding to a modified type parameter is the same as a protocol stack supported by the second computing device. The kernel network module is further configured to: create a socket based on the modified type parameter; and receive a connection request initiated by the target application. The connection request is used to request to establish a connection to the second computing device, the connection request includes a first internet protocol IP address, and the first IP address belongs to a first pro- tocol stack. Theconversion module is further configured to modify the first internet protocol IP address in the connection request to a second IP address based on a preset address mapping relationship. The second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device. The kernel network module is further configured to establish a connection to the second com- puting device based on the socket and the connection request.

[0041] In a possible design, the kernel network module is further configured to: after creating the socket based on the modified type parameter, and before receiving the connection request initiated by the target application, receive an address binding request initiated by the target application. The address binding request includes a third IP address, and the third IP address belongs to the first protocol stack. The conversion module is further config- ured to modify the third IP address in the address bindingrequest to a fourth IP address based on the preset ad- dress mapping relationship. The fourth IP address is an IP address of the first computing device under the second protocol stack. The kernel network module is further configured to bind the fourth IP address to the socket according to the address binding request. When estab- lishing the connection to the second computing device based on the socket and the connection request, the kernel network module is specifically configured to: es- tablish the connection to the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request.

[0042] In a possible design, the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the third IP address in the address binding request to the fourth IP address based on the preset address mapping relationship, determine that the preset address mappingrelationship includes a mapping rela- tionship between the third IP address and the fourth IP address.

[0043] In a possible design, the kernel network module is specifically configured to: select a fourth IP address from a plurality of IP addresses of the first computing device, where the fourth IP address and the second IP address belong to a same protocol stack; and establish the connection to the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request.

[0044] In a possible design, the conversion module is further configured to: after receiving the first socket crea- tion request initiated by the target application, and before modifying the type parameter of the first socket creation request, determine that the target application belongs to a preset application list. An application in the preset application list is an application for which network ad- dress translation is to be performed.

[0045] In a possible design, theconversion module is further configured to: before modifying the first server internet protocol IP address in the connection request to 5 10 15 20 25 30 35 40 45 50 55 6 9 EP 4 694 092 A1 10 the second IP address based on the preset address mapping relationship, determine that the preset address mapping relationship includes a mapping relationship between the first IP address and the second IP address.

[0046] In a possible design, the kernel network module is further configured to: after establishing the connection to the second computing device based on the socket and the connection request, perform system call processing based on the second IP address. The system call pro- cessing includes reading a message from the second computing device and / or sending a message to the sec- ond computing device.

[0047] In a possible design, the first IP address and the third IP address belong to an IPv4 protocol stack, and the second IP address and the fourth IP address belong to an IPv6 protocolstack; or the first IP address and the third IP address belong to an IPv6 protocol stack, and the second IP address and the fourth IP address belong to an IPv4 protocol stack.

[0048] According to a fifth aspect, this application pro- vides a computing device. The computing device in- cludes: a kernel network module, configured to receive a second socket creation request initiated by a target application, where the second socket creation request is used to request to create a socket for listening for a message sent by a target application in another device; and a conversion module, configured to modify a type parameter of the second socket creation request, where a protocol stack corresponding to a modified type para- meter is the same as a protocol stack that is supported by a first computing device and that corresponds to the target application. The kernel network module is further configured to: create a socket based on the modified type parameter; and receive an address bindingrequest in- itiated by the target application. The address binding request includes a first server internet protocol IP ad- dress. The conversion module is further configured to modify the first IP address in the address binding request to a second IP address based on a preset address map- ping relationship. The first IP address belongs to a first protocol stack, the second IP address is an IP address of the second computing device under the second protocol stack, and the second protocol stack is the protocol stack that is supported by the first computing device and that corresponds to the target application. The kernel network module is further configured to bind the socket to the second IP address according to the address binding request.

[0049] In a possible design, the conversion module is further configured to: after receiving the second socket creation request initiated by the target application, and before modifying the type parameter of the second sock- et creation request,determine that the target application belongs to a preset application list. An application in the preset application list is an application for which network address translation is to be performed.

[0050] In a possible design, the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the first IP address in the address binding request to the second IP address based on the preset address mapping relationship, determine that the preset address mapping relationship includes a mapping rela- tionship between the first IP address and the second IP address.

[0051] In a possible design, the kernel network module is further configured to: after binding the socket to the second IP address according to the address binding request, perform system call processing based on the second IP address. The system call processing includes reading a message from the first computing device of the target applicationand / or sending a message to the first computing device of the target application.

[0052] In apossible design, the first IP address belongs to an IPv4 protocol stack, and the second IP address belongs to an IPv6 protocol stack; or the first IP address belongs to an IPv6 protocol stack, and the second IP address belongs to an IPv4 protocol stack.

[0053] According to a sixth aspect, this application provides a computing device. The computing device includes: a kernel network module, configured to: receive a first socket creation request initiated by a target appli- cation, where the first socket creation request is used to request to create a socket for accessing a target applica- tion in a second computing device; create a first socket according to the first socket creation request; receive a connection request initiated by the target application, where the connection request is used to request to es- tablish a connection to the second computing device, the connection request includes afirst server internet proto- col IP address, and the first IP address belongs to a first protocol stack; determine that a preset address mapping relationship includes a mapping relationship between the first IP address and a second IP address, where the second IP address is an IP address of the second com- puting device under a second protocol stack supported by the second computing device; close the first socket, and generate a third socket creation request, where an index of the third socket creation request is the same as an index of the first socket creation request, a type parameter of the third socket creation request is different from a type parameter of the first socket creation request, and a protocol stack corresponding to the type parameter of the third socket creation request is the same as a protocol stack supported by the second computing de- vice; and create a second socket according to the third socket creation request; and a conversion module, con- figured to modifythe first IP address in the connection request to the second IP address based on the preset address mapping relationship, where a protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing de- vice. The kernel network module is further configured to establish a connection to the second computing device based on the second socket and the connection request.

[0054] In a possible design, the conversion module is 5 10 15 20 25 30 35 40 45 50 55 7 11 EP 4 694 092 A1 12 further configured to: before generating the third socket creation request, determine that the target application belongs to a preset application list. An application in the preset application list is an application for which network address translation is to be performed.

[0055] In a possible design, the kernel network module is further configured to: after establishing the connection to the second computing device based on the second socket and the connectionrequest, perform system call processing based on the second IP address. The system call processing includes reading a message from the second computing device and / or sending a message to the second computing device.

[0056] In a possible design, the kernel network module is specifically configured to: sequentially generate socket creation requests according to an index order until the third socket creation request is generated.

[0057] According to a seventh aspect, this application provides a computing device. The device includes a processor and a memory. The processor is configured to execute instructions stored in the memory, so that the computing device performs the method according to any one of the first aspect and the possible designs of the first aspect, or performs the method according to any one of the second aspect and the possible designs of the sec- ond aspect, or performs the method according to any one of the third aspect and the possible designs of the third aspect.

[0058] According to an eighth aspect, this application provides a computing device cluster. The computing device cluster includes at least one computing device, and each computing device includes a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method according to any one of the first aspect and the possible designs of the first aspect, or performs the method according to any one of the second aspect and the possible designs of the second aspect, or performs the method according to any one of the third aspect and the possible designs of the third aspect.

[0059] According to a ninth aspect, this application provides a computer program product including instruc- tions. When the instructions are run by a computing device, the computing device is enabled to perform the method according to any one of the first aspectand the possible designs of the first aspect, or perform the meth- od according to any one of the second aspect and the possible designs of the second aspect, or perform the method according to any one of the third aspect and the possible designs of the third aspect.

[0060] According to a tenth aspect, this application provides a computer-readable storage medium, includ- ing computer program instructions. When the computer program instructions are executed by a computing de- vice, the computing device performs the method accord- ing to any one of the first aspect and the possible designs of the first aspect, or performs the method according to any one of the second aspect and the possible designs of the second aspect, or performs the method according to any one of the third aspect and the possible designs of the third aspect.

[0061] Based on the implementations provided in the foregoing aspects, embodiments of this application may be further combined to provide more implementations.For beneficial effects of the fourth aspect to the tenth aspect, refer to descriptions of beneficial effects of the first aspect to the third aspect. Details are not described herein again. BRIEF DESCRIPTION OF DRAWINGS

[0062] FIG. 1 is a diagram of an architecture of a NAT64 technology; FIG. 2 is a diagram of an architecture of a commu- nication system that can implement network address translation; FIG. 3 is a diagram of a structure of a computing apparatus according to an embodiment of this ap- plication; FIG. 4 is a flowchart of a network access method according to an embodiment of this application; FIG. 5A and FIG. 5B are a flowchart of a network access method according to an embodiment of this application; FIG. 6 is a flowchart of a network access method according to an embodiment of this application; FIG. 7A and FIG. 7B are a flowchart of a network access method according to an embodiment of this application; FIG. 8 is a flowchart of a network access method according to anembodiment of this application; FIG. 9A and FIG. 9B are a flowchart of a network access method according to an embodiment of this application; FIG. 10 is a diagram of a structure of a computing device according to an embodiment of this applica- tion; FIG. 11 is a diagram of a computing device cluster according to an embodiment of this application; and FIG. 12 is a diagram of a connection manner of a computing device cluster according to an embodi- ment of this application. DESCRIPTION OF EMBODIMENTS

[0063] To make objectives, technical solutions, and advantages of embodiments of this application clearer, the following further describes embodiments of this ap- plication in detail with reference to the accompanying drawings. The terms "first" and "second" below in de- scriptions of embodiments of this application are merely used for a description purpose, and shall not be under- 5 10 15 20 25 30 35 40 45 50 55 8 13 EP 4 694 092 A1 14 stood as an indication or implication of relativeimpor- tance or implicit indication of a quantity of indicated technical features. Therefore, a feature limited by "first" or "second" may explicitly or implicitly include one or more features.

[0064] It should be understood that in embodiments of this application, "at least one" means one or more, and "plurality of" means two or more. The term "and / or" de- scribes an association relationship between associated objects, and indicates that three relationships may exist. For example, A and / or B may indicate the following cases: Only A exists, both A and B exist, and only B exists, where A and B may be singular or plural. The character " / " generally indicates an "or" relationship be- tween the associated objects. "At least one of the follow- ing" or a similar expression thereof indicates any combi- nation of these items, including a single item or any combination of a plurality of items. For example, at least one of a, b, or c may represent: a, b, c, a and b, a and c, b and c, or a, b andc, where a, b, and c may be a singular or plural number.

[0065] The transmission control protocol (transmission control protocol / internet protocol, TCP / IP) is the most basic communication protocol used in networks. The TCP / IP transmission protocol defines standards and methods for communication between different parts across the internet.

[0066] An internet protocol address (Internet Protocol Address, IP) is a uniform address format provided by the IP protocol. Based on the IP protocol, an IP address may be assigned to each network and each host on the Internet, so that all hosts connected to the network can communicate with each other based on their own IP addresses and IP addresses of receiving hosts.

[0067] The internet protocol version 4 (internet proto- col version 4, IPv4) uses 32-bit addresses and provides about 4.3 billion addresses. However, with the develop- ment of internet protocol (internet protocol, IP), IPv4 addresses have been exhausted, and the internet pro- tocolversion 6 (internet protocol version 6, IPv6) be- comes a mainstream network protocol being promoted. IPv6 uses 128-bit addresses and can provide almost unlimited addresses.

[0068] However, IPv4 networks have developed for decades, and a vast majority of services support only IPv4 without considering supporting IPv6. Therefore, to enable existing IPv4-based services to support IPv6, modifications need to be made to current massive ser- vices, making the implementation highly challenging. In addition, with the expansion of cloud services, a quantity of containers has far exceeded that of virtual machines. To meet address requirements of the containers, IPv6 addresses need to be assigned to the containers. How- ever, most existing services are based on IPv4 ad- dresses. Therefore, a technology that supports intero- perability between IPv4 and IPv6 is required, to ensure normal running of current services.

[0069] However, in an existing network access meth- od, to support IPv4 and IPv6dual stacks, determining needs to be performed in code logic based on an address scenario, and existing code needs to be modified based on different protocol stack scenarios. This increases complexity of the code, and consequently causes diffi- culty in promoting IPv6.

[0070] FIG. 1 is a diagram of a communication system. Refer to FIG. 1. The communication system may include a plurality of computing devices and gateways. A quantity of computing devices in the communication system is not limited in embodiments of this application. A first comput- ing device, a gateway, and a second computing device in FIG. 1 are merely used as an example instead of a limitation.

[0071] In embodiments of this application, the comput- ing device is any electronic device that requires network access (that is, access to an IPv4 public network or an IPv6 public network), for example, may be a device such as a computer, a notebook computer, a smartphone, a tablet computer, or a smart wearable device, or maybe a server, or may be another home device, or may be a computing instance such as a virtual machine or a con- tainer. FIG. 1 shows an example in which the first com- puting device is a terminal and the second computing device is a server. A type of the computing device is not limited in this embodiment of this application. In this embodiment of this application, an application may be installed on the computing device. The application in the computing device may be a client, or may be a server.The client may request to access a server, the client may further request to access another client, and the server may listen for an access request initiated by the client. In the following descriptions, an example in which an ap- plication in the first computing device accesses an ap- plication in the second computing device is used for description.

[0072] An application may be installed on the first computing device. When a user uses a network service provided by the application, the firstcomputing device may perform data exchange with the second computing device based on the IP address of the first computing device and the IP address of the second computing device, to complete the service. IPv4 is used as an example. An IPv4-based IP address has 32 bits. IPv4 divides the 32-bit address into two parts: a first part represents a network address, and a latter part repre- sents an address of a host in a local area network. If two IP addresses are in a same subnet, network addresses are definitely the same. To determine a network address in an IP address, the IP protocol also introduces a subnet mask. The network address can be obtained by perform- ing a bitwise AND operation on the IP address and subnet mask. When the first computing device sends a data packet to the second computing device, the first comput- ing device may first determine, by using the IPv4 protocol, whether the first computing device and the second com- puting device are in a same subnet. If the firstcomputing device and the second computing device are in the same 5 10 15 20 25 30 35 40 45 50 55 9 15 EP 4 694 092 A1 16 subnet, the first computing device may query a media access control (media access control, MAC) address by using an address resolution protocol (address resolution protocol, ARP), so that the first computing device may send the data packet to the second computing device in the subnet in a broadcast form. If the first computing device and the second computing device are not in the same subnet, the Ethernet may forward the data packet to a gateway of the subnet for routing. The gateway may perform forwarding a plurality of times until the data packet is forwarded to a subnet in which the second computing device is located, then obtain the MAC ad- dress of the second computing device by using the ARP, and finally send the data packet to the second computing device in a broadcast form.

[0073] In the IPv4 protocol, when the first computing device needs to send a datapacket to the second com- puting device, the first computing device performs the following steps.

[0074] Step a: Create a socket whose type parameter is IPv4.

[0075] Step b: Bind a local IPv4 address.

[0076] Step c: Connect to an IPv4 address of the second computing device end.

[0077] Similarly, in the IPv6 protocol, when the first computing device needs to send a data packet to the second computing device, the first computing device performs the following steps.

[0078] Step a: Create a socket whose type parameter is IPv6.

[0079] Step b: Bind a local IPv6 address.

[0080] Step c: Connect to an IPv6 address of the second computing device end.

[0081] The socket (Socket) in the foregoing procedure may be considered as an endpoint in a communication connection of two applications on different hosts when the two applications communicate with each other, which is a logical concept. The socket is equivalent to an application programming interface (application program- ming interface, API) forinter-process communication in a network environment, and is a communication endpoint that can be named and addressed. Each socket has its type and a process connected to it. The socket is a mechanism based on an IP address and a port, used for transmitting a data packet to an application layer process.

[0082] In different IP protocol versions, a data packet transmitted between the first computing device and the second computing device needs to be routed by different gateways. For example, an IPv4 gateway is required in IPv4 to route the data packet, and an IPv6 gateway is required in IPv6 to route the data packet. How to imple- ment mutual network access between devices in different protocol stacks becomes an extremely important topic at present.

[0083] In an optional implementation, a network ad- dress translation (network address translation, NAT) de- vice may be deployed on an intermediate node of the IPv6 network and the IPv4 network, for example, a NAT64 device (also referred toas a NAT46 device) that supports network address translation between IPv6 and IPv4.

[0084] For example, FIG. 2 is a diagram of an archi- tecture of a communication system that can implement network address translation. FIG. 2 uses interaction be- tween the first computing device supporting IPv6 and the second electronic device supporting IPv4 as an example. Refer to FIG. 2. The communication system includes an IPv6 device, an IPv6 gateway, a NAT64 device, an IPv4 gateway, and an IPv4 device. It is assumed that an IP address of the IPv6 device is fe80::fbaf:32c5:ac97:0102, and an IP address of the IPv4 device is 192.168.1.1. The NAT64 device has a dual-stack capability of supporting both IPv6 and IPv4, and the NAT64 device has two net- work addresses. To implement translation between IPv6 and IPv4 addresses, the following correspondences need to be configured on the NAT64 device: an IPv6 address fe80::fbaf:32c5:ac97:0102 of the IPv6 device corresponds to an IPv4 address 192.168.2.2; andan IPv4 address 192.168.1.1 of the IPv4 device corre- sponds to an IPv6 address fe80::fbaf:32c5:ac98:0304.

[0085] When the IPv6 device needs to send a data packet to a server, both a source address and a destina- tion address of the data packet are IP addresses under IPv6, the source address of the data packet is fe80::f- baf:32c5:ac97:0102, and the destination address of the data packet is fe80::fbaf:32c5:ac98:0304. After being forwarded by the IPv6 gateway, the data packet is re- ceived by the NAT64 device. The NAT64 device queries the preconfigured network address correspondences, and determines that both the source address and the destination address of the data packet have correspond- ing IPv4 addresses. Therefore, the NAT64 modifies the source address of the data packet to 192.168.2.2 and modifies the destination address to 192.168.1.1. After the network address is modified, the data packet can be forwarded to the IPv4 device through the IPv4 gateway.

[0086] Similarly, when theIPv4 device sends a data packet to the IPv6 device, the NAT64 device may modify a source address and a destination address of the data packet to an IPv6 address corresponding to the IPv4 address, thereby implementing transmission of the data packet from the IPv4 device to the IPv6 device.

[0087] However, although the foregoing solution can implement mutual access between the IPv4 network and the IPv6 network, a new device needs to be introduced into the communication system, which increases com- plexity of service deployment. In addition, data packet forwarding through the NAT64 device also increases a delay, and performance of the NAT64 device may also affect service performance.

[0088] Based on the foregoing problem, this applica- tion provides a network access method. The method may be performed by the first computing device and the second computing device. In the network access method provided in embodiments of this application, the first 5 10 15 20 25 30 35 40 45 50 55 10 17 EP 4694 092 A1 18 computing device receives a first socket creation request initiated by a target application. The first socket creation request is used to request to create a socket for acces- sing a target application in the second computing device. The first computing device may modify a type parameter of the first socket creation request, and create a socket based on a modified type parameter. A protocol stack corresponding to the modified type parameter is the same as a protocol stack supported by the second com- puting device. The first computing device receives a connection request initiated by the target application. The connection request is used to request to establish a connection to the second computing device, the con- nection request includes a first IP address, and the first IP address belongs to a first protocol stack. The first com- puting device may modify the first IP address in the connection request to a second IP address based on a preset address mapping relationship.The second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device. The first computing device may estab- lish a connection to the second computing device based on the created socket and the connection request. In this solution, when receiving the socket creation request from the target application, the first computing device may modify a type parameter of the socket, to generate a socket that matches the protocol stack of the second computing device, and the first computing device modi- fies a peer IP address in the connection request initiated by the target application to an IP address of the second computing device under an actual protocol stack, to ensure that the first computing device can establish a connection to the second computing device based on an accurate IP address.

[0089] In another network access method provided in embodiments of this application, the first computing de- vice may support the IPv4protocol and the IPv6 protocol. In the method, the first computing device receives a first socket creation request initiated by a target application in the first computing device, and creates a first socket based on the first socket creation request. The first computing device receives a connection request sent by the target application. The first computing device determines that a preset address mapping relationship includes a mapping relationship between a first IP ad- dress in the connection request and a second IP address. The first IP address belongs to a first protocol stack, and the second IP address is an IP address of a second computing device under a second protocol stack sup- ported by the second computing device. In this case, the first computing device may determine that network ad- dress translation needs to be performed on the connec- tion request. The first computing device may close the first socket, and generate a third socket creation request. An index of the thirdsocket creation request is the same as an index of the first socket creation request, and a type parameter of a third socket matches a protocol stack of the second computing device. The first computing device creates a second socket according to the third socket creation request, and modifies the first IP address in the connection request to the second IP address based on the preset mapping relationship. A protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device. The first computing device may establish a con- nection to the second computing device based on the second socket and the connection request. In this solu- tion, when the first computing device supports dual stacks, the first computing device determines that the preset address mapping relationship includes a destina- tion IP address to which the connection request requests to connect, and then generates a new socket creation request and translates an IPaddress of the second computing device, to ensure that the first computing device can accurately identify a service for which network address translation is to be performed, and establish a connection to the second computing device based on an accurate IP address.

[0090] The following describes a structure of a com- puting apparatus provided in an embodiment of this application. The computing apparatus may be the first computing device or the second computing device. FIG. 3 is a diagram of a structure of a computing apparatus according to an embodiment of this application. Refer to FIG. 3. At least one application may be installed on the computing apparatus. As shown in FIG. 3, an example in which a user mode includes three applications (an app 1, an app 2, and an app 3) is used. A kernel network module in a kernel mode is configured to execute a system call and an actual system call execution function, so that the kernel network module may be configured to: in response to a systemcall request initiated by an application, estab- lish a connection to a second computing device; and send a data packet to the second computing device or receive a data packet sent by the second computing device.

[0091] The network access method provided in embo- diments of this application may be performed by a con- version module in the computing apparatus. As shown in FIG. 3, the conversion management module may be configured to deliver an application list that needs to be monitored, a conversion type, and an address map- ping relationship to the conversion module. Optionally, a user may set an application list that needs to be mon- itored, and the user may configure an address translation relationship; or the application list that needs to be mon- itored and the address translation relationship may be preconfigured by a system. The conversion module may store the application list that needs to be monitored and the conversion type, and store the preset address map- pingrelationship.

[0092] It is assumed that the application list that needs to be monitored includes the app 1. When receiving the system call request initiated by the app 1, the kernel network module of the computing apparatus may send a context related to the system call request to the con- version module. The conversion module may modify a 5 10 15 20 25 30 35 40 45 50 55 11 19 EP 4 694 092 A1 20 type parameter of a socket creation request, and modify a destination address in a connection request. The con- version module may return a processed socket creation request and connection request to the kernel network module. The kernel network module then creates a sock- et according to the processed socket creation request, and establishes a connection to a remote end according to the modified connection request, to implement mutual network access between devices under different protocol stacks without affecting an original data processing pro- cedure and a data receiving and sendingprocedure.

[0093] In some embodiments, the network access method provided in this embodiment of this application may be further used to enable the computing device to support another IP protocol. For example, it is assumed that the first computing device supports IPv4, the user may enable a "support IPv6" function on a control inter- face of the first computing device, and the first computing device loads the conversion module and the conversion management module shown in FIG. 3. When loading the conversion module, the first computing device may reg- ister detection information of a socket interface with a kernel. The conversion management module assigns an IPv6 address to the first computing device, and delivers the preset application list, the conversion type, and the preset address mapping relationship to the conversion module. In this way, the first computing device can ac- cess the IPv6 second computing device based on the network access method provided in this embodiment of thisapplication, so that the first computing device sup- ports different protocol stacks.

[0094] The mutual network access method provided in embodiments of this application may be applied to a first computing device or a second computing device that supports a single stack, or may be applied to a first computing device that supports dual stacks. The follow- ing further describes the mutual network access method in different protocol stack scenarios. 1. Single-stack scenario

[0095] The single-stack scenario in embodiments of this application means that the first computing device supports an IPv4 protocol and the second computing device supports an IPv6 protocol in an initial state, or the first computing device supports the IPv6 protocol and the second computing device supports the IPv4 protocol in an initial state.

[0096] FIG. 4 is a flowchart of a network access method according to an embodiment of this application. The method may be performed by a first computing device or a kernel modeof the first computing device. In this embodiment, the first computing device receives a re- quest initiated by a target application, and accesses a target application in a second computing device. Refer to FIG. 4. The method includes the following steps.

[0097] S401: Receive a first socket creation request initiated by the target application.

[0098] The first socket creation request is used to request to create a client socket for network communica- tion.

[0099] The target application is an application in a preconfigured application list stored in the first computing device. An application in the preconfigured application list resides on a different protocol stack from that of the second computing device to which the application re- quests to connect. The first computing device needs to monitor a system call request initiated by the target application, to perform socket type conversion and net- work address translation.

[0100] S402: Modify a typeparameter of the first socket creationrequest, and create a socket based on a mod- ified type parameter.

[0101] In an optional implementation, after receiving the first socket creation request, the first computing de- vice may query the preset application list to determine whether the target application is included. An application in the preset application list is an application for which network address translation is to be performed. After determining that the target application belongs to the preset application list, the first computing device modifies the type parameter of the first socket creation request, and creates the socket based on the modified type para- meter.

[0102] The first socket creation request initiated by the target application includes the type parameter of the first socket creation request. The first computing device may modify the type parameter of the first socket creation request. A protocol stack corresponding to the modified type parameter is the same as a protocol stack supported by the secondcomputing device. For example, it is assumed that the target application is an IPv4 applica- tion, the type parameter of the first socket creation re- quest is AF_INET, and the second computing device supports IPv6. In this case, the first computing device may modify the type parameter of the first socket creation request to AF_INET6. For another example, it is as- sumed that the target application is an IPv6 application, the type parameter of the first socket creation request is AF_INET6, and the second computing device supports IPv4. In this case, the first computing device may modify the type parameter of the first socket creation request to AF_INET.

[0103] The first computing device may create the sock- et based on the modified type parameter. For example, when the modified type parameter is AF_INET6, the first computing device may create an IPv6 socket; or when the modified type parameter is AF_INET, the first computing device may create an IPv4 socket. According to this design,the first computing device may generate a socket that matches the protocol stack supported by the second computing device, to ensure that the first computing device can subsequently correctly access the second computing device based on the socket.

[0104] S403: Receive an address binding request sent by the target application. 5 10 15 20 25 30 35 40 45 50 55 12 21 EP 4 694 092 A1 22

[0105] Optionally, the address binding request sent by the target application is used to request to bind a local IP address of the first computing device. In this embodiment of this application, the address binding request sent by the target application includes a third IP address, and the third IP address belongs to a first protocol stack. The target application may obtain the third IP address from a configuration file, and generate the address binding re- quest based on the obtained third IP address. Optionally, the third IP address may be an address of the first computing device under the first protocolstack; or the third IP address may be any IP address under the first protocol stack. In other words, the third IP address in the address binding request may not be an actual address of the first computing device.

[0106] In an optional implementation, after receiving the address binding request from the target application, the first computing device may determine whether a preset address mapping relationship includes a mapping relationship between the third IP address and a fourth IP address, and after determining that the preset address mapping relationship includes the mapping relationship between the third IP address and the fourth IP address, perform S404.

[0107] S404: Modify the third IP address in the address binding request to the fourth IP address based on the preset address mapping relationship, and bind the fourth IP address to the socket according to the address binding request.

[0108] In an optional implementation, the first comput- ing device may store the preset addressmapping rela- tionship. For example, the first protocol stack and a second protocol stack are IPv4 and IPv6. The address mapping relationship may include an IPv4 address and an IPv6 address that correspond to the first computing device, and may further include an IPv4 address and an IPv6 address that correspond to the second computing device. In this embodiment of this application, an IP address under another protocol stack may be assigned to the first computing device. For example, if the first computing device supports IPv4 in an initial state, an IP address under IPv6 may be assigned to the first comput- ing device, and a mapping relationship between the IPv4 address and the IPv6 address of the first computing device is stored.

[0109] In some embodiments, when initiating the ad- dress binding request, the target application in the first computing device may obtain the third IP address of the first computing device from the configuration file. If the third IP address in theconfiguration file is a preconfigured fake address under the first protocol stack, a mapping relationship between the fake address and an actual address of the first computing device under the second protocol stack may be stored in the address mapping relationship. If the third IP address in the configuration file is an actual address of the first computing device under the first protocol stack, a mapping relationship between the actual address of the first computing device under the first protocol stack and the actual address of the first computing device under the second protocol stack may be stored in the address mapping relationship.

[0110] The first computing device may modify the third IP address in the address binding request to the fourth IP address based on the preset address mapping relation- ship. The fourth IP address is an IP address of the first computing device under the second protocol stack, and a protocol stack to which the fourth IP address belongs is the same as theprotocol stack supported by the second computing device. For example, it is assumed that the target application is an IPv4 application, the third IP address is an IPv4 address, and the second computing device supports IPv6. In this case, the fourth IP address after modification by the first computing device is an IPv6 address of the first computing device. For another ex- ample, it is assumed that the target application is an IPv6 application, the third IP address is an IPv6 address, and the second computing device supports IPv4. In this case, the fourth IP address after modification by the first com- puting device is an IPv4 address of the first computing device.

[0111] The first computing device may bind the fourth IP address to the socket according to the address binding request with address modification.

[0112] According to this design, after receiving the address binding request, the first computing device may modify a local IP address in the address binding request to a local IPaddress under the protocol stack supported by the second computing device, so that the first computing device may bind a modified local IP ad- dress to the socket, thereby successfully accessing the second computing device based on the socket.

[0113] It should be noted that during specific imple- mentation, S403 and S404 are optional steps, and the target application may not initiate the address binding request. In this case, when establishing a connection to the second computing device, the first computing device may select a fourth IP address from a plurality of IP addresses of the first computing device. A protocol to which the fourth IP address belongs is the same as a protocol supported by the second computing device.

[0114] S405: Receive a connection request initiated by the target application.

[0115] The connection request initiated by the target application is used to request the first computing device to establish a connection to the second computing de- vice. The connectionrequest includes a first IP address, and the first IP address belongs to the first protocol stack. The target application may obtain the first IP address from the configuration file, and generate the connection request based on the obtained first IP address. Option- ally, the first IP address may be any IP address under the first protocol stack. In other words, the first IP address in the connection request may not be an actual address of the second computing device.

[0116] In an optional implementation, after receiving the connection request from the target application, the 5 10 15 20 25 30 35 40 45 50 55 13 23 EP 4 694 092 A1 24 first computing device may determine whether the preset address mapping relationship includes a mapping rela- tionship between the first IP address and a second IP address. The second IP address is an IP address of the second computing device under the second protocol stack supported by the second computing device. After it is determined that the presetaddress mapping relation- ship includes the mapping relationship between the first IP address and the second IP address, S406 is per- formed.

[0117] S406: Modify the first IP address in the connec- tion request to the second IP address based on the preset address mapping relationship.

[0118] It can be learned from the foregoing descrip- tions that when a protocol stack supported by the first computing device is different from the protocol stack supported by the second computing device, and the IP address of the second computing device in the connec- tion request is not an actual IP address of the second computing device, the first computing device needs to modify the IP address of the second computing device in the connection request. In this embodiment of this appli- cation, the first computing device may modify the first IP address in the connection request to the second IP ad- dress based on the preset address mapping relationship. A protocol to which the first IP address belongs isthe same as a protocol supported by the first computing device, and a protocol stack to which the first IP address belongs is the first protocol stack. A protocol to which the second IP address belongs is the same as the protocol supported by the second computing device, and the second IP address is an IP address of the second com- puting device under the second protocol stack.

[0119] For example, it is assumed that the target ap- plication is an IPv4 application, the first IP address in the connection request is an IPv4 address, and the second computing device supports IPv6. In this case, the second IP address after modification by the first computing de- vice is an IPv6 address. For another example, it is as- sumed that the target application is an IPv6 application, the first IP address in the connection request is an IPv6 address, and the second computing device supports IPv4. In this case, the second IP address after modifica- tion by the first computing device is an IPv4 address.

[0120] According to this design, the first computing device may modify a peer IP address in the connection request initiated by the target application to an IP address of the second computing device under an actual protocol stack, to ensure that the first computing device can establish a connection to the second computing device based on an accurate IP address, thereby achieving network access from the first computing device to the second computing device.

[0121] S407: Establish a connection to the second computing device based on the socket and the connec- tion request.

[0122] In an optional implementation, the first comput- ing device may establish a connection to the second computing device based on the socket created based on the modified type parameter, and based on the fourth IP address and the second IP address in the connection request.

[0123] S408: Perform system call processing based on the second IP address.

[0124] Optionally, the system call processing includes reading amessage from the second computing device and / or sending a message to the second computing device.

[0125] According to the network access method pro- vided in this embodiment of this application, when receiv- ing the socket creation request from the target applica- tion, the first computing device may modify a type para- meter of the socket, to generate a socket that matches the protocol stack of the second computing device, and the first computing device modifies a destination IP ad- dress in the connection request initiated by the target application to an IP address of the second computing device under an actual protocol stack, to ensure that the first computing device can establish a connection to the second computing device based on an accurate IP ad- dress.

[0126] Based on the structure of the computing appa- ratus shown in FIG. 3, the following further describes the network access method provided in embodiments of this application from a perspective of interaction between modulesin the first computing device. FIG. 5A and FIG. 5B are a flowchart of a network access method according to an embodiment of this application. The method may be performed by a target application, a kernel network module, and a conversion module in a first computing device. Refer to FIG. 5A and FIG. 5B. The method includes the following steps.

[0127] S501: The target application sends a first socket creation request to the kernel network module.

[0128] The first socket creation request is used to request to create a socket for accessing a target applica- tion in a second computing device. For example, the target application is an IPv6 application, and a type parameter of the first socket creation request is AF_I- NET6.

[0129] S502: The kernel network module sends the first socket creation request to the conversion module.

[0130] Optionally, after receiving the first socket crea- tion request, and before modifying the type parameter of the first socket creation request, the conversionmodule may determine whether the target application belongs to a preset application list. After it is determined that the preset application list includes the target application, S503 is performed.

[0131] S503: The conversion module modifies the type parameter of the first socket creation request.

[0132] For example, if the target application is an IPv6 application, and the second computing device supports IPv4, the conversion module may modify the type para- meter of the first socket creation request from AF_INET6 to AF_INET. 5 10 15 20 25 30 35 40 45 50 55 14 25 EP 4 694 092 A1 26

[0133] S504: The conversion module sends a modified first socket creation request to the kernel network mod- ule.

[0134] S505: The kernel network module creates a socket based on a modified type parameter.

[0135] S506: The kernel network module returns an execution result to the target application.

[0136] S507: The target application sends an address binding request to the kernel network module.

[0137] Optionally, the address binding request sent by the target application is used to request to bind an IP address of the first computing device. For example, a third IP address included in the address binding request is FE80::1234::2.

[0138] S508: The kernel network module sends the address binding request to the conversion module.

[0139] Optionally, after receiving the address binding request, the conversion module may determine whether a preset address mapping relationship includes a map- ping relationship between the third IP address and a fourth IP address. After it is determined that the preset address mapping relationship includes the mapping re- lationship between the third IP address and the fourth IP address, S509 is performed.

[0140] S509: The conversion module modifies the third IP address in the address binding request to the fourth IP address based on the preset address mapping relation- ship.

[0141] For example, the conversion module modifies the third IP addressFE80::1234::2 in the binding request to the fourth IP address 192.168.1.2.

[0142] S510: The conversion module sends the ad- dress binding request with address modification to the kernel network module.

[0143] S511: The kernel network module binds the fourth IP address to the socket according to the address binding request.

[0144] S512: The kernel network module returns an execution result to the target application.

[0145] S513: The target application sends a connec- tion request to the kernel network module.

[0146] Optionally, the connection request sent by the target application is used to request the first computing device to establish a connection to the second computing device. For example, a first IP address included in the connection request is FE80::1234::1:80.

[0147] S514: The kernel network module sends the connection request to the conversion module.

[0148] Optionally, after receiving the connection re- quest, the conversion module may determine whether the preset addressmapping relationship includes a map- ping relationship between the first IP address and a second IP address. After it is determined that the preset address mapping relationship includes the mapping re- lationship between the first IP address and the second IP address, S515 is performed.

[0149] S515: The conversion module modifies the first IP address in the connection request to the second IP address based on the preset address mapping relation- ship.

[0150] For example, the conversion module modifies the first IP address FE80::1234::1:80 in the binding re- quest to the second IP address 192.168.1.1.

[0151] S516: The conversion module sends the con- nection request with address modification to the kernel network module.

[0152] S517: The kernel network module establishes a connection to the second computing device based on the socket and the connection request.

[0153] S518: The kernel network module returns an execution result to the target application.

[0154] S519: The targetapplication sends a write re- quest to the kernel network module.

[0155] S520: The kernel network module sends a data packet to the second computing device according to the received write request.

[0156] S521: The target application sends a read re- quest to the kernel network module.

[0157] S522: The kernel network module receives, according to the received read request, a data packet sent by the second computing device.

[0158] FIG. 6 is a flowchart of a network access method according to an embodiment of this application. The method may be executed by a second computing device or a kernel mode of the second computing device. In this embodiment, the second computing device may listen for a message sent by a target application in another device. Refer to FIG. 6. The method includes the following steps.

[0159] S601: Receive a second socket creation re- quest initiated by a target application.

[0160] Optionally, the second socket creation request is used to request to create a socket forlistening for a message sent by a target application in another device.

[0161] S602: Modify a type parameter of the second socket creation request, and create a socket based on a modified type parameter.

[0162] The second socket creation request includes the type parameter of the second socket creation re- quest, and the second computing device may modify the type parameter of the second socket creation re- quest. For example, if the type parameter of the second socket creation request is AF_INET, and the target ap- plication is an IPv6 application, the second computing device may modify the type parameter of the second socket creation request to AF_INET6. For another ex- ample, if the type parameter of the second socket crea- tion request is AF_INET6, and the target application is an IPv4 application, the second computing device may mod- ify the type parameter of the second socket creation request to AF_INET.

[0163] The second computing device may create the socket based on themodified type parameter. For ex- ample, when the modified type parameter is AF_INET6, the second computing device may create an IPv6 socket; or when the modified type parameter is AF_INET, the second computing device may create an IPv4 socket. 5 10 15 20 25 30 35 40 45 50 55 15 27 EP 4 694 092 A1 28

[0164] S603: Receive an address binding request in- itiated by the target application.

[0165] The address binding request is used to request to bind an IP address of the second computing device. In this embodiment of this application, the address binding request includes a first IP address, and the first IP ad- dress belongs to a first protocol stack. The target appli- cation may obtain the first IP address from a configuration file, and generate the address binding request based on the obtained first IP address. Optionally, the first IP ad- dress may be an address of the second computing device under the first protocol stack; or the first IP address may be any IP address under the firstprotocol stack. In other words, the first IP address in the address binding request may not be an actual address of the second computing device.

[0166] In an optional implementation, after receiving the address binding request from the target application, the second computing device may determine whether a preset address mapping relationship includes a mapping relationship between the first IP address and a second IP address, and after determining that the preset address mapping relationship includes the mapping relationship between the first IP address and the second IP address, perform S604.

[0167] S604: Modify the first IP address in the address binding request to the second IP address based on the preset address mapping relationship, and bind the socket to the second IP address according to the address bind- ing request.

[0168] In an optional implementation, the second com- puting device may store the preset address mapping relationship. For example, the first protocol stack and asecond protocol stack are IPv4 and IPv6. The address mapping relationship may include an IPv4 address and an IPv6 address of the second computing device. In this embodiment of this application, an IP address under another protocol stack may be assigned to the second computing device. For example, if the second computing device supports IPv4 in an initial state, an IP address under IPv6 may be assigned to the second computing device, and a mapping relationship between the IPv4 address and the IPv6 address of the second computing device is stored.

[0169] In some embodiments, when initiating the ad- dress binding request, the target application in the sec- ond computing device may obtain the first IP address of the second computing device from the configuration file. If the first IP address in the configuration file is a pre- configured fake address under the first protocol stack, a mapping relationship between the fake address and an actual address of the second computing device underthe second protocol stack may be stored in the address mapping relationship. If the first IP address in the con- figuration file is an actual address of the second comput- ing device under the first protocol stack, a mapping relationship between the actual address of the second computing device under the first protocol stack and the actual address of the second computing device under the second protocol stack may be stored in the address mapping relationship.

[0170] The second computing device may modify the first IP address in the address binding request to the second IP address based on the preset address mapping relationship. The second IP address is an IP address of the second computing device under the second protocol stack. For example, it is assumed that the first IP address in the address binding request is an IPv4 address, and the target application is an IPv6 application. In this case, the second IP address after modification by the second computing device is an IPv6 addressof the second computing device. For another example, it is assumed that the first IP address in the address binding request is an IPv6 address, and the target application is an IPv4 application. In this case, the second IP address after modification by the second computing device is an IPv4 address of the second computing device.

[0171] The second computing device may bind the socket to the second IP address according to a modified address binding request, so that the second computing device can listen for a message whose destination ad- dress is the second IP address, to ensure that the second computing device can successfully receive network ac- cess initiated by the first computing device.

[0172] S605: Perform system call processing based on the second IP address.

[0173] Optionally, the system call processing includes reading a message from the first computing device of the target application and / or sending a message to the first computing device of the target application.

[0174] According to the network access method pro- vided in this embodiment of this application, when receiv- ing the socket creation request from the target applica- tion, the second computing device may modify a type parameter of the socket, to generate a socket that matches a protocol stack of the first computing device, and the second computing device modifies a server IP address in the binding request initiated by the target application to an IP address under the protocol stack of the first computing device, to ensure that the second computing device can interact with the first computing device of the target application.

[0175] Based on the structure of the computing appa- ratus shown in FIG. 3, the following further describes the network access method provided in embodiments of this application from a perspective of interaction between modules in the second computing device. FIG. 7A and FIG. 7B are a flowchart of a network access method according to an embodiment of this application.The method may be performed by a target application, a kernel network module, and a conversion module in a second computing device. Refer to FIG. 7A and FIG. 7B. The method includes the following steps.

[0176] S701: The target application sends a second socket creation request to the kernel network module.

[0177] The second socket creation request is used to 5 10 15 20 25 30 35 40 45 50 55 16 29 EP 4 694 092 A1 30 request to create a socket for listening for a message sent by a target application in another device. For example, the second computing device supports IPv4, and a type parameter of the second socket creation request is AF_I- NET.

[0178] S702: The kernel network module sends the second socket creation request to the conversion mod- ule.

[0179] Optionally, after receiving the second socket creation request, and before modifying the type para- meter of the second socket creation request, the conver- sion module may determine whether the target applica- tion belongs to a presetapplication list. After it is deter- mined that the preset application list includes the target application, S703 is performed.

[0180] S703: The conversion module modifies the type parameter of the second socket creation request.

[0181] For example, if the second computing device supports IPv4, and the target application is an IPv6 application, the conversion module may modify the type parameter of the second socket creation request from AF_INET to AF_INET6.

[0182] S704: The conversion module sends a modified second socket creation request to the kernel network module.

[0183] S705: The kernel network module creates a socket based on a modified type parameter.

[0184] S706: The kernel network module returns an execution result to the target application.

[0185] S707: The target application sends an address binding request to the kernel network module.

[0186] Optionally, the address binding request sent by the target application is used to request to bind an IP address of the secondcomputing device. For example, a first IP address included in the address binding request is 192.168.1.1.

[0187] S708: The kernel network module sends the address binding request to the conversion module.

[0188] Optionally, after receiving the address binding request, the conversion module may determine whether a preset address mapping relationship includes a map- ping relationship between the first IP address and a second IP address. After it is determined that the preset address mapping relationship includes the mapping re- lationship between the first IP address and the second IP address, S709 is performed.

[0189] S709: The conversion module modifies the first IP address in the address binding request to the second IP address based on the preset address mapping rela- tionship.

[0190] For example, the conversion module modifies the first IP address 192.168.1.1 in the binding request to a fourth IP address FE80::1234::1.

[0191] S710: The conversion module sends the ad- dress bindingrequest with address modification to the kernel network module.

[0192] S711: The kernel network module binds the socket to the second IP address according to the address binding request.

[0193] S712: The kernel network module returns an execution result to the target application.

[0194] S713: The target application sends a read re- quest to the kernel network module.

[0195] S714: The kernel network module receives, according to the received read request, a data packet sent by the first computing device.

[0196] S715: The target application sends a write re- quest to the kernel network module.

[0197] S716: The kernel network module sends a data packet to the first computing device according to the received write request. 2. Dual-stack scenario

[0198] The dual-stack scenario in embodiments of this application is that the first computing device supports an IPv4 protocol and an IPv6 protocol in an initial state.

[0199] FIG. 8 is a flowchart of a network access method according to anembodiment of this application. The method may be performed by a first computing device or a kernel mode of the first computing device. In this embodiment, the first computing device receives a re- quest initiated by a target application, and accesses a target application in a second computing device. Refer to FIG. 8. The method includes the following steps.

[0200] S801: Receive a first socket creation request initiated by the target application, and create a first socket according to the first socket creation request.

[0201] The first socket creation request is used to request to create a socket for accessing the target ap- plication in the second computing device.

[0202] The target application is an application in a preconfigured application list stored in the first computing device. An application in the preconfigured application list may reside on a different protocol stack from that of the second computing device to which the application requests to connect. The first computingdevice needs to monitor a system call request initiated by the target application. In this embodiment, the first computing de- vice supports IPv4 and IPv6 dual stacks. Therefore, when receiving the first socket creation request initiated by the target application, the first computing device can- not determine an IP address of the second computing device to which the target application requests to con- nect, and consequently cannot determine whether sock- et type conversion and network address translation need to be performed. The first computing device needs to wait until the first computing device receives a connection request initiated by the target application, to determine, based on the IP address of the second computing device in the connection request, whether socket type conver- sion and network address translation need to be per- formed.

[0203] S802: Receive the connection request initiated by the target application.

[0204] The connection request is used to request to 5 10 1520 25 30 35 40 45 50 55 17 31 EP 4 694 092 A1 32 establish a connection to the second computing device, and the connection request includes a first IP address. The first IP address belongs to a first protocol stack. The target application may obtain the first IP address from a configuration file, and generate the connection request based on the obtained first IP address. Optionally, the first IP address may be any IP address under the first protocol stack. In other words, the first IP address in the connec- tion request may not be an actual address of the second computing device.

[0205] S803: Determine that a preset address map- ping relationship includes a mapping relationship be- tween the first IP address and a second IP address.

[0206] In an optional implementation, the first comput- ing device stores the preset address mapping relation- ship. When receiving the connection request, the first computing device may obtain the first IP address in the connection request, and querywhether the preset ad- dress mapping relationship includes the mapping rela- tionship between the first IP address and the second IP address. The second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device. If the preset address mapping relationship includes the mapping re- lationship between the first IP address and the second IP address, it indicates that the first computing device needs to translate the address in the connection request.

[0207] S804: Close the first socket, and generate a third socket creation request.

[0208] Optionally, the first computing device may close the first socket created in S801, and generate the third socket creation request. An index of the third socket creation request is the same as an index of the first socket creation request, and a type parameter of the third socket creation request is different from a type parameter of the first socket creation request.

[0209] In anoptional implementation, during creation of socket creation requests, because a kernel always assigns a process with a smallest index in current pro- cesses, the first computing device needs to sequentially generate socket creation requests according to an index order until the third socket creation request with the same index as the first socket creation request is generated. After generating the third socket creation request, the first computing device may close another useless socket creation request. In addition, the type parameter of the third socket creation request generated by the first com- puting device is different from the type parameter of the first socket creation request, and a protocol stack corre- sponding to the type parameter of the third socket crea- tion request is the same as a protocol stack supported by the second computing device. For example, when the type parameter of the first socket creation request is AF_INET, the type parameter of the third socketcreation request is AF_INET6; or when the type parameter of the first socket creation request is AF_INET6, the type para- meter of the third socket creation request is AF_INET.

[0210] Optionally, the index of the socket creation re- quest in this embodiment of this application may be a file descriptor.

[0211] S805: Create a second socket according to the third socket creation request.

[0212] In this embodiment of this application, the type parameter of the third socket creation request generated by the first computing device is different from the type parameter of the first socket creation request, and a protocol stack corresponding to the third socket creation request is the same as the protocol stack supported by the second computing device. The first computing device may create the second socket according to the third socket creation request, to ensure that a protocol stack corresponding to a type parameter of the second socket is the protocol stack supported by the second computingdevice. In this way, the first computing device can perform network access to the second computing device based on the second socket.

[0213] S806: Modify the first IP address in the connec- tion request to the second IP address based on the preset address mapping relationship.

[0214] In this embodiment of this application, the first computing device may modify the first IP address in the connection request to the second IP address based on the preset address mapping relationship. The second IP address is an IP address of the second computing device under the second protocol stack.

[0215] For example, it is assumed that the target ap- plication is an IPv4 application, the first IP address in the connection request is an IPv4 address, and the second computing device supports IPv6. In this case, the second IP address after modification by the first computing de- vice is an IPv6 address. For another example, it is as- sumed that the target application is an IPv6 application, the first IPaddress in the connection request is an IPv6 address, and the second computing device supports IPv4. In this case, the second IP address after modifica- tion by the first computing device is an IPv4 address.

[0216] According to the network access method pro- vided in this embodiment of this application, because the index of the third socket creation request is the same as the index of the first socket creation request, after gen- erating the second socket and modifying the address in the connection request, the first computing device may continue a procedure of the original connection request based on the second socket and the second IP address in a modified connection request, to establish a connection to the second computing device and implement network access to the second computing device.

[0217] S807: Establish a connection to the second computing device based on the second socket and the connection request.

[0218] In an optional implementation, the first comput- ing device mayselect a fourth IP address from a plurality of IP addresses of the first computing device. A protocol to which the fourth IP address belongs is the same as a protocol that is supported by the second computing de- vice and that is of the target application. The first comput- 5 10 15 20 25 30 35 40 45 50 55 18 33 EP 4 694 092 A1 34 ing device may establish the connection to the second computing device based on the second socket, the fourth IP address, and the second IP address in the connection request.

[0219] S808: Perform system call processing based on the second IP address.

[0220] Optionally, the system call processing includes reading a message from the second computing device and / or sending a message to the second computing device.

[0221] According to the network access method pro- vided in this embodiment of this application, when the first computing device supports dual stacks, the first comput- ing device determines that the preset address mapping relationship includes adestination IP address to which the connection request requests to connect, and then generates a new socket creation request and translates an IP address of the second computing device, to ensure that the first computing device can accurately identify a service for which network address translation is to be performed, and establish a connection to the second computing device based on an accurate IP address.

[0222] Based on the structure of the computing appa- ratus shown in FIG. 3, the following further describes the network access method provided in embodiments of this application from a perspective of interaction between modules in the first computing device. FIG. 9A and FIG. 9B are a flowchart of a network access method according to an embodiment of this application. The method may be performed by a target application, a kernel network module, and a conversion module in a first computing device. Refer to FIG. 9A and FIG. 9B. The method includes the following steps.

[0223] S901: Thetarget application sends a first socket creation request to the kernel network module.

[0224] The first socket creation request is used to request to create a socket for accessing a target applica- tion in a second computing device. For example, the target application is an IPv6 application, and a type parameter of the first socket creation request is AF_I- NET6.

[0225] S902: The kernel network module creates a first socket according to the first socket creation request.

[0226] S903: The target application sends a connec- tion request to the kernel network module.

[0227] Optionally, the connection request sent by the target application is used to request the first computing device to establish a connection to the second computing device. For example, a first IP address included in the connection request is 192.168.1.1.

[0228] S904: The kernel network module sends the connection request to the conversion module.

[0229] S905: The conversion module determines that a preset address mappingrelationship includes a map- ping relationship between the first IP address and a second IP address.

[0230] S906: The conversion module sends an ac- knowledgment message to the kernel network module.

[0231] S907: The kernel network module closes the first socket, and generates a third socket creation re- quest.

[0232] An index of the third socket creation request is the same as an index of the first socket creation request, and a type parameter of the third socket creation request is different from a type parameter of the first socket creation request.

[0233] S908: The kernel network module generates a second socket according to the third socket creation request.

[0234] S909: The conversion module modifies the first IP address in the connection request to the second IP address based on the preset address mapping relation- ship.

[0235] For example, the conversion module modifies the first IP address 192.168.1.1 in a binding request to the second IP address FE80::1234::1:80.

[0236] S910:The conversion module sends the con- nection request with address modification to the kernel network module.

[0237] S911: The kernel network module establishes a connection to the second computing device based on the second socket and the connection request.

[0238] S912: The kernel network module returns an execution result to the target application.

[0239] S913: The target application sends a write re- quest to the kernel network module.

[0240] S914: The kernel network module sends a data packet to the second computing device according to the received write request.

[0241] S915: The target application sends a read re- quest to the kernel network module.

[0242] S916: The kernel network module receives, according to the received read request, a data packet sent by the second computing device.

[0243] In addition, in some embodiments, the network access method provided in embodiments of this applica- tion may be further applied to network access between devices having a plurality of IPaddresses under a same IP protocol stack. For example, embodiments of this application may be further configured to implement net- work address translation between an IPv4 address and an IPv4 address, or network address translation between an IPv6 address and an IPv6 address. In this implemen- tation, the conversion module also needs to prestore an address mapping relationship, and perform network ad- dress translation based on the address mapping relation- ship. For specific implementation, refer to the foregoing embodiments. Details are not described herein again.

[0244] Based on the foregoing embodiments, this ap- plication further provides a computing device 1000. As shown in FIG. 10, the computing device 1000 includes a bus 1002, a processor 1004, a memory 1006, and a communication interface 1008. The processor 1004, the memory 1006, and the communication interface 1008 communicate with each other through the bus 1002. The computing device 1000 may be a second 5 10 15 20 25 30 3540 45 50 55 19 35 EP 4 694 092 A1 36 computing device or a first computing device, and may be configured to perform functions performed by the second computing device or the first computing device in the network access method provided in embodiments of this application. It should be understood that quantities of processors and memories in the computing device 1000 are not limited in this application.

[0245] The bus 1002 may be a peripheral component interconnect (peripheral component interconnect, PCI) bus, an extended industry standard architecture (ex- tended industry standard architecture, EISA) bus, or the like. Buses may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, the bus is represented by using only one line in FIG. 10, but it does not mean that there is only one bus or only one type of bus. The bus 1002 may include a path for transferring information between var- ious components (for example, the memory 1006, theprocessor 1004, and the communication interface 1008) of the computing device 1000.

[0246] The processor 1004 may include any one or more of processors such as a central processing unit (central processing unit, CPU), a graphics processing unit (graphics processing unit, GPU), a microprocessor (microprocessor, MP), or a digital signal processor (digi- tal signal processor, DSP).

[0247] The memory 1006 may include a volatile mem- ory (volatile memory), for example, a random access memory (random access memory, RAM). The processor 1004 may further include a non-volatile memory (non- volatile memory), for example, a read-only memory (read-only memory, ROM), a flash memory, a hard disk drive (hard disk drive, HDD), or a solid-state drive (solid- state drive, SSD). It should be noted that the memory in the methods described in this specification is intended to include but is not limited to these memories and any other memory of a proper type.

[0248] The memory 1006 stores executable programcode, and the processor 1004 executes the executable program code to separately implement functions per- formed by the first computing device or the second com- puting device, to implement the network access method provided in embodiments of this application. In other words, the memory 106 stores instructions for performing the network access method. For example, the memory 1006 in the computing device 1000 stores instructions for executing functions of a kernel network module and a conversion module.

[0249] The communication interface 1008 uses a transceiver module, for example, but not limited to, a network interface card or a transceiver, to implement communication between the computing device 1000 and another device or a communication network.

[0250] An embodiment of this application further pro- vides a computing device cluster. The computing device cluster includes at least one computing device. The computing device may be a server, for example, a central server, an edge server,or a local server in a local data center. In some embodiments, the computing device may alternatively be a terminal device, for example, a desktop computer, a notebook computer, or a smartphone.

[0251] As shown in FIG. 11, the computing device cluster includes at least one computing device 1000. A memory 1006 in one or more computing devices 1000 in the computing device cluster may store same instruc- tions for performing the methods provided in embodi- ments of this application.

[0252] In some possible implementations, the memory 1006 in the one or more computing devices 1000 in the computing device cluster may alternatively separately store some instructions for performing the methods pro- vided in embodiments of this application. In other words, a combination of the one or more computing devices 1000 may jointly execute instructions for performing the methods provided in embodiments of this application.

[0253] It should be noted that memories 1006 in differ- ent computing devices1000 in the computing device cluster may store different instructions respectively used for performing some functions performed by the first computing device or the second computing device in the foregoing method embodiments. In other words, in- structions stored in the memories 1006 in different com- puting devices 1000 may implement functions of one or more modules in the first computing device, or implement functions of one or more modules in the second comput- ing device.

[0254] In some possible implementations, the one or more computing devices in the computing device cluster may be connected through a network. The network may be a wide area network, a local area network, or the like. FIG. 12 shows a possible implementation. As shown in FIG. 12, two computing devices 1000A and 1000B are connected through a network. Specifically, the computing devices are connected to the network through commu- nication interfaces in the computing devices. In such possible implementations, a memory1006 in the com- puting device 1000A stores instructions for performing functions of the kernel network module. In addition, a memory 1006 in the computing device 1000B stores instructions for performing functions of the conversion module.

[0255] An embodiment of this application further pro- vides another computing device cluster. For a connection relationship between computing devices in the comput- ing device cluster, refer to connection manners of the computing device cluster in FIG. 11 and FIG. 12 similarly. A difference lies in that a memory 1006 in one or more computing devices 1000 in the computing device cluster may store same instructions for performing the network access method.

[0256] In some possible implementations, the memory 1006 in the one or more computing devices 1000 in the computing device cluster may alternatively separately store some instructions for performing the network ac- cess method. In other words, a combination of the one or more computing devices 1000may jointly execute the 5 10 15 20 25 30 35 40 45 50 55 20 37 EP 4 694 092 A1 38 instructions for performing the network access method.

[0257] Based on the foregoing embodiments, this ap- plication further provides a computer program. When the computer program is run on a computer, the computer is enabled to perform the methods described in embodi- ments of this application.

[0258] Based on the foregoing embodiments, this ap- plication further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a computer, the computer is enabled to perform the methods described in embodiments of this application.

[0259] Based on the foregoing embodiments, this ap- plication further provides a chip. The chip is configured to read a computer program stored in a memory, to imple- ment the methods described in embodiments of this application.

[0260] Based on the foregoing embodiments, this ap- plicationprovides a chip system. The chip system in- cludes a processor, configured to support a computer apparatus in implementing the methods described in embodiments of this application. In a possible design, the chip system further includes a memory, and the memory is configured to store a program and data that are necessary for the computer apparatus. The chip system may include a chip, or may include a chip and another discrete component.

[0261] A person skilled in the art should understand that embodiments of this application may be provided as a method, a system, or a computer program product. Therefore, this application may use a form of a hardware- only embodiment, a software-only embodiment, or an embodiment with a combination of software and hard- ware. In addition, this application may use a form of a computer program product that is implemented on one or more computer-usable storage media (including but not limited to a disk memory, a CD-ROM, an optical memory, and the like) thatinclude computer-usable program code.

[0262] This application is described with reference to the flowcharts and / or block diagrams of the method, the device (system), and the computer program product according to this application. It should be understood that computer program instructions may be used to im- plement each process and / or each block in the flowcharts and / or the block diagrams and a combination of a pro- cess and / or a block in the flowcharts and / or the block diagrams. These computer program instructions may be provided for a general-purpose computer, a dedicated computer, an embedded processor, or a processor of any other programmable data processing device to generate a machine, so that the instructions executed by a com- puter or a processor of any other programmable data processing device generate an apparatus for implement- ing a specific function in one or more processes in the flowcharts and / or in one or more blocks in the block diagrams.

[0263] These computer programinstructions may be stored in a computer-readable memory that can instruct the computer or any other programmable data proces- sing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate an artifact that includes an instruction appara- tus. The instruction apparatus implements a specific function in one or more processes in the flowcharts and / or in one or more blocks in the block diagrams.

[0264] These computer program instructions may al- ternatively be loaded onto a computer or another pro- grammable data processing device, so that a series of operations and steps are performed on the computer or the another programmable device, thereby generating computer-implemented processing. Therefore, the in- structions executed on the computer or the another pro- grammable device provide steps for implementing a specific function in one or more processes in the flow- charts and / or in one or more blocks in the block diagrams.

[0265] It isclear that a person skilled in the art can make various modifications and variations to this appli- cation without departing from the scope of this applica- tion. In this way, if these modifications and variations to this application fall within the scope of the claims of this application and equivalent technologies thereof, this ap- plication is also intended to include these modifications and variations. Claims 1. A network access method, comprising: receiving a first socket creation request initiated by a target application in a first computing de- vice, wherein the first socket creation request is used to request to create a socket for accessing a target application in a second computing de- vice; modifying a type parameter of the first socket creation request, and creating a socket based on a modified type parameter, wherein a proto- col stack corresponding to the modified type parameter is the same as a protocol stack sup- ported by the second computing device; receiving aconnection request initiated by the target application in the first computing device, wherein the connection request is used to re- quest to establish a connection to the second computing device, and the connection request comprises a first internet protocol IP address; modifying the first IP address in the connection request to a second IP address based on a preset address mapping relationship, wherein the first IP address belongs to a first protocol stack, and the second IP address is an IP ad- dress of the second computing device under a second protocol stack supported by the second computing device; and 5 10 15 20 25 30 35 40 45 50 55 21 39 EP 4 694 092 A1 40 establishing a connection to the second comput- ing device based on the socket and the connec- tion request. 2. The method according to claim 1, wherein after creating the socket based on the modified type para- meter, and before receiving the connection request initiated by the target application in the first comput- ingdevice, the method further comprises: receiving an address binding request initiated by the target application in the first computing de- vice, wherein the address binding request com- prises a third IP address; modifying the third IP address in the address binding request to a fourth IP address based on the preset address mapping relationship; and binding the fourth IP address to the socket according to the address binding request, wherein the third IP address belongs to the first protocol stack, and the fourth IP address is an IP address of the first computing device under the second protocol stack; and establishing the connection to the second com- puting device based on the socket and the con- nection request comprises: establishing the connection to the second com- puting device based on the socket, the fourth IP address, and the second IP address in the con- nection request. 3. The method according to claim 2, wherein after receiving the address binding request initiated by thetarget application, and before modifying the first IP address in the address binding request to the second IP address based on the preset address mapping relationship, the method further comprises: determining that the preset address mapping rela- tionship comprises a mapping relationship between the first IP address and the second IP address. 4. The method according to claim 1, wherein establish- ing the connection to the second computing device based on the socket and the connection request comprises: selecting a fourth IP address from a plurality of IP addresses of the first computing device, wherein the fourth IP address and the second IP address belong to a same protocol stack; and establishing the connection to the second com- puting device based on the socket, the fourth IP address, and the second IP address in the con- nection request. 5. The method according to any one of claims 1 to 4, wherein after receiving the first socket creation re- quest initiated by the targetapplication, and before modifying the type parameter of the first socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed. 6. The method according to claim 5, wherein the preset application list is preconfigured by a system or is customized by a user; and the preset address mapping relationship is precon- figured by the system or is customized by the user. 7. The method according to any one of claims 1 to 6, wherein after receiving the connection request in- itiated by the target application in the first computing device, and before modifying the first IP address in the connection request to the second IP address based on the preset address mapping relationship, the method further comprises: determining that the preset address mapping rela- tionship comprises a mapping relationshipbetween the first IP address and the second IP address. 8. The method according to any one of claims 1 to 7, wherein after establishing the connection to the sec- ond computing device based on the socket and the connection request, the method further comprises: performing system call processing based on the second IP address, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second com- puting device. 9. The method according to any one of claims 1 to 8, wherein the first protocol stack is an IPv4 protocol stack, and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack, and the second protocol stack is an IPv4 protocol stack. 10. A network access method, comprising: receiving a second socket creation request in- itiated by a target application in a second com- puting device, wherein the second socket crea- tion request is used to request to create a socketfor listening for a message sent by a target application in another device; modifying a type parameter of the second socket creation request, and creating a socket based on a modified type parameter, wherein a proto- col stack corresponding to the modified type parameter is the same as a protocol stack that is supported by a first computing device and that corresponds to the target application; receiving an address binding request initiated by 5 10 15 20 25 30 35 40 45 50 55 22 41 EP 4 694 092 A1 42 the target application in the second computing device, wherein the address binding request comprises a first internet protocol IP address; modifying the first IP address in the address binding request to a second IP address based on a preset address mapping relationship, wherein the first IP address belongs to a first protocol stack, the second IP address is an IP address of the second computing device under the second protocol stack, and the second pro- tocol stack is the protocol stackthat is supported by the first computing device and that corre- sponds to the target application; and binding the socket to the second IP address according to the address binding request. 11. The method according to claim 10, wherein after receiving the second socket creation request in- itiated by the target application in the second com- puting device, and before modifying the type para- meter of the second socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed. 12. The method according to claim 11, wherein the pre- set application list is preconfigured by a system or is customized by a user; and the preset address mapping relationship is precon- figured by the system or is customized by the user. 13. The method according to any one of claims 10 to 12, wherein after receiving theaddress binding request initiated by the target application in the second com- puting device, and before modifying the first IP ad- dress in the address binding request to the second IP address based on the preset address mapping re- lationship, the method further comprises: determining that the preset address mapping rela- tionship comprises a mapping relationship between the first IP address and the second IP address. 14. The method according to any one of claims 10 to 13, wherein after binding the socket to the second IP address according to the address binding request, the method further comprises: performing system call processing based on the second IP address, wherein the system call processing comprises reading a message from the first computing device and / or sending a message to the first computing de- vice. 15. The method according to any one of claims 10 to 14, wherein the first protocol stack is an IPv4 protocol stack, and the second protocol stack is an IPv6 protocolstack; or the first protocol stack is an IPv6 protocol stack, and the second protocol stack is an IPv4 protocol stack. 16. A network access method, comprising: receiving a first socket creation request initiated by a target application in a first computing de- vice, wherein the first socket creation request is used to request to create a socket for accessing a target application in a second computing de- vice; creating a first socket according to the first sock- et creation request; receiving a connection request initiated by the target application in the first computing device, wherein the connection request is used to re- quest to establish a connection to the second computing device, the connection request com- prises a first internet protocol IP address, and the first IP address belongs to a first protocol stack; determining that a preset address mapping re- lationship comprises a mapping relationship be- tween the first IP address and a second IP address, wherein the second IPaddress is an IP address of the second computing device under a second protocol stack supported by the second computing device; closing the first socket, and generating a third socket creation request, wherein an index of the third socket creation request is the same as an index of the first socket creation request, a type parameter of the third socket creation request is different from a type parameter of the first socket creation request, and a protocol stack corre- sponding to the type parameter of the third sock- et creation request is the same as a protocol stack supported by the second computing de- vice; creating a second socket according to the third socket creation request; modifying the first IP address in the connection request to the second IP address based on the preset address mapping relationship, wherein a protocol stack to which the second IP address belongs is the same as the protocol stack sup- ported by the second computing device; and establishing a connection tothe second comput- ing device based on the second socket and the connection request. 17. The method according to claim 16, wherein before generating the third socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein an application in the 5 10 15 20 25 30 35 40 45 50 55 23 43 EP 4 694 092 A1 44 preset application list is an application for which network address translation is to be performed. 18. The method according to claim 17, wherein the pre- set application list is preconfigured by a system or is customized by a user; and the preset address mapping relationship is precon- figured by the system or is customized by the user. 19. The method according to any one of claims 16 to 18, wherein after establishing the connection to the sec- ond computing device based on the second socket and the connection request, the method further com- prises: performing system call processing based on the second IPaddress, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second com- puting device. 20. The method according to any one of claims 16 to 19, wherein generating the third socket creation request comprises: sequentially generating socket creation requests according to an index order until the third socket creation request is generated. 21. A computing device, comprising: a kernel network module, configured to receive a first socket creation request initiated by a target application, wherein the first socket creation request is used to request to create a socket for accessing a target application in a second computing device; and a conversion module, configured to modify a type parameter of the first socket creation re- quest, wherein a protocol stack corresponding to a modified type parameter is the same as a protocol stack supported by the second comput- ing device, wherein the kernel network module isfurther configured to: create a socket based on the modified type parameter; and receive a connection request initiated by the target application, wherein the connection request is used to request to estab- lish a connection to the second computing de- vice, the connection request comprises a first internet protocol IP address, and the first IP address belongs to a first protocol stack; the conversion module is further configured to modify the first IP address in the connection request to a second IP address based on a preset address mapping relationship, wherein the second IP address is an IP address of the second computing device under a second pro- tocol stack supported by the second computing device; and the kernel network module is further configured to establish a connection to the second comput- ing device based on the socket and the connec- tion request. 22. The device according to claim 21, wherein the kernel network module is further configured to: after creating the socketbased on the mod- ified type parameter, and before receiving the connection request initiated by the target appli- cation, receive an address binding request in- itiated by the target application, wherein the address binding request comprises a third IP address, and the third IP address belongs to the first protocol stack; the conversion module is further configured to modify the third IP address in the address bind- ing request to a fourth IP address based on the preset address mapping relationship, wherein the fourth IP address is an IP address of the first computing device under the second protocol stack; the kernel network module is further configured to bind the fourth IP address to the socket ac- cording to the address binding request; and when establishing the connection to the second computing device based on the socket and the connection request, the kernel network module is specifically configured to: establish the connection to the second comput- ing device based on thesocket, the fourth IP address, and the second IP address in the con- nection request. 23. The device according to claim 22, wherein the con- version module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the third IP address in the address binding request to the fourth IP address based on the preset address map- ping relationship, determine that the preset address mapping relationship comprises a mapping relation- ship between the third IP address and the fourth IP address. 24. The device according to claim 21, wherein the kernel network module is specifically configured to: select a fourth IP address from a plurality of IP addresses of the computing device, wherein the fourth IP address and the second IP address belong to a same protocol stack; and establish the connection to the second comput- ing device based on the socket, the fourth IP address, and the second IP address in the con- 5 10 15 20 25 30 3540 45 50 55 24 45 EP 4 694 092 A1 46 nection request. 25. The device according to any one of claims 22 to 24, wherein the conversion module is further configured to: after receiving the first socket creation request in- itiated by the target application, and before modifying the type parameter of the first socket creation re- quest, determine that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed. 26. The device according to any one of claims 21 to 25, wherein the conversion module is further configured to: after receiving the connection request initiated by the target application, and before modifying the first IP address in the connection request to the second IP address based on the preset address mapping re- lationship, determine that the preset address map- ping relationship comprises a mapping relationship between the first IP address and thesecond IP address. 27. The device according to any one of claims 21 to 26, wherein the kernel network module is further config- ured to: after establishing the connection to the second computing device based on the socket and the connection request, perform system call proces- sing based on the second IP address, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second com- puting device. 28. A computing device, comprising: a kernel network module, configured to receive a second socket creation request initiated by a target application, wherein the second socket creation request is used to request to create a socket for listening for a message sent by a target application in another device; and a conversion module, configured to modify a type parameter of the second socket creation request, wherein a protocol stack corresponding to a modified type parameter is the same as a protocol stack supported by a firstcomputing device, wherein the kernel network module is further configured to: create a socket based on the modified type parameter; and receive an address binding re- quest initiated by the target application, wherein the address binding request comprises a first server internet protocol IP address; the conversion module is further configured to modify the first IP address in the address binding request to a second IP address based on a preset address mapping relationship, wherein the first IP address belongs to a first protocol stack, the second IP address is an IP address of the second computing device under the second protocol stack, and the second protocol stack is the protocol stack that is supported by the first computing device and that corresponds to the target application; and the kernel network module is further configured to bind the socket to the second IP address according to the address binding request. 29. The device according to claim 28, wherein the kernel networkmodule is further configured to: after receiving the second socket creation request initiated by the target application, and before mod- ifying the type parameter of the second socket crea- tion request, determine that the target application belongs to a preset application list, wherein an ap- plication in the preset application list is an application for which network address translation is to be per- formed. 30. The device according to claim 28 or 29, wherein the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the first IP address in the address binding request to the second IP address based on the preset address mapping relationship, determine that the preset ad- dress mapping relationship comprises a mapping relationship between the first IP address and the second IP address. 31. The device according to any one of claims 28 to 30, wherein the kernel network module is further config-ured to: after binding the socket to the second IP address according to the address binding request, per- form system call processing based on the sec- ond IP address, wherein the system call processing comprises reading a message from the first computing device and / or sending a message to the first computing de- vice. 32. A computing device, comprising: a kernel network module, configured to: receive a first socket creation request initiated by a target application, wherein the first socket crea- tion request is used to request to create a socket for accessing a target application in a second computing device; create a first socket accord- 5 10 15 20 25 30 35 40 45 50 55 25 47 EP 4 694 092 A1 48 ing to the first socket creation request; receive a connection request initiated by the target appli- cation, wherein the connection request is used to request to establish a connection to the sec- ond computing device, the connection request comprises a first server internet protocol IP ad-dress, and the first IP address belongs to a first protocol stack; determine that a preset address mapping relationship comprises a mapping re- lationship between the first IP address and a second IP address, wherein the second IP ad- dress is an IP address of the second computing device under a second protocol stack supported by the second computing device; close the first socket, and generate a third socket creation request, wherein an index of the third socket creation request is the same as an index of the first socket creation request, a type para- meter of the third socket creation request is different from a type parameter of the first socket creation request, and a protocol stack corre- sponding to the type parameter of the third sock- et creation request is the same as a protocol stack supported by the second computing de- vice; and create a second socket according to the third socket creation request; and a conversion module, configured to modify the first IP address in theconnection request to the second IP address based on the preset address mapping relationship, wherein a protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device, wherein the kernel network module is further configured to establish a connection to the second comput- ing device based on the second socket and the connection request. 33. The device according to claim 32, wherein the con- version module is further configured to: before generating the third socket creation request, determine that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed. 34. The device according to claim 32 or 33, wherein the kernel network module is further configured to: after establishing the connection to the second computing device based on the second socket and the connection request, perform systemcall processing based on the second IP address, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second com- puting device. 35. The device according to any one of claims 32 to 34, wherein the kernel network module is specifically configured to: sequentially generate socket creation requests ac- cording to an index order until the third socket crea- tion request is generated. 36. A computing device, comprising a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, so that the computing device performs the method according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the method according to any one of claims 16 to 20. 37. A computing device cluster, comprising at least one computing device, wherein each computing device comprises a processor and a memory; and the processor of the at least onecomputing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the meth- od according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the method according to any one of claims 16 to 20. 38. A computer program product comprising instruc- tions, wherein when the instructions are run by a computing device, the computing device performs the method according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the method according to any one of claims 16 to 20. 39. A computer-readable storage medium, comprising computer program instructions, wherein when the computer program instructions are executed by a computing device, the computing device performs the method according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the methodaccording to any one of claims 16 to 20. 5 10 15 20 25 30 35 40 45 50 55 26 EP 4 694 092 A1 27 EP 4 694 092 A1 28 EP 4 694 092 A1 29 EP 4 694 092 A1 30 EP 4 694 092 A1 31 EP 4 694 092 A1 32 EP 4 694 092 A1 33 EP 4 694 092 A1 34 EP 4 694 092 A1 35 EP 4 694 092 A1 36 EP 4 694 092 A1 37 EP 4 694 092 A1 38 EP 4 694 092 A1 5 10 15 20 25 30 35 40 45 50 55 39 EP 4 694 092 A1 5 10 15 20 25 30 35 40 45 50 55 40 EP 4 694 092 A1 5 10 15 20 25 30 35 40 45 50 55 41 EP 4 694 092 A1 REFERENCES CITED IN THE DESCRIPTION This list of references cited by the applicant is for the reader’s convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard. Patent documents cited in the description • CN 202310497837

[0001] • CN 202310954685

[0001]

Claims

1. A network access method, comprising: receiving a first socket creation request initiated by a target application in a first computing device, wherein the first socket creation request is used to request to create a socket for accessing a target application in a second computing device; modifying a type parameter of the first socket creation request, and creating a socket based on a modified type parameter, wherein a protocol stack corresponding to the modified type parameter is the same as a protocol stack supported by the second computing device; receiving a connection request initiated by the target application in the first computing device, wherein the connection request is used to request to establish a connection to the second computing device, and the connection request comprises a first internet protocol IP address; modifying the first IP address in the connection request to a second IP address based on a preset address mapping relationship, wherein the first IP address belongs to a first protocol stack, and the second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device; and establishing a connection to the second computing device based on the socket and the connection request.

2. The method according to claim 1, wherein after creating the socket based on the modified type parameter, and before receiving the connection request initiated by the target application in the first computing device, the method further comprises: receiving an address binding request initiated by the target application in the first computing device, wherein the address binding request comprises a third IP address; modifying the third IP address in the address binding request to a fourth IP address based on the preset address mapping relationship; and binding the fourth IP address to the socket according to the address binding request, wherein the third IP address belongs to the first protocol stack, and the fourth IP address is an IP address of the first computing device under the second protocol stack; and establishing the connection to the second computing device based on the socket and the connection request comprises: establishing the connection to the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request.

3. The method according to claim 2, wherein after receiving the address binding request initiated by the target application, and before modifying the first IP address in the address binding request to the second IP address based on the preset address mapping relationship, the method further comprises: determining that the preset address mapping relationship comprises a mapping relationship between the first IP address and the second IP address.

4. The method according to claim 1, wherein establishing the connection to the second computing device based on the socket and the connection request comprises: selecting a fourth IP address from a plurality of IP addresses of the first computing device, wherein the fourth IP address and the second IP address belong to a same protocol stack; and establishing the connection to the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request.

5. The method according to any one of claims 1 to 4, wherein after receiving the first socket creation request initiated by the target application, and before modifying the type parameter of the first socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed.

6. The method according to claim 5, wherein the preset application list is preconfigured by a system or is customized by a user; and the preset address mapping relationship is preconfigured by the system or is customized by the user.

7. The method according to any one of claims 1 to 6, wherein after receiving the connection request initiated by the target application in the first computing device, and before modifying the first IP address in the connection request to the second IP address based on the preset address mapping relationship, the method further comprises: determining that the preset address mapping relationship comprises a mapping relationship between the first IP address and the second IP address.

8. The method according to any one of claims 1 to 7, wherein after establishing the connection to the second computing device based on the socket and the connection request, the method further comprises: performing system call processing based on the second IP address, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second computing device.

9. The method according to any one of claims 1 to 8, wherein the first protocol stack is an IPv4 protocol stack, and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack, and the second protocol stack is an IPv4 protocol stack.

10. A network access method, comprising: receiving a second socket creation request initiated by a target application in a second computing device, wherein the second socket creation request is used to request to create a socket for listening for a message sent by a target application in another device; modifying a type parameter of the second socket creation request, and creating a socket based on a modified type parameter, wherein a protocol stack corresponding to the modified type parameter is the same as a protocol stack that is supported by a first computing device and that corresponds to the target application; receiving an address binding request initiated by the target application in the second computing device, wherein the address binding request comprises a first internet protocol IP address; modifying the first IP address in the address binding request to a second IP address based on a preset address mapping relationship, wherein the first IP address belongs to a first protocol stack, the second IP address is an IP address of the second computing device under the second protocol stack, and the second protocol stack is the protocol stack that is supported by the first computing device and that corresponds to the target application; and binding the socket to the second IP address according to the address binding request.

11. The method according to claim 10, wherein after receiving the second socket creation request initiated by the target application in the second computing device, and before modifying the type parameter of the second socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed.

12. The method according to claim 11, wherein the preset application list is preconfigured by a system or is customized by a user; and the preset address mapping relationship is preconfigured by the system or is customized by the user.

13. The method according to any one of claims 10 to 12, wherein after receiving the address binding request initiated by the target application in the second computing device, and before modifying the first IP address in the address binding request to the second IP address based on the preset address mapping relationship, the method further comprises: determining that the preset address mapping relationship comprises a mapping relationship between the first IP address and the second IP address.

14. The method according to any one of claims 10 to 13, wherein after binding the socket to the second IP address according to the address binding request, the method further comprises: performing system call processing based on the second IP address, wherein the system call processing comprises reading a message from the first computing device and / or sending a message to the first computing device.

15. The method according to any one of claims 10 to 14, wherein the first protocol stack is an IPv4 protocol stack, and the second protocol stack is an IPv6 protocol stack; or the first protocol stack is an IPv6 protocol stack, and the second protocol stack is an IPv4 protocol stack.

16. A network access method, comprising: receiving a first socket creation request initiated by a target application in a first computing device, wherein the first socket creation request is used to request to create a socket for accessing a target application in a second computing device; creating a first socket according to the first socket creation request; receiving a connection request initiated by the target application in the first computing device, wherein the connection request is used to request to establish a connection to the second computing device, the connection request comprises a first internet protocol IP address, and the first IP address belongs to a first protocol stack; determining that a preset address mapping relationship comprises a mapping relationship between the first IP address and a second IP address, wherein the second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device; closing the first socket, and generating a third socket creation request, wherein an index of the third socket creation request is the same as an index of the first socket creation request, a type parameter of the third socket creation request is different from a type parameter of the first socket creation request, and a protocol stack corresponding to the type parameter of the third socket creation request is the same as a protocol stack supported by the second computing device; creating a second socket according to the third socket creation request; modifying the first IP address in the connection request to the second IP address based on the preset address mapping relationship, wherein a protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device; and establishing a connection to the second computing device based on the second socket and the connection request.

17. The method according to claim 16, wherein before generating the third socket creation request, the method further comprises: determining that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed.

18. The method according to claim 17, wherein the preset application list is preconfigured by a system or is customized by a user; and the preset address mapping relationship is preconfigured by the system or is customized by the user.

19. The method according to any one of claims 16 to 18, wherein after establishing the connection to the second computing device based on the second socket and the connection request, the method further comprises: performing system call processing based on the second IP address, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second computing device.

20. The method according to any one of claims 16 to 19, wherein generating the third socket creation request comprises: sequentially generating socket creation requests according to an index order until the third socket creation request is generated.

21. A computing device, comprising: a kernel network module, configured to receive a first socket creation request initiated by a target application, wherein the first socket creation request is used to request to create a socket for accessing a target application in a second computing device; and a conversion module, configured to modify a type parameter of the first socket creation request, wherein a protocol stack corresponding to a modified type parameter is the same as a protocol stack supported by the second computing device, wherein the kernel network module is further configured to: create a socket based on the modified type parameter; and receive a connection request initiated by the target application, wherein the connection request is used to request to establish a connection to the second computing device, the connection request comprises a first internet protocol IP address, and the first IP address belongs to a first protocol stack; the conversion module is further configured to modify the first IP address in the connection request to a second IP address based on a preset address mapping relationship, wherein the second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device; and the kernel network module is further configured to establish a connection to the second computing device based on the socket and the connection request.

22. The device according to claim 21, wherein the kernel network module is further configured to: after creating the socket based on the modified type parameter, and before receiving the connection request initiated by the target application, receive an address binding request initiated by the target application, wherein the address binding request comprises a third IP address, and the third IP address belongs to the first protocol stack; the conversion module is further configured to modify the third IP address in the address binding request to a fourth IP address based on the preset address mapping relationship, wherein the fourth IP address is an IP address of the first computing device under the second protocol stack; the kernel network module is further configured to bind the fourth IP address to the socket according to the address binding request; and when establishing the connection to the second computing device based on the socket and the connection request, the kernel network module is specifically configured to: establish the connection to the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request.

23. The device according to claim 22, wherein the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the third IP address in the address binding request to the fourth IP address based on the preset address mapping relationship, determine that the preset address mapping relationship comprises a mapping relationship between the third IP address and the fourth IP address.

24. The device according to claim 21, wherein the kernel network module is specifically configured to: select a fourth IP address from a plurality of IP addresses of the computing device, wherein the fourth IP address and the second IP address belong to a same protocol stack; and establish the connection to the second computing device based on the socket, the fourth IP address, and the second IP address in the connection request.

25. The device according to any one of claims 22 to 24, wherein the conversion module is further configured to: after receiving the first socket creation request initiated by the target application, and before modifying the type parameter of the first socket creation request, determine that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed.

26. The device according to any one of claims 21 to 25, wherein the conversion module is further configured to: after receiving the connection request initiated by the target application, and before modifying the first IP address in the connection request to the second IP address based on the preset address mapping relationship, determine that the preset address mapping relationship comprises a mapping relationship between the first IP address and the second IP address.

27. The device according to any one of claims 21 to 26, wherein the kernel network module is further configured to: after establishing the connection to the second computing device based on the socket and the connection request, perform system call processing based on the second IP address, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second computing device.

28. A computing device, comprising: a kernel network module, configured to receive a second socket creation request initiated by a target application, wherein the second socket creation request is used to request to create a socket for listening for a message sent by a target application in another device; and a conversion module, configured to modify a type parameter of the second socket creation request, wherein a protocol stack corresponding to a modified type parameter is the same as a protocol stack supported by a first computing device, wherein the kernel network module is further configured to: create a socket based on the modified type parameter; and receive an address binding request initiated by the target application, wherein the address binding request comprises a first server internet protocol IP address; the conversion module is further configured to modify the first IP address in the address binding request to a second IP address based on a preset address mapping relationship, wherein the first IP address belongs to a first protocol stack, the second IP address is an IP address of the second computing device under the second protocol stack, and the second protocol stack is the protocol stack that is supported by the first computing device and that corresponds to the target application; and the kernel network module is further configured to bind the socket to the second IP address according to the address binding request.

29. The device according to claim 28, wherein the kernel network module is further configured to: after receiving the second socket creation request initiated by the target application, and before modifying the type parameter of the second socket creation request, determine that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed.

30. The device according to claim 28 or 29, wherein the conversion module is further configured to: after receiving the address binding request initiated by the target application, and before modifying the first IP address in the address binding request to the second IP address based on the preset address mapping relationship, determine that the preset address mapping relationship comprises a mapping relationship between the first IP address and the second IP address.

31. The device according to any one of claims 28 to 30, wherein the kernel network module is further configured to: after binding the socket to the second IP address according to the address binding request, perform system call processing based on the second IP address, wherein the system call processing comprises reading a message from the first computing device and / or sending a message to the first computing device.

32. A computing device, comprising: a kernel network module, configured to: receive a first socket creation request initiated by a target application, wherein the first socket creation request is used to request to create a socket for accessing a target application in a second computing device; create a first socket according to the first socket creation request; receive a connection request initiated by the target application, wherein the connection request is used to request to establish a connection to the second computing device, the connection request comprises a first server internet protocol IP address, and the first IP address belongs to a first protocol stack; determine that a preset address mapping relationship comprises a mapping relationship between the first IP address and a second IP address, wherein the second IP address is an IP address of the second computing device under a second protocol stack supported by the second computing device; close the first socket, and generate a third socket creation request, wherein an index of the third socket creation request is the same as an index of the first socket creation request, a type parameter of the third socket creation request is different from a type parameter of the first socket creation request, and a protocol stack corresponding to the type parameter of the third socket creation request is the same as a protocol stack supported by the second computing device; and create a second socket according to the third socket creation request; and a conversion module, configured to modify the first IP address in the connection request to the second IP address based on the preset address mapping relationship, wherein a protocol stack to which the second IP address belongs is the same as the protocol stack supported by the second computing device, wherein the kernel network module is further configured to establish a connection to the second computing device based on the second socket and the connection request.

33. The device according to claim 32, wherein the conversion module is further configured to: before generating the third socket creation request, determine that the target application belongs to a preset application list, wherein an application in the preset application list is an application for which network address translation is to be performed.

34. The device according to claim 32 or 33, wherein the kernel network module is further configured to: after establishing the connection to the second computing device based on the second socket and the connection request, perform system call processing based on the second IP address, wherein the system call processing comprises reading a message from the second computing device and / or sending a message to the second computing device.

35. The device according to any one of claims 32 to 34, wherein the kernel network module is specifically configured to: sequentially generate socket creation requests according to an index order until the third socket creation request is generated.

36. A computing device, comprising a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, so that the computing device performs the method according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the method according to any one of claims 16 to 20.

37. A computing device cluster, comprising at least one computing device, wherein each computing device comprises a processor and a memory; and the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the method according to any one of claims 16 to 20.

38. A computer program product comprising instructions, wherein when the instructions are run by a computing device, the computing device performs the method according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the method according to any one of claims 16 to 20.

39. A computer-readable storage medium, comprising computer program instructions, wherein when the computer program instructions are executed by a computing device, the computing device performs the method according to any one of claims 1 to 9, or performs the method according to any one of claims 10 to 15, or performs the method according to any one of claims 16 to 20.