Communication method, and electronic device and related apparatus
By racing against each other on the links of electronic devices and selecting the fastest link for data transmission, the problem of fast link establishment but slow data transmission in electronic devices is solved, thus improving communication efficiency and quality.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-09-17
- Publication Date
- 2026-04-23
AI Technical Summary
Although electronic devices can establish a network connection quickly, the data transmission speed may be slow, resulting in low communication efficiency.
By competing for transmission speed between the first and second links, the link with the fastest transmission quality and speed is selected for data transmission. This includes various methods such as first packet competition, multi-packet competition, and last packet competition, and the links are dynamically adjusted to ensure data transmission efficiency.
It improves data transmission rate, avoids the problem of fast connection establishment but slow data transmission, and ensures communication quality and efficiency.
Smart Images

Figure CN2025122035_23042026_PF_FP_ABST
Abstract
Description
Communication methods, electronic devices and related apparatus
[0001] This application claims priority to Chinese Patent Application No. 202411445306.8, filed on October 15, 2024, entitled "Communication Method, Electronic Device and Related Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, and in particular to a communication method, electronic device, and related apparatus. Background Technology
[0003] In scenarios such as browsing websites, sending emails, playing online games, and connecting to Wi-Fi, electronic devices need to perform Domain Name System (DNS) queries, establish network connections, and transmit data. DNS queries can include Internet Protocol version 4 (IPv4) queries and Internet Protocol version 6 (IPv6) queries, and a DNS query can obtain multiple Internet Protocol (IP) addresses.
[0004] Currently, after obtaining multiple IP addresses, electronic devices attempt to establish a network connection using the first IP address. If the connection fails, the device will try again using the second IP address, and so on. However, a fast network connection establishment speed does not necessarily mean a fast data transmission speed. Currently, even after a successful network connection is established, using this link can result in slow data transmission, affecting communication between electronic devices. Summary of the Invention
[0005] This application provides a communication method, an electronic device, and related apparatus. The electronic device can compete for transmission speed on the link and use the link with the fastest data transmission speed for data transmission, which can avoid the problem that fast link establishment does not necessarily mean fast data transmission.
[0006] Firstly, this application provides a communication method. The executing entity of this communication method is an electronic device or a chip within the electronic device. The following description uses an electronic device as an example. In this method, the electronic device interacts with a server using a first link and a second link. The first link corresponds to a first IP address, and the second link corresponds to a second IP address. The first and second IP addresses are obtained by the electronic device through a Domain Name System (DNS) query based on a first domain name. The first link corresponding to the first IP address can be understood as follows: the electronic device interacts with the server through the first IP address, and this interaction link is the first link; or the electronic device has already established a first link with the server through the first IP address. It is understood that when the electronic device is configured with Transmission Control Protocol (TCP), the electronic device can establish a first link with the server through the first IP address. When the electronic device is configured with User Datagram Protocol (UDP), no connection needs to be established between the electronic device and the server; the electronic device can interact with the server through the server's first IP address. Therefore, regardless of whether the electronic device is configured with TCP or UDP, the first link corresponds to the first IP address, and the second link corresponds to the second IP address, and the communication method provided in this application can be used.
[0007] In this method, the electronic device can compete for transmission speed between the first link and the second link, resulting in the transmission quality of the first link being higher than that of the second link, and the electronic device can use the first link to transmit data.
[0008] In this application, the electronic device can compete for transmission speed between the first link and the second link. The electronic device can use the link with the fastest data transmission speed for data transmission, instead of directly using the link with the fastest link establishment speed. This can avoid the problem that fast link establishment does not necessarily mean fast data transmission, and can improve the data transmission rate.
[0009] In one possible implementation, the electronic device competes for transmission speed between the first and second links, which can be achieved in any of the following ways:
[0010] In the first round of data transmission, electronic devices compete for transmission speed between the first and second links; or,
[0011] In each round of data transmission, the electronic device races for transmission speed between the first and second links; or,
[0012] During at least two rounds of data transmission, the electronic device races the transmission speed between the first and second links.
[0013] One round of data transmission can be understood as the entire process from when an electronic device sends a request, to when the server responds to the request and returns data, and then to when the electronic device receives and processes that data.
[0014] The following details the process of electronic devices competing for transmission speed between the first and second links during at least two rounds of data transmission:
[0015] The process can consist of at least two rounds, including a first round and an x-th round, where x is an integer greater than 1. It should be understood that at least two rounds can also include three or more rounds; this example uses the first and x-th rounds. In the first round of data transmission, the electronic device can compete on the transmission speed between the first and second links, obtaining a first score for the first link and a second score for the second link. In the x-th round of data transmission, the electronic device can compete on the transmission speed between the first and second links, obtaining a third score for the first link and a fourth score for the second link.
[0016] The electronic device can determine the score of the first link based on the first score of the first link in the first round of data transmission and the third score of the first link in the xth round of data transmission; and determine the score of the second link based on the second score of the second link in the first round of data transmission and the fourth score of the second link in the xth round of data transmission. The electronic device can determine the result of the xth round of transmission race based on the scores of the first and second links, and the result is used to indicate the winner of the xth round of transmission race. For example, the electronic device can select the link with the higher score between the first and second links as the winner of the xth round of transmission race, and the electronic device can use this winner to transmit data.
[0017] In this implementation, electronic devices can use a first-round transmission race, subsequent rounds of transmission races, or at least two rounds of transmission races to determine the winner of data transmission. This method is diverse and adaptable to different application scenarios, making it easier for electronic devices to use the fastest data transmission link for data transmission, thereby improving data transmission rate.
[0018] In one possible implementation, the electronic device in this application can also support dynamic speed-up, which can be understood as: competing for transmission speed on the link during data transmission, and switching to the fastest link for data transmission in a timely manner.
[0019] In this implementation, during data transmission using the first link, the electronic device can compete for transmission speed between the first and second links. Specifically, when the transmission quality of the first link is less than or equal to a quality threshold, or the transmission quality of the second link is higher than that of the first link, the electronic device can use the second link to transmit data.
[0020] In this implementation, a transmission speed competition is conducted on the link during data transmission so that when the link deteriorates or a link with better quality becomes available, the electronic device can use the link with the fastest data transmission speed to transmit data, thereby improving the data transmission rate and ensuring communication quality.
[0021] The electronic device uses a second link to transmit data, which may include at least one of the following methods:
[0022] Firstly, during the transmission of data in round y using the first link, the electronic device can use the second link to continue transmitting the remaining data of round y, where y is an integer greater than or equal to 1. In this implementation, the electronic device supports resuming interrupted transmissions. If the electronic device determines to use the second link to transmit data during the transmission of data in round y using the first link, it can then use the second link to continue transmitting the remaining data of round y.
[0023] Secondly, during the transmission of data in round y using the first link, the electronic device can continue transmitting the remaining data of round y using the first link, and transmit the data of round y+1 using the second link. In this implementation, the electronic device does not support resuming interrupted transmissions. If the electronic device decides to use the second link to transmit data during the transmission of data in round y using the first link, it can first continue transmitting the remaining data of round y using the first link. When transmitting a new round of data (such as the data of round y+1), the electronic device will use the second link to transmit the data of round y+1.
[0024] Third, if the first link is used to transmit data for round y, and the transmission ratio of round y data is greater than the first ratio, the second link is used to continue transmitting the remaining data for round y. In this implementation, the electronic device supports resuming interrupted transmissions. If the electronic device uses the first link to transmit data for round y, and the transmission ratio of round y data is greater than the first ratio (meaning that most of the round y data has been transmitted), and the electronic device decides to use the second link to transmit data, then the electronic device can use the second link to continue transmitting the remaining data for round y.
[0025] Fourth, if the first link is used to transmit data in round y, and the transmission ratio of round y data is less than or equal to the first ratio, the second link is used to retransmit the data in round y. In this implementation, if the electronic device uses the first link to transmit data in round y, and the proportion of round y data is less than or equal to the first ratio (i.e., a small portion of round y data has been transmitted), and the electronic device decides to use the second link to transmit data, in order to avoid packet loss, the electronic device can use the second link to retransmit the data in round y.
[0026] In this implementation, based on the transmission characteristics supported by the electronic device, when the electronic device switches links to transmit data during the data transmission process, the electronic device can choose an appropriate transmission method to transmit data, which can ensure transmission efficiency and transmission quality.
[0027] Electronic devices may use a first-round transmission race, subsequent rounds of transmission race, or at least two rounds of transmission race to race the transmission between the first and second links. The following describes the methods for first-round transmission race, subsequent rounds of transmission race, or at least two rounds of transmission race, using a single-round transmission race as an example. In one possible implementation, the electronic device may use the first data packet, at least two data packets, or the last data packet in a round of data to race the transmission between the first and second links. Specifically, using the first data packet in a round of data to race the transmission between the first and second links can be called first-packet race; using at least two data packets in a round of data to race the transmission between the first and second links can be called multi-packet race; and using the last data packet in a round of data to race the transmission between the first and second links can be called last-packet race.
[0028] The following sections will introduce the first-pack speedrun, multi-pack speedrun, and last-pack speedrun:
[0029] First, first-packet race: The electronic device can send the first data packet on the first link and also on the second link. The electronic device can determine the winner of the transmission race by identifying the first link that first receives the feedback information in response to the first data packet; the feedback information can be 200 OK, an acknowledgment character ACK, or data. For example, if the electronic device first receives the feedback information in response to the first data packet on the first link, the electronic device can identify the first link as the winner of the transmission race.
[0030] Secondly, multi-packet race: An electronic device sequentially sends at least two data packets on a first link and at least two data packets sequentially on a second link. The electronic device can identify the first link that first receives feedback information in response to at least two data packets as the winner of the transmission race. The feedback information can be 200 OK, an acknowledgment character ACK, or data. For example, if the electronic device first receives feedback information in response to at least two data packets on the first link, the electronic device can identify the first link as the winner of the transmission race.
[0031] The at least two data packets indicate either that the number of data packets is at least two, or that the data size of the data packets reaches a preset data size. In one possible implementation, the data size of the data packets reaching the preset data size includes either the total length of the data in the data packets reaching a preset proportion, or the absolute data size reaching a preset data size.
[0032] Third, tail packet race: When an electronic device sends the last data packet on the first link and the last data packet on the second link, the electronic device can determine the winner of the transmission race by identifying the first link that first receives the feedback information in response to the last data packet. The feedback information can be 200 OK, an acknowledgment character ACK, or data. For example, if the electronic device first receives the feedback information in response to the last data packet on the first link, the electronic device can identify the first link as the winner of the transmission race.
[0033] In this implementation, the electronic device can support various racing modes, including first-packet racing, multi-packet racing, and last-packet racing. The methods are diverse and readily available, making it widely applicable.
[0034] In one possible implementation, the electronic device competes for transmission speed between the first link and the second link. After the transmission quality of the first link is higher than that of the second link, the electronic device can shut down the second link. Alternatively, the electronic device can retain the second link, which includes waiting for the second link to age naturally or keeping the second link active.
[0035] In this implementation, in scenarios involving multiple rounds of transmission competition and at least two rounds of transmission competition, if the second link is closed while the electronic device is competing for transmission between the first and second links, the electronic device needs to re-establish the second link based on the second IP address. After the electronic device establishes the second link, it can then compete for transmission between the first and second links. Alternatively,
[0036] In this implementation, in scenarios involving multiple rounds of transmission competition and at least two rounds of transmission competition, if the second link remains active when the electronic device competes for transmission between the first and second links, the electronic device can directly reuse the second link to enable the electronic device to compete for transmission between the first and second links.
[0037] As described above, the first IP address and the second IP address are obtained by the electronic device through a DNS query based on the first domain name. Therefore, in this embodiment, the electronic device can obtain the first IP address and the second IP address through a DNS query based on the first domain name. It should be understood that when the electronic device queries for an IP address based on the first domain name, it can also retrieve more IP addresses. The following example illustrates this by assuming that the IP addresses obtained by the electronic device through a DNS query include both the first IP address and the second IP address:
[0038] In one possible implementation, if the electronic device is configured with TCP, it can establish a first link based on a first IP address and a second link based on a second IP address. The electronic device can establish the links using either simultaneous link establishment or tiered link establishment.
[0039] In this configuration, the electronic device can establish a first link based on a first IP address and a second link based on a second IP address simultaneously, i.e., establish links concurrently. Alternatively, the electronic device can establish a first link based on a first IP address and, after a preset time period, establish a second link based on a second IP address, i.e., establish links in a tiered manner.
[0040] In one possible implementation, the electronic device can also support immediate link establishment to further improve the link establishment speed. In this implementation, the electronic device may include a network subsystem and a client. Currently, in existing technologies, after the network subsystem obtains an IP address through a DNS query, it can send the IP address back to the client, which then initiates link establishment based on the IP address. In this application, when the network subsystem obtains a first IP address and a second IP address, the network subsystem can establish a first link based on the first IP address and a second link based on the second IP address, and the network subsystem sends the first IP address and the second IP address to the client.
[0041] In this implementation, when the network subsystem obtains the first IP address and the second IP address, the network subsystem does not need to first send the IP address back to the client and have the client initiate the connection establishment based on the IP address. Instead, the network subsystem directly establishes the connection, which can reduce the interaction process between the network subsystem and the client and improve the connection establishment speed.
[0042] In one possible implementation, before the electronic device establishes a first link based on a first IP address and, after a preset time, establishes a second link based on a second IP address, the electronic device can sort the first and second IP addresses, ensuring that the first IP address is prioritized over the second IP address. This allows the electronic device to establish links based on IP addresses according to its actual situation, thus determining a link more suitable for the electronic device.
[0043] In one possible implementation, before the electronic device establishes a first link based on a first IP address and a second link based on a second IP address simultaneously, if the number of IP addresses obtained from DNS queries exceeds a threshold, the electronic device can sort the retrieved IP addresses, with the first and second IP addresses appearing as the top two in the sorted list. Specifically, in this implementation, when the electronic device uses a simultaneous link establishment method, if the number of IP addresses obtained from DNS queries exceeds the threshold, the electronic device can sort the retrieved IP addresses and select the top-ranked IP addresses for simultaneous link establishment; this example uses the first and second IP addresses appearing as the top two in the sorted list.
[0044] In this way, electronic devices can also select the top-ranked IP addresses to establish connections simultaneously, which can improve the success rate and speed of connection establishment.
[0045] In one possible implementation, the electronic device can sort the first IP address and the second IP address based on at least one of the following information: the electronic device's preference for Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6), the electronic device's remaining traffic, power consumption, heat, and historical connection information; the historical connection information includes at least one of the following: connection success rate, connection latency, time information, spatial information, version, port, connection protocol corresponding to at least one IP address, and handshake success rate and handshake latency at the transport layer security / packet transport layer security stage.
[0046] Understandably, an electronic device can sort multiple IP addresses obtained by a DNS query based on at least one of the following information: the electronic device's preference for Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6), the electronic device's remaining bandwidth, power consumption, heat generation, and historical link establishment information.
[0047] In this implementation, electronic devices can sort IP addresses according to their own situation to compete for link establishment speed after sorting. This sorting method is consistent with the link establishment speed, which can improve the link establishment speed of electronic devices and make it easier for electronic devices to determine the links suitable for them.
[0048] In one possible implementation, the electronic device can support DNS racing. Specifically, the electronic device can be configured with at least one of the following: Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6), at least one DNS service, and at least one physical tunnel; and can perform a DNS query based on a first domain name to obtain a first IP address and a second IP address.
[0049] In this implementation, when an electronic device performs a DNS query, it can obtain multiple IP addresses based on the first domain name by performing a DNS query through at least one of dual-stack, at least one DNS service, or at least one physical channel. The multiple IP addresses include the first IP address and the second IP address.
[0050] In one possible implementation, the electronic device can connect to any of the following: a cloud, a peripheral device, or a third-party DNS service. In this implementation, the electronic device can perform a DNS query based on a first domain name via the cloud, a peripheral device, or a third-party DNS service to obtain multiple IP addresses, including a first IP address and a second IP address.
[0051] In this implementation, electronic devices can query more IP addresses through dual-stack, different DNS services, different physical channels, peripheral devices, cloud or third-party DNS services, etc. This can expand the range of IP addresses that electronic devices can choose for establishing a connection, and help electronic devices select faster IP addresses for establishing a connection.
[0052] In a second aspect, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store code instructions and the processor is used to execute the code instructions to perform the methods described in the first aspect or any possible implementation thereof.
[0053] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0054] Fourthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation of the first aspect.
[0055] Fifthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation thereof. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.
[0056] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).
[0057] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description
[0058] Figure 1A is a schematic diagram of delayed chain establishment;
[0059] Figure 1B is a schematic diagram of one chain establishment process;
[0060] Figure 2A is a structural block diagram of an electronic device provided in an embodiment of this application;
[0061] Figure 2B is another structural block diagram of the electronic device provided in the embodiment of this application;
[0062] Figure 3 is a schematic diagram of a multi-stage racing provided in an embodiment of this application;
[0063] Figure 4 is a schematic diagram of each stage of racing provided in an embodiment of this application;
[0064] Figure 5 is a schematic diagram of DNS racing provided in an embodiment of this application;
[0065] Figure 6 is a comparative diagram of the chain-building speedup between the prior art and the embodiments of this application;
[0066] Figure 7 is a schematic diagram of a chain-building speedup provided in an embodiment of this application;
[0067] Figure 8 is a schematic diagram of initiating chain establishment according to an embodiment of this application;
[0068] Figure 9 is a schematic diagram of a process for initiating chain establishment provided in an embodiment of this application;
[0069] Figure 10 is a schematic diagram of a transmission speed-up provided in an embodiment of this application;
[0070] Figure 11 is another schematic diagram of transmission speed-up provided in an embodiment of this application;
[0071] Figure 12 is a flowchart illustrating a communication method provided in an embodiment of this application;
[0072] Figure 13 is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0073] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below:
[0074] 1. Physical Channel: In this application embodiment, the physical channel used for communication in an electronic device refers to such a channel. For example, a physical channel may include, but is not limited to, a cellular channel, a Wi-Fi channel, a satellite channel, etc. A cellular channel may include a primary cellular card channel, a secondary cellular card channel, etc. A Wi-Fi channel may include, for example, a WiFi 2.4G channel, a WiFi 5G channel, and a WiFi 6G channel. This application embodiment does not limit the type and number of physical channels supported by the electronic device.
[0075] 2. Electronic equipment
[0076] The electronic device in this application embodiment is an electronic device with communication functions. The electronic device can be referred to as user equipment (UE), terminal, etc. For example, the electronic device can be a mobile phone, tablet, personal digital assistant (PDA), handheld device with wireless communication functions, computing device, in-vehicle device, wearable device, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in smart home, etc. This application embodiment does not specifically limit the form of the electronic device.
[0077] In one possible scenario, when a user opens a news app or video app, the app initiates a Domain Name System (DNS) lookup request to obtain the Internet Protocol (IP) address of the server (such as a news server or video server). The app can then establish a connection with the server based on its IP address. After the connection is established, data can be transmitted between the app and the server. This allows a news app to display news content from a news page, or a video app to display video thumbnails from a video page.
[0078] In one possible scenario, after a user enters a website's domain name into their browser client, the browser client initiates a DNS lookup request to obtain the website server's IP address. The browser client can then establish a connection with the website server based on this IP address. Once the connection is established, data can be transmitted between the browser client and the website server, allowing the user to browse the website's content.
[0079] In one possible scenario, when a user sends an email through an email client, the email client needs to know the recipient's mail server's IP address. The email client can look up the recipient's mail server's IP address using a DNS lookup and establish a connection with the recipient's mail server based on that IP address. After establishing a connection with the recipient's mail server, the email client can send emails to the recipient's mail server.
[0080] In one possible scenario, when a user logs into an online game, the game client uses a DNS lookup to find the game server's IP address. After obtaining the game server's IP address, the game client can establish a connection with the game server. Once the connection is established, the game client and game server can transfer game data to support the user's gameplay.
[0081] In one possible scenario, when an electronic device is connected to Wi-Fi, the user can operate the device to display the Wi-Fi login page. On this page, the user can enter the Wi-Fi login password to connect the device. The user can either enter the login page's domain name or click a link on the login page, triggering the device to perform a DNS lookup to obtain the login page's IP address before displaying it.
[0082] In some embodiments, news servers, video servers, website servers, mail servers, game servers, etc., can be referred to as application servers. In the following embodiments, application servers are simply referred to as "servers".
[0083] The above scenario serves as an example, illustrating that DNS queries, network connection establishment, and data transmission are widely applied across various scenarios. The following is a brief description of the process by which electronic devices perform DNS queries:
[0084] In response to a user's action, a client (such as a browser client or email client) can first check its DNS cache to see if the domain name resolution result is already stored. This resolution result includes the IP address corresponding to the domain name. If the DNS cache contains the domain name resolution result, the client directly uses the IP address in the DNS cache to access the domain, and the query process ends. If the client's DNS cache does not find the domain name resolution result, the client will then send a further query request to the operating system.
[0085] It should be understood that the operating system can maintain a DNS cache to store recently resolved domain names and their corresponding IP addresses. If the operating system's DNS cache contains a resolution result for the domain name, the operating system can return the corresponding IP address to the client, and the query process ends. If the operating system's DNS cache does not contain a resolution result for the domain name, the operating system will check the local hosts file. The hosts file is a text file used to manually specify the mapping between domain names and IP addresses. If the hosts file contains a resolution result for the domain name, the operating system directly returns the corresponding IP address to the client, and the query process ends. If the hosts file does not contain a resolution result for the domain name, the operating system will send the query request to the local DNS service.
[0086] The local DNS service first checks its cache for a resolution result for the domain name. If it does, the local DNS service returns the IP address to the operating system, which then returns the IP address to the client. If not, the local DNS service queries a DNS server, proceeding down the hierarchy until it finds an authoritative DNS server and obtains the final IP address. The local DNS server then returns the IP address to the client.
[0087] In some embodiments, the electronic device may be configured with both an Internet Protocol version 4 (IPv4) stack and an Internet Protocol version 6 (IPv6) stack, meaning the electronic device supports dual-stack DNS queries. In this example, the electronic device can initiate DNS queries on both stacks, and correspondingly, the same domain name can resolve to both an IPv4 address and an IPv6 address.
[0088] In some embodiments, considering factors such as server load balancing, multiple servers can be deployed for each client. Taking game servers as an example, multiple game servers can be deployed in a region or area, and each game server can correspond to a different IP address. In this way, the same domain name can be resolved to multiple different IP addresses during DNS lookups.
[0089] In some embodiments, multiple DNS servers can be pre-deployed, and correspondingly, DNS queries will yield multiple IP addresses.
[0090] In summary, after an electronic device performs a DNS lookup, it can obtain multiple IP addresses. It should be understood that these multiple IP addresses can be returned to the electronic device sequentially; that is, the electronic device can receive multiple IP addresses in sequence. For example, if the DNS server is located far from the electronic device, or due to network latency, the DNS server may return the IP addresses to the electronic device later. Conversely, if the DNS server is located close to the electronic device, or due to good network quality, the DNS server may return the IP addresses to the electronic device earlier.
[0091] Currently, after receiving multiple IP addresses, electronic devices attempt to establish a network connection using the first IP address. If the connection fails, the device will try again using the second IP address, and so on. However, this current approach has several drawbacks. First, the first IP address received by the electronic device is not necessarily the fastest for establishing a connection. This increases the connection establishment time, and second, if the first IP address is in a broken state, it can even cause the connection to fail.
[0092] Establishing a connection can be understood as: an electronic device and the electronic device (such as a server) corresponding to an IP address establishing a network connection. The first IP address is not necessarily the fastest IP address for establishing a connection, for the following reasons:
[0093] 1) Different IP addresses correspond to different transmission paths between servers and electronic devices, and data transmission passes through different routing nodes. If the routing nodes corresponding to the first IP address are numerous and complex, the connection establishment speed may not be fast. Additionally, electronic devices can access the network through different physical channels and connect to different IP addresses, resulting in significant performance differences and meaning the first IP address may not be the fastest for connection establishment. 2) Servers corresponding to different IP addresses are located in different geographical locations or network environments, and their network latency with the client varies. Even if the IP address is the first to respond, if the server corresponding to the IP address is far from the client or if intermediate routes are congested, the connection establishment speed may be slow. 3) The server load affects the response speed when processing client requests. If the server corresponding to the first IP address has a high load, it will also lead to a slower connection establishment speed. 4) DNS query results are usually cached to reduce latency for subsequent queries. However, cached DNS records may not be up-to-date, so the first IP address may not be the fastest for connection establishment.
[0094] It should be understood that the embodiments of this application do not exhaustively list the reasons why "the first IP address is not necessarily the fastest IP address for establishing a connection", and the above 1)-4) are illustrative examples.
[0095] The reasons why an IP address is in a broken state can include: the IP address is blocked, the IP address is invalid, the server corresponding to the IP address has crashed, or the server corresponding to the IP address is unavailable.
[0096] In current technical solutions, even if the first IP address is the fastest for establishing a connection, allowing electronic devices to quickly establish a network connection with the server, this speed does not necessarily translate to fast data transmission over that connection. Currently, after successfully establishing a connection using the first IP address, data transmission between electronic devices and the server via that connection can be slow, impacting communication between the devices.
[0097] To improve the connection establishment speed of electronic devices, in some embodiments, after obtaining multiple IP addresses, the electronic device can establish connections concurrently or with a delay on both IPv6 and IPv4 stacks.
[0098] For example, the IP address resolved by the electronic device under IPv6 can be called the first address, and the IP address under IPv4 can be called the second address. Taking concurrent connection establishment as an example, the electronic device can simultaneously use the first address and the second address to establish network connections with the corresponding servers. The electronic device can retain the connection with faster connection establishment speed and close (or reset (RST)) the connection with slower connection establishment speed. In this example, the electronic device can use the connection with faster connection establishment speed to interact with the server.
[0099] For example, referring to Figure 1A, taking delayed connection establishment as an example, the electronic device can first establish a network connection with the corresponding server using a first address, and after a preset time (e.g., 150ms-200ms), the electronic device can establish a network connection with the corresponding server using a second address. The electronic device can retain the faster connection establishment link and close the slower connection establishment link. In this example, the electronic device can use the faster connection establishment link to interact with the server.
[0100] In some embodiments, to further improve the connection establishment speed of the electronic device, referring to Figure 1B, the electronic device can perform asynchronous DNS queries on a dual-stack. In this example, the electronic device can immediately establish a connection after retrieving the first IP address, thus initiating connection establishment as early as possible without waiting to retrieve all IP addresses, thereby reducing the connection establishment time.
[0101] Additionally, in this example, the electronic device can also sort the retrieved IP addresses. For example, the electronic device can sort the retrieved IP addresses by alternating between IPv6 and IPv4 IP addresses. For example, the sorted addresses could be: address 1 (IPv6), address 2 (IPv4), address 3 (IPv6), address 4 (IPv4), etc.
[0102] After establishing a connection using the first IP address (e.g., address 1), the electronic device waits for a preset time (e.g., 200ms). Then, following the IP address sorting result, it can establish a connection using the second IP address (e.g., address 2), and so on. Once a connection is successfully established, the electronic device can retain that connection and close other pending connections. In this example, the electronic device can use the successfully established connection to interact with the server.
[0103] The examples in Figures 1A and 1B can reduce the connection establishment time of electronic devices to some extent, but the following problems still exist:
[0104] 1) Fast connection establishment does not necessarily mean fast data transmission speed on that connection. Therefore, it is crucial to determine which connection has fast data transmission speed.
[0105] 2) Based on 1), the examples in Figure 1A and Figure 1B do not involve the process of link selection after the link quality deteriorates during data transmission.
[0106] 3) The link establishment process in Figures 1A and 1B is applicable to electronic devices configured with Transmission Control Protocol (TCP). For electronic devices configured with User Datagram Protocol (UDP), because UDP is a connectionless protocol, it means that no explicit connection needs to be established between the client and server before data transmission; that is, no network connection needs to be established between the client and server. The client only needs to know the server's IP address and port number to send data, and the server receives data by monitoring the port corresponding to the port number. Because the link establishment process in the examples of Figures 1A and 1B requires the client to compare the link establishment speed with each server based on the IP address in order to select a link, the method in the examples is not applicable to electronic devices configured with UDP.
[0107] 4) Dynamic adjustment is not supported in Figures 1A and 1B. For example, the examples in Figures 1A and 1B are configured such that the electronic device uses the first IP address to establish a link and waits for a preset time (e.g., 200ms) before using the second IP address. However, if the electronic device has already determined that the link quality of the first IP address is poor at 100ms, it still has to wait 200ms before using the second IP address to establish a link. Dynamic adjustment is not supported, resulting in poor flexibility.
[0108] 5) In the example in Figure 1B, the IP addresses are sorted by alternating the sorting of IP addresses under IPv6 and IPv4. However, this sorting method is not consistent with the connection establishment speed and will also affect the connection establishment speed of electronic devices.
[0109] 6) In Figures 1A and 1B, the successful establishment of a connection using IP addresses by the electronic devices requires processes such as a three-way handshake. However, the example does not cover the Transport Layer Security (TLS) phase following successful connection establishment. It should be understood that the TLS protocol is used to securely transmit data between the client and server; the TLS phase can be understood as the negotiation and preparation for secure communication before data transmission. It is understandable that if the electronic device is configured with TCP, it will undergo the TLS phase after successful connection establishment. If the electronic device is configured with UDP, it will undergo the Datagram Transport Layer Security (DTLS) phase to ensure secure data transmission between the electronic device and the server. Therefore, the example does not cover the TLS and DTLS phases following successful connection establishment.
[0110] In some embodiments, when an electronic device is configured with a single stack (such as IPv4 or IPv6) and a DNS service is deployed in the electronic device, the electronic device performs a DNS query, and a domain name can correspond to at least one IP address, which is an IP address under the single stack.
[0111] In some embodiments, when an electronic device is configured with dual stack (such as IPv4 and IPv6) and a DNS service is deployed in the electronic device, the electronic device performs a DNS query, and one domain name can correspond to two sets of IP addresses. One set of IP addresses is the IP address under IPv4, and the other set is the IP address under IPv6.
[0112] Besides configuring dual-stack protocols and deploying multiple servers (such as game servers), some embodiments of electronic devices can also deploy multiple DNS services. This avoids the need to use other DNS services to query IP addresses when one DNS service fails. In this case, when performing DNS queries, the electronic device can query IP addresses through multiple DNS services, thereby obtaining more IP addresses returned by multiple DNS services.
[0113] For example, when an electronic device is configured with a single stack (such as IPv4 or IPv6) and multiple DNS services are deployed in the electronic device, the electronic device can obtain multiple sets of IP addresses by performing a DNS query. Each set of IP addresses corresponds to a different DNS service, and the IP addresses can be IP addresses under IPv4 or IPv6.
[0114] In some embodiments, the electronic device may also have multiple physical channels. For example, the electronic device may perform DNS queries via a cellular channel, specifically using the network of operator A. Alternatively, the electronic device may perform DNS queries via a WiFi channel, specifically using the network of operator B. In practical applications, the server can be deployed on the corresponding operator's network to achieve faster access speeds. Different operators (or operator DNS servers) can configure different IP addresses for the server, allowing the electronic device to obtain more IP addresses when performing DNS queries on each physical channel.
[0115] With the increasing prevalence of distributed communication capabilities, in some embodiments, electronic devices can also communicate with peripheral devices. For example, in embodiments of this application, the electronic device can also perform DNS queries through peripheral devices. Because the DNS services configured in the peripheral devices are different from those in the electronic devices, or because they use different physical channels, the electronic device can obtain more IP addresses by performing DNS queries through the peripheral devices.
[0116] In some embodiments, the electronic device can also perform DNS queries through cloud or third-party DNS services, thereby obtaining more IP addresses. For example, if the electronic device has previously logged into a game application (APP) and has stored DNS query records in the cloud or a third-party DNS service, when the electronic device logs into the game APP again, it can perform DNS queries through the cloud or a third-party DNS service. The third-party DNS service may include at least one DNS server.
[0117] In some embodiments, services can also be pre-configured with different domain names. For example, in a gaming service, different domain names can be configured for different regions or areas. For instance, the same game can be configured with different domain names such as xxx.zj, xxx.sh, and xxx.bj. This way, when an electronic device performs a DNS lookup, it can query the IP address corresponding to each domain name, thus obtaining more IP addresses.
[0118] In summary, compared to the existing method of DNS lookup using dual-stack technology, in this embodiment, the electronic device can query more IP addresses through dual-stack, different DNS services, different physical channels, peripheral devices, cloud or third-party DNS services, etc. This expands the range of IP addresses the electronic device can choose for establishing a connection, helping it select faster IP addresses for connection establishment. In some embodiments, the electronic device's use of dual-stack, different DNS services, different physical channels, peripheral devices, cloud or third-party DNS services to query more IP addresses can be simply referred to as DNS speedup.
[0119] In some embodiments, after obtaining multiple IP addresses, the electronic device can also perform a link-building race to obtain the fastest link. In some embodiments, the multiple IP addresses obtained by the electronic device can be obtained based on dual-stack DNS queries or based on the DNS race provided in this application embodiment. In other words, the electronic device in this application embodiment can be configured with DNS race or not. Specifically, when the electronic device is not configured with DNS race, it can obtain IP addresses based on dual-stack DNS queries; when the electronic device is configured with DNS race, it can obtain IP addresses through DNS race.
[0120] In some embodiments, after obtaining the fastest link for connection establishment, the electronic device can also compete for transmission speed among multiple links to select the link with the fastest data transmission speed for data transmission. Thus, in this embodiment, not only can the fastest link for connection establishment be selected, but the fastest transmission link can also be selected again to ensure data transmission speed during the data transmission process.
[0121] In some embodiments, if the link quality deteriorates or a better link becomes available during data transmission, the electronic device can dynamically adjust the data transmission link to ensure smooth data transmission. This application embodiment can achieve dynamic speed competition, enabling dynamic transmission speed competition during data transmission.
[0122] In summary, the embodiments of this application can provide DNS speed-up, connection establishment speed-up, transmission speed-up, and dynamic speed-up during transmission. In some embodiments, the electronic device can be configured with at least one of the following: DNS speed-up, connection establishment speed-up, transmission speed-up, and dynamic speed-up during transmission. The following embodiments will describe the process of the electronic device performing DNS speed-up, connection establishment speed-up, transmission speed-up, and dynamic speed-up during transmission in sequence.
[0123] In some embodiments, the communication method provided in this application can be applied to preset business scenarios. In these preset business scenarios, electronic devices require high-performance connection establishment and data transmission. For example, preset business scenarios may include: ticket grabbing, red envelope grabbing, flash sales, ride-hailing, gaming, webpage refreshing, etc. In this example, the electronic device can execute the communication method provided in this application when the preset business scenario is determined, based on the type of business.
[0124] In some embodiments, the communication method provided in this application can be applied to various business scenarios. In this example, in response to a service initiation, an electronic device can execute the communication method provided in this application. This application does not limit the business scenarios to which the communication method provided in this application is applicable.
[0125] Before introducing the communication method provided in the embodiments of this application, the structure of the electronic device provided in the embodiments of this application will be first introduced. In some embodiments, the software system of the electronic device may adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment takes a layered architecture as an example to illustrate the software structure of the electronic device. Figure 2A is a software structure block diagram of an electronic device to which this application embodiment applies. The layered architecture divides the software system of the electronic device into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces.
[0126] In some embodiments, referring to FIG2A, an electronic device may include: an application layer, a framework layer, a system layer, and a kernel layer. It is understood that the division of the software structure of an electronic device in this application embodiment is merely an example. This application embodiment does not limit the hierarchical division method in the software system of an electronic device. The modules in each layer in the following embodiments are the modules involved in the embodiments of this application. Each layer may also include more or fewer modules than illustrated, or some modules may be combined or split.
[0127] The application layer can include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the framework layer. Figure 2A shows an example of an application layer including an APP.
[0128] The framework layer provides APIs and programming frameworks for applications in the application layer. The framework layer may include some predefined functions. Referring to Figure 2A, the framework layer may include: a system interface and an application transport protocol stack.
[0129] In this system, the app can call system interfaces and use the application transport protocol stack to transmit data. In some embodiments, the application transport protocol stack may include Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol Secure (HTTPS).
[0130] In some embodiments, when the electronic device is configured with UDP, the application transport protocol stack may further include Quick UDP Internet Connections (QUIC). It should be understood that Figure 2A illustrates an application transport protocol stack including HTTP / HTTPS and QUIC.
[0131] In some embodiments, protocols in the application transport protocol stack are used to support data transmission in electronic devices.
[0132] The system layer comprises the core capabilities of the operating system, providing corresponding services. These services may include, but are not limited to, audio services, video services, call services, and communication services.
[0133] In some embodiments, the system layer may optionally include the following components:
[0134] The system's basic capability subsystems provide fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple operating system devices. These subsystems consist of a distributed soft bus, distributed data management and file management, distributed task scheduling, the Ark runtime, and distributed security and privacy protection. The Ark runtime provides runtime environments for multiple languages (C / C++ / JavaScript) and basic system libraries. It also provides a runtime environment for Java programs statically generated using the Ark compiler (i.e., the parts of the application or framework layer developed using the Java language).
[0135] The basic software service subsystem set provides common and general software services to the operating system, and consists of subsystems such as graphics and image processing, distributed media, distributed AI, multimodal input, MSDP & DV, event notification, telephony services, and distributed DFX. The basic software service subsystem set can be customized according to the deployment environment of different device types, and each subsystem can be tailored to its functional granularity.
[0136] Enhanced Software Service Subsystem Set: This set provides differentiated enhanced software services for different devices to the operating system, and consists of subsystems such as tablet business software, smart screen business software, in-vehicle business software, and IoT business software. The Enhanced Software Service Subsystem Set can be tailored to the deployment environment of different device forms, at the subsystem level, and each subsystem can be further tailored at the functional level.
[0137] Referring to Figure 2A, the system layer may include: a DNS service. The DNS service is used to support electronic devices in performing DNS queries.
[0138] In some embodiments, the system layer may further include: an underlying transport protocol. The underlying transport protocol is used to support data transmission and communication between electronic devices and other electronic devices.
[0139] In some embodiments, the underlying transport protocol may include the TCP / IP protocol. The TCP / IP protocol is used to enable network communication between electronic devices and ensure reliable data transmission.
[0140] In some embodiments, the underlying transport protocol may include: client libraries such as libcurl, and / or OpenSSL. libcurl can support multiple application transport protocols. OpenSSL is a powerful Secure Sockets Layer (SSL) and cryptography library that implements the Secure Sockets Layer (SSL) and TLS protocols, as well as a range of cryptographic algorithms, hash algorithms, and public key infrastructure features. OpenSSL is used to ensure the security of data transmission.
[0141] Since libcurl supports HTTP / HTTPS protocols, which are based on SSL / TLS, it typically relies on OpenSSL when implementing HTTP / HTTPS functionality. When using libcurl to send HTTP / HTTPS requests, libcurl uses OpenSSL to handle security-related operations such as SSL / TLS handshakes, encryption, and decryption.
[0142] In some embodiments, the underlying transport protocol may include Berkeley sockets (BSD sockets). BSD sockets are an API for communication between computer networks. BSD sockets support communication between different electronic devices or between different processes within the same electronic device.
[0143] In some embodiments, the system layer may further include: routing configuration. This routing configuration is used to configure the routing tables of network devices so that data packets can be correctly forwarded between networks.
[0144] The kernel layer is the layer between hardware and software. It provides hardware capability abstractions to the hardware above and development frameworks and runtime environments for various peripheral drivers to the hardware below. The kernel layer can include drivers. Drivers are used to drive the corresponding hardware. For example, drivers can include display drivers, audio drivers, sensor drivers, motor drivers, etc. Figure 2A illustrates this using a communication chip driver as an example.
[0145] Referring to Figure 2A, the driver may include, but is not limited to: Modem chip driver, Wi-Fi chip driver, Bluetooth chip driver, satellite chip driver, etc.
[0146] In order to realize the communication method provided in the embodiments of this application, and to achieve DNS racing, link establishment racing, transmission racing, and dynamic racing during transmission, in some embodiments, racing units can be added to modules in different layers, and these racing units can jointly realize racing during the communication process.
[0147] For example, referring to Figure 2A, the DNS service is configured with a racing unit, which assists the electronic device in achieving DNS racing. The racing unit can be configured in the driver; for example, Figure 2A shows a racing unit configured in the modem chip driver. The racing unit in the modem chip driver assists the electronic device in achieving DNS racing when performing DNS queries on the cellular channel.
[0148] The underlying transmission protocol can be configured with a racing unit, which assists electronic devices in achieving blockchain establishment racing. In some embodiments, blockchain establishment racing can be referred to as connection racing.
[0149] A racing unit can be configured in the application transport protocol stack to assist the electronic device in achieving transmission racing. In some embodiments, the racing unit in the application transport protocol stack can also be used to assist the electronic device in achieving dynamic racing during the transmission process.
[0150] Dynamic speed-up can include, but is not limited to, link speed-up based on link quality, system performance, power consumption, and traffic costs during transmission. In this example, the speed-up unit in the driver can assist the speed-up unit in the application's transport protocol stack to achieve dynamic speed-up.
[0151] Figure 2A illustrates the addition of racing units to modules at different layers, with these units collectively implementing racing during the communication process. In some embodiments, DNS racing, connection establishment racing, transmission racing, and dynamic racing during transmission can also be implemented by the application layer. For example, when the app uses its own transport protocol stack or is directly based on BSD Socket programming, racing units can be configured in the app. When the app uses the operating system's application transport protocol stack (such as HTTP / QUIC), racing units can be configured in modules at each layer to enable the system to complete the racing. In this example, the system interface may not deploy or may deploy only a small number of interactive racing units (such as racing interfaces), in which case the app does not need to deploy racing units. For example, in Figure 2A, dashed boxes represent examples where racing units are configured in the app and system interface.
[0152] In some embodiments, a racing control center can be configured in the electronic device to implement DNS racing, link establishment racing, transmission racing, and dynamic racing during transmission. For example, referring to FIG2B, a racing control center can be configured at the frame layer of the electronic device. This racing control center is used to implement DNS racing, link establishment racing, transmission racing, and dynamic racing during transmission.
[0153] In some embodiments, the racing control center is also used to realize cloud racing and racing by other devices. Cloud racing can be understood as: electronic devices and the cloud collaboratively realizing DNS racing, blockchain establishment racing, transmission racing, and dynamic racing during transmission. Racing by other devices can be understood as: electronic devices and other devices collaboratively realizing DNS racing, blockchain establishment racing, transmission racing, and dynamic racing during transmission. Other devices may include peripheral devices of the electronic devices, remote devices, etc.
[0154] It should be understood that the dashed box in Figure 2B represents cloud racing and other device racing as optional examples.
[0155] Taking the collaborative implementation of DNS speed-up, chain-building speed-up, transmission speed-up, and dynamic speed-up during transmission by electronic devices and the cloud as an example, the collaborative implementation of speed-up can be understood as follows: some speed-up can be performed by electronic devices, and the remaining speed-up is performed by the cloud; or, some steps in a speed-up are performed by electronic devices, and the remaining steps are performed by the cloud.
[0156] Understandably, in scenarios where electronic devices and cloud or other devices collaborate to achieve speed-up, the electronic devices can provide relevant information about the speed-up to the cloud or other devices so that the cloud or other devices can execute speed-up operations. This relevant information can include: information related to DNS speed-up, blockchain establishment speed-up, transmission speed-up, and dynamic speed-up during transmission. The relevant information at each stage of the speed-up is used by the cloud or other devices to implement DNS speed-up, blockchain establishment speed-up, transmission speed-up, and dynamic speed-up during transmission.
[0157] In some embodiments, where electronic devices compete with other devices, the other devices may be in IP-Forward mode or in proxy mode.
[0158] In some embodiments, the connection between electronic devices and other devices can be a point-to-point (P2P) connection, or the data can be relayed through a third-party device.
[0159] The following embodiments illustrate the communication method provided in this application by taking examples of an electronic device performing DNS speed-up, link-building speed-up, transmission speed-up, and dynamic speed-up during transmission. It is understood that some steps performed by the electronic device in the following embodiments can also be performed by the cloud or other devices to enable collaborative speed-up between the electronic device and the cloud / other devices.
[0160] The communication method provided in this application will be described below with reference to specific embodiments. These embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0161] Figure 3 is a schematic diagram of a multi-stage racing method provided in an embodiment of this application. In some embodiments, the multi-stage racing method may include at least one of the following stages: DNS racing, chain building racing, transmission racing, and dynamic racing. Figure 3 uses the example of a multi-stage racing method including DNS racing, chain building racing, transmission racing, and dynamic racing.
[0162] For example, after DNS speed-up, the electronic device obtains three IP addresses: address 1, address 2, and address 3. The electronic device can then use these three IP addresses to establish network connections with the corresponding servers to compete in link-building. Assuming address 1 is the winner of the link-building competition, and addresses 2 and 3 are the losers, in this embodiment, the electronic device does not directly transmit data with the server corresponding to address 1 during the transmission competition. Instead, the losers are allowed to participate. The electronic device can use the links established by addresses 1, 2, and 3 respectively to compete in the transmission competition. Assuming address 2 is the winner of the transmission competition, the electronic device can maintain the link with the server corresponding to address 2 and transmit data on that link. For the links corresponding to addresses 1 and 3, the electronic device can either shut down the link, wait for it to age naturally, or keep the link active for a period of time for subsequent dynamic competition.
[0163] In addition, during data transmission between the electronic device and the server corresponding to address 2, if the link quality deteriorates or a better link becomes available, the electronic device can perform dynamic racing to switch links to transmit data.
[0164] This application provides a multi-stage speed-up process, where the winner of each stage is not necessarily the final transmission speed-up winner. This application allows losers from previous stages to participate in the next stage. Furthermore, this application considers not only performance during the speed-up process but also other factors such as the electronic device's bandwidth, preferences, and power consumption, as described in the following embodiments.
[0165] In this embodiment of the application, referring to Figure 4, each stage of the race can be divided into 3 steps:
[0166] Step 1: Identify multiple candidates for the race.
[0167] Step 2: Compete against multiple candidates to determine the winner.
[0168] Step 3: The winner completes this stage or continues to participate in the next stage of the race.
[0169] The following examples illustrate the racing process at each stage, based on DNS racing, chain building racing, transmission racing, and dynamic racing.
[0170] Phase 1: DNS Race
[0171] Compared to existing technologies where electronic devices perform DNS queries using a single or dual stack, in this embodiment, the electronic device can query more IP addresses through at least one of the following: dual stack, at least one DNS service (local DNS service), at least one physical channel, peripheral devices, cloud, third-party DNS services, etc. This expands the range of IP addresses that the electronic device can choose to establish a connection, thus enabling DNS speedup.
[0172] In some embodiments, when an electronic device is configured with a single physical channel and has not established a connection with peripheral devices, the cloud, or third-party DNS services, the electronic device can perform DNS queries through dual stacks, at least one DNS service, and a single physical channel to achieve DNS speedup on a single device and in a single channel.
[0173] In some embodiments, when an electronic device is configured with multiple physical channels and has not established connections with peripheral devices, the cloud, third-party DNS services, etc., the electronic device can perform DNS queries through dual stacks, at least one DNS service, and at least one physical channel to achieve DNS speedup on a single device with multiple channels.
[0174] For example, referring to Figure 5a, taking multi-channel NDS racing as an example, for instance, an electronic device is configured with 3 physical channels, and the electronic device can perform DNS queries on these 3 physical channels to realize DNS racing between physical channel 1, physical channel 2 and physical channel 3.
[0175] In scenarios involving multiple channels competing for DNS speed, it's important to note that if these physical channels inherently compete for resources and cannot coexist, then those channels cannot participate in the network speed-up process. For example, in dual-SIM mode, if the electronic device does not support dual SIM dual standby (DSDS), it cannot simultaneously perform DNS queries on both the primary and secondary cellular SIM cards. In such scenarios, the electronic device can choose the physical channel with the best quality (e.g., the primary cellular SIM) for DNS queries.
[0176] In some embodiments, when an electronic device is configured with a single (or multiple) physical channel and establishes connections with peripheral devices, the cloud, or third-party DNS services, the electronic device can perform DNS queries through dual stacks, at least one DNS service, a single (or at least one) physical channel, and peripheral devices, the cloud, or third-party DNS services to achieve DNS speed-up across multiple devices and channels.
[0177] In this example, when multiple physical channels are configured in the peripheral device and the cloud, each physical channel in the peripheral device and the cloud can also perform DNS queries. That is, when an electronic device performs a DNS query through the peripheral device and the cloud, the peripheral device and the cloud can perform DNS queries through each of the configured physical channels, realizing DNS speed-up for multiple devices and multiple channels.
[0178] For example, referring to Figure 5b, taking an electronic device performing a DNS query through a peripheral device as an example, the electronic device is configured with one physical channel, and the peripheral device is configured with two physical channels. The electronic device can perform a DNS query through its own physical channel, and the electronic device can also perform a DNS query through the two physical channels of the peripheral device, thus realizing DNS speed-up among the physical channels of the electronic device, physical channel 1 of the peripheral device, and physical channel 2.
[0179] It is understandable that electronic devices can obtain at least one IP address through DNS racing.
[0180] Phase 2: Chain Building Race
[0181] In some embodiments, the method shown in Figure 1B can be improved to increase the connection establishment speed. In this example, referring to stage 1, the electronic device can perform a DNS query through DNS race mode to obtain at least one IP address. Here, the electronic device can establish a connection immediately after the DNS query. Immediate connection establishment means that the electronic device can establish a connection immediately after obtaining the first IP address, without waiting to obtain all IP addresses, thus reducing the connection establishment time. Figure 6 illustrates that in the prior art, connection establishment only begins after all IP addresses have been obtained through DNS query, and data transmission occurs after successful connection establishment. Figure 6 also illustrates that in this application, connection establishment can begin immediately after obtaining the first IP address through DNS query.
[0182] In some embodiments, electronic devices may use a tiered or simultaneous chain building approach to compete for chain building speed.
[0183] In this context, tiered link establishment can be understood as follows: After an electronic device establishes a connection with the server using the first IP address, it waits for a preset time before using the second IP address to establish a connection, and so on. This continues until the electronic device successfully establishes a link with the server. The electronic device then determines the fastest IP address as the winner and retains the fastest link. For example, Figure 7a illustrates tiered link establishment, where link 2 is established after a preset time following the initial establishment of link 1.
[0184] Simultaneous link establishment can be understood as follows: after an electronic device has retrieved a preset number of IP addresses, it simultaneously establishes connections with the server based on those preset number of IP addresses. For example, if the preset number is 2, after retrieving two IP addresses, such as IP address 1 and IP address 2, the electronic device can establish a connection with the server using IP address 1 and simultaneously use IP address 2. For example, Figure 7b illustrates simultaneous link establishment, where the electronic device establishes link 1 and link 2 at the same time.
[0185] In some embodiments, the electronic device can determine whether to use tiered or simultaneous chain building based on the service type. For example, when the service type has high performance requirements, the electronic device can use simultaneous chain building to compete for chain building speed. When the service type has low performance requirements, the electronic device can use tiered chain building to compete for chain building speed.
[0186] For example, high-performance applications may include, but are not limited to: games, online video playback, real-time data analysis, and virtual reality (VR) and augmented reality (AR) applications. Low-performance applications may include, but are not limited to: document editing, email sending and receiving, and web browsing.
[0187] Whether establishing a connection immediately or in a tiered manner, electronic devices need to use IP addresses to establish connections in a certain order; that is, the electronic devices need to sort the IP addresses. For example, in the method shown in Figure 1B above, the electronic device sorts the queried IP addresses by alternating between IPv6 and IPv4 IP addresses. However, this sorting method is not consistent with the connection establishment speed and will affect the connection establishment speed of the electronic device.
[0188] In some embodiments, during simultaneous connection establishment, the electronic device can determine whether to sort the IP addresses based on the number of acquired IP addresses. Specifically, when the number of IP addresses is less than or equal to a threshold, the electronic device does not need to sort the IP addresses and can establish connections simultaneously after acquiring multiple IP addresses. When the number of IP addresses exceeds the threshold, the electronic device can sort the IP addresses and select the first m sorted IP addresses for simultaneous connection establishment. Here, m is an integer greater than or equal to 2.
[0189] In this embodiment of the application, the electronic device may sort the queried IP addresses according to at least one of the following information:
[0190] 1. Preference for IPv4 and IPv6:
[0191] When an electronic device supports both IPv4 and IPv6, it can sort the retrieved IP addresses based on its preference for IPv4 or IPv6. For example, if the electronic device prefers IPv6, it can sort IPv6 addresses before IPv4 addresses, allowing it to prioritize the use of IPv6 addresses for connection establishment. Conversely, if the electronic device prefers IPv4, it can sort IPv4 addresses before IPv6 addresses, again prioritizing IPv4 addresses for connection establishment.
[0192] In some embodiments, IPv6 can provide more address resources. In IoT devices, IPv6 can assign an independent IP address to each IoT device, enabling direct communication between devices and improving network flexibility and scalability. In the cloud computing field, cloud platforms need to support a large number of virtual machines and container instances, which require independent IP addresses for communication. IPv6's abundant address resources can meet this requirement of cloud computing, while improving network security and performance. In telemedicine scenarios, telemedicine devices require stable and secure network connections to transmit medical data. IPv6's built-in security mechanisms and abundant address resources enable telemedicine systems to better ensure the security and reliability of data transmission.
[0193] In summary, IoT devices, cloud computing devices, and telemedicine devices tend to prefer IPv6. It should be understood that the aforementioned IPv6-preferred devices are illustrative examples, and this application does not limit the types of devices or application scenarios.
[0194] In some embodiments, despite the limited address resources of IPv4, its broad compatibility and long-standing usage habits may lead electronic devices to prefer IPv4 in scenarios such as: many legacy network applications and systems developed based on IPv4 may not directly support IPv6 without specific modifications, thus requiring reliance on IPv4; applications in certain industries may prefer IPv4 due to specific technical requirements or regulatory constraints. For example, some financial industry applications may choose to continue using IPv4 for security reasons; and in resource-constrained network environments (such as embedded systems, small network devices, etc.), IPv4 may remain the preferred protocol due to its lower complexity and lower overhead.
[0195] In summary, older network applications and systems, applications in certain industries, and devices in resource-constrained network environments tend to prefer IPv4. It should be understood that the aforementioned devices that prefer IPv4 are illustrative examples, and this application does not limit the types of devices or application scenarios.
[0196] 2. Remaining flow:
[0197] The electronic device can sort the retrieved IP addresses based on its remaining bandwidth. In some embodiments, when the remaining bandwidth of the electronic device is less than a first threshold, indicating that the remaining bandwidth of the electronic device is low, the electronic device can prioritize the IP addresses retrieved through the cellular channel.
[0198] 3. Power consumption, and / or heat generation:
[0199] Electronic devices can sort the retrieved IP addresses based on their power consumption and / or heat generation. In some embodiments, when the power consumption of an electronic device is high, such as when the remaining battery power is less than a second threshold, the electronic device can control the number of IP addresses participating in the chain-building competition to conserve battery power and ensure its battery life.
[0200] In some embodiments, when the power consumption of the electronic device is high, for example, when the power consumption of the electronic device is greater than or equal to a third threshold, in order to reduce the power consumption of the electronic device, the electronic device may sort the IP addresses obtained on the physical channel with high power consumption to a later position.
[0201] In some embodiments, when the electronic device generates a lot of heat, for example, when the temperature of the electronic device is greater than or equal to a fourth threshold, in order to reduce the temperature of the electronic device, the electronic device may prioritize IP addresses acquired on high-power physical channels, where high power consumption causes the temperature of the electronic device to rise. The temperature of the electronic device can be any of the following: the temperature of the electronic device's casing, the temperature of the electronic device's central processing unit (CPU), or the temperature of the electronic device's battery.
[0202] 4. Historical chain establishment information:
[0203] Electronic devices can sort retrieved IP addresses based on historical connection establishment information. This information may include connection success rate and latency for each IP address. In some embodiments, the electronic device can prioritize IP addresses with high success rates and short latency, and prioritize those with low success rates and long latency. This allows the device to select IP addresses with high success rates and short latency, thereby improving its connection establishment speed.
[0204] In some embodiments, historical connection establishment information may further include spatial and temporal information corresponding to the IP address. For example, if an IP address experiences high traffic volume during a specific time period, it can lead to decreased connection establishment latency and success rate. Therefore, during that specific time period, the IP address can be ranked lower in the order of traffic volume. Conversely, during a specific time period, IP addresses with low traffic volume can be ranked higher in the order of traffic volume.
[0205] In some embodiments, historical blockchain establishment information may also include the IP address version corresponding to the blockchain establishment, the port corresponding to the IP address, and the blockchain establishment protocol, and may even carry TLS / DTLS handshake information. When historical blockchain establishment information carries TLS / DTLS handshake information, the TLS / DTLS handshake information may include TLS / DTLS handshake latency and success rate. This TLS / DTLS handshake latency and success rate can be used for IP address sorting; specific methods can refer to the description of using blockchain establishment success rate and blockchain establishment latency for IP address sorting.
[0206] In some embodiments, when the historical connection establishment information carries TLS / DTLS handshake information, the electronic device and the corresponding server can perform a TLS / DTLS handshake in advance after the electronic device and the corresponding server have successfully established a connection, which can speed up the data transmission speed.
[0207] The above describes various methods for electronic devices to compete in blockchain creation. The following describes methods for electronic devices to initiate blockchain creation:
[0208] Figure 8a illustrates a method for an electronic device to initiate a blockchain connection. In some embodiments, the connection is initiated by a client (or app). For example, the client can send a blockchain connection request to a system module. In response to the request, the system module can establish a blockchain connection with the corresponding server based on the IP address, thus achieving a blockchain connection race. The blockchain connection race method can be found in the description of the embodiments above.
[0209] In some embodiments, the system module may be a network subsystem (netsys). For example, this network subsystem may include a DNS resolver and a socket. It should be understood that a socket allows clients to communicate over a network. A socket is essentially an interface that provides a standard set of network programming interfaces, enabling clients to transmit data over a network.
[0210] Figure 8b illustrates another method for an electronic device to initiate a connection. In some embodiments, the system module can directly establish a connection with the server based on the IP address, without waiting for the client to initiate a connection request. In some embodiments, the method of the system module directly establishing a connection with the server based on the IP address can be called system pre-establishment of the connection. In this example, if the system module has already successfully established a link with the server, when the APP initiates a connection request, it can be directly mapped to the already established link. In this example, the system module directly initiates the connection establishment without waiting for the APP to initiate a connection request, which can also improve the connection establishment speed.
[0211] Figure 9 is a flowchart illustrating one method for establishing a link, as shown in Figure 8b. Referring to Figure 9, this method may include:
[0212] S901, the client sends a DNS query request to the network subsystem.
[0213] S902, the network subsystem sends a DNS query request to the DNS server.
[0214] S903: After the DNS server finds the IP address, it reports the IP address back to the network subsystem.
[0215] S904, the network subsystem sends the IP address back to the client.
[0216] The S905 network subsystem establishes connections with the server based on IP addresses, enabling rapid connection establishment.
[0217] The process of establishing a blockchain based on IP address in the network subsystem can be referred to the relevant description in the above embodiments.
[0218] In some embodiments, the order of S904 and S905 is not limited.
[0219] S906 responds to an IP address, allowing the client to interact with the network subsystem and create a socket.
[0220] S907, the client sends a connection establishment request to the network subsystem.
[0221] S908: Once the network subsystem and the server have successfully established a connection, the network subsystem sends a notification to the client indicating that the connection has been successfully established.
[0222] Once the network subsystem and the server have successfully established a link, in response to the link establishment request, the network subsystem can directly map to the established link and send a message to the client indicating that the link establishment was successful.
[0223] Understandably, as described in the example above, electronic devices can establish multiple links simultaneously by using simultaneous link establishment or by establishing links based on historical link establishment information or other information.
[0224] S909: While the network subsystem and the server are establishing a link, the network subsystem waits for the link to be established and then sends a successful link establishment notification to the client.
[0225] While the network subsystem and the server are establishing a link, in response to the link establishment request, the network subsystem waits for the link to be established successfully. The network subsystem can then directly map to the established link and send feedback to the client that the link establishment was successful.
[0226] S910, if the link indicated in the link establishment request is not included in the links already established or being established between the network subsystem and the server, the network subsystem releases the established or being established link.
[0227] A client can initiate a link establishment request, which indicates the link to be established. For example, the link establishment request may include the IP address corresponding to the server. In this embodiment, the network subsystem and the server can establish a link in advance. The network subsystem and the server may already have a link established, or the network subsystem and the server may be establishing a link. If the link indicated by the link establishment request is not included in the links already established or being established between the network subsystem and the server, i.e., the link establishment initiated by the client is inconsistent with the link predicted by the network subsystem, the network subsystem can release the established or being established link. Correspondingly, the network subsystem can respond to the link indicated by the link establishment request and establish a link with the corresponding server.
[0228] In some embodiments, the release of established links by the network subsystem can be understood as the network subsystem releasing established links after waiting for the link to age out.
[0229] It is understandable that the connection establishment initiated by the client is inconsistent with the connection predicted by the network subsystem. For example, if the client is upgraded and the connection establishment was originally based on TCP but is now based on UDP, the connection establishment race can be skipped and the transmission race can proceed directly. This change is mainly due to the change in client behavior.
[0230] It should be understood that S908-S910 are steps that can be performed selectively.
[0231] In some embodiments, steps S908-S910 are optional, meaning the network subsystem may not need to report the link status to the client.
[0232] Phase 3: Transmission Race
[0233] In Phase 2, an electronic device can establish a link with a corresponding server based on at least one IP address, achieving a link-building race. Accordingly, the electronic device can successfully establish at least one link. For example, the electronic device can establish link 1 based on IP address 1, link 2 based on IP address 2, and link 3 based on IP address 3.
[0234] Assuming link 1 is the fastest link to establish, in the prior art, electronic devices can use link 1 for data transmission. However, a fast link establishment does not necessarily mean a fast data transmission speed. In this embodiment, the electronic device can compete for transmission speed among at least one link to select the link with the fastest data transmission speed for data transmission, thereby improving the transmission speed.
[0235] In some embodiments, the electronic device may employ any of the following methods for transmission racing: initial transmission racing, subsequent transmission racing, multi-round transmission racing, and dynamic transmission racing. A round of data transmission can be understood as the entire process from when the electronic device sends a request, to when the server responds to the request and returns data, and finally to when the electronic device receives and processes that data. In some embodiments, a round of data transmission may involve the sending and receiving of multiple data packets.
[0236] 1. First round of transmission speed-up:
[0237] The first round of data transmission race can be understood as: during the initial data exchange between the electronic device and the server, the electronic device races for transmission speed across multiple links. For example, if the electronic device and the server need to exchange data for 5 rounds, during the first round of data exchange, the electronic device can race for transmission speed across multiple links, such as link 1, link 2, and link 3.
[0238] In some embodiments, the first round of transmission speed-up can be applied to scenarios where the network quality of the electronic device is relatively stable, or where the location of the electronic device does not change significantly. For example, relatively stable network quality can mean that fluctuations in signal strength, interference, congestion, bandwidth, latency, or packet loss are within a first preset range. Minimal location change of the electronic device can be understood as the location change of the electronic device being within a preset range. For example, the location change of the electronic device is within 3 meters.
[0239] 2. Each round of transmission speed race:
[0240] Each round of data transmission can be understood as follows: during each round of data exchange between the electronic device and the server, the electronic device competes for transmission speed across multiple links. For example, if the electronic device and the server need to exchange data for 5 rounds, the electronic device can compete for transmission speed across multiple links during each round of data exchange; for instance, the electronic device can compete for transmission speed across links 1, 2, and 3.
[0241] In some embodiments, the transmission race per round can be applied to scenarios where the network quality or link quality of the electronic device is unstable. In some embodiments, because the power consumption of each transmission race is high, the transmission race per round can be applied to scenarios where the electronic device has sufficient bandwidth and the power consumption and heat do not meet preset conditions.
[0242] Link quality instability can be understood as the fluctuation of signal strength, interference, congestion, bandwidth, latency, or packet loss on the link exceeding a first preset range.
[0243] 3. Multi-round transmission race:
[0244] Multi-round data transmission races can be understood as follows: during at least two rounds of data exchange between an electronic device and a server, the electronic device races for data transmission across multiple links. For example, if the electronic device and server need to exchange data for five rounds, the electronic device can race for data transmission across multiple links in each of the five rounds, or in at least two of the five rounds. For instance, the electronic device can race for data transmission across links 1, 2, and 3.
[0245] For example, taking the data interaction of an electronic device in rounds 1, 3, and 5 of a 5-round data exchange as an example, the electronic device competes for transmission speed across multiple links during the first round of data interaction. The electronic device can assign a weighted score to each link. The link with the highest score is used to transmit data in the first round. For example, the electronic device can assign a weighted score to the links based on link information. Link information may include, but is not limited to, packet loss rate, retransmission rate, and transmission latency.
[0246] In this example, during the third round of data interaction, the electronic device competes to transmit data across links 1, 2, and 3, and can assign a weighted score to each link. The electronic device can then combine the scores from rounds 1 and 3 to determine the winner. The link with the highest score is used to transmit data in round 3. Similarly, during the fifth round of data interaction, the electronic device competes to transmit data across links 1, 2, and 3, and can assign a weighted score to each link. The electronic device can then combine the scores from rounds 1, 3, and 5 to determine the winner. The link with the highest score is used to transmit data in round 5.
[0247] In some embodiments, multi-round transmission racing can be applied to scenarios where the network quality of the electronic device is relatively stable, or where the location of the electronic device does not change significantly. For example, relatively stable network quality can be defined as fluctuations in signal strength, interference, congestion, bandwidth, latency, or packet loss within a second preset range. For instance, the second preset range may be greater than the first preset range.
[0248] 4. Dynamic Transmission Racing (referred to as Dynamic Racing):
[0249] In some embodiments, provided that the electronic device performs any one of the following transmission races: first-round transmission race, subsequent transmission races, or multiple-round transmission races, the electronic device may also perform dynamic transmission races during data transmission.
[0250] For example, during the process of an electronic device interacting with a server using Link 1, the electronic device can evaluate Link 1, Link 2, and Link 3 in real time. When the transmission quality of Link 1 is less than or equal to the quality threshold, or when the transmission quality of Link 2 or Link 3 is higher than that of Link 1, the electronic device can switch to the link with higher transmission quality for data transmission, thereby improving the success rate and stability of data transmission.
[0251] In some embodiments, where the electronic device and the server support data transmission from the middle of a round, i.e., supporting breakpoint resumption, for example, if the electronic device uses link 1 to interact with the server, and x% of the data in a round has been transmitted, x is less than the first data (e.g., 100), meaning that the data transmission in a round is not yet complete, but the transmission ratio is greater than the first ratio (e.g., 30%), and the electronic device detects that the quality of link 1 has deteriorated, and the transmission quality of link 2 is higher than that of link 1, then the electronic device can use link 2 to transmit the remaining data in that round with the server, i.e., the electronic device switches from the middle of a round to another link to continue data transmission.
[0252] In some embodiments, where the electronic device and server do not support resuming data transmission from the middle of a round (i.e., do not support interrupted transmission), for example, if the electronic device uses link 1 to interact with the server and a round of data transmission has progressed by x%, where x is less than 100 (meaning the round of data transmission is not yet complete), and the electronic device detects that the quality of link 1 has deteriorated and the transmission quality of link 2 is higher than that of link 1, then the electronic device can continue to use link 1 to transmit the data for that round. After the data transmission for that round is completed, the electronic device can use link 2 to transmit the next round of data.
[0253] In some embodiments, where the electronic device and server do not support resuming data transmission from the middle of a round (i.e., do not support interrupted transmission), for example, if the electronic device uses link 1 to interact with the server, and a round of data transmission has reached x%, where x is less than a second value (e.g., 30), meaning the round of data transmission is not yet complete and the transmission ratio is less than or equal to a first ratio, and the electronic device detects that the transmission quality of link 2 is significantly higher than that of link 1, the electronic device can cancel the transmission of link 1 and retransmit the same round of data using link 2.
[0254] In some embodiments, the electronic device may determine that the transmission quality of link 1 is less than or equal to a quality threshold by using at least one of the following conditions:
[0255] 1) The transmission rate of link 1 is less than the rate threshold.
[0256] 2) The retransmission rate (or packet loss rate) of link 1 is greater than the retransmission rate threshold (or packet loss rate threshold).
[0257] 3) The transmission delay of link 1 is greater than the delay threshold.
[0258] 4) The jitter of Link 1 exceeds the threshold. The jitter of Link 1 can include rate jitter, latency jitter, etc.
[0259] Jitter in Link 1 reflects the transmission stability of Link 1. For example, the delay jitter of Link 1 can be determined by the change in the time interval between two consecutive data packets received by the electronic device from the server. When the change in the time interval between two consecutive data packets received by the electronic device from the server exceeds a threshold value, the electronic device determines that the delay jitter of Link 1 exceeds the threshold. For example, the rate jitter of Link 1 can be determined by the difference between two rates within a certain time range.
[0260] 5) Link 1 becomes a dead link.
[0261] 6) The quality of the physical channel (or air interface) where Link 1 is located is less than or equal to the quality threshold. The quality of the physical channel (or air interface) where Link 1 is located can be represented by interference of the physical channel (or air interface), air interface parameters, etc.
[0262] 7) The client reports that the transmission quality of link 1 is less than or equal to the quality threshold. The client can exchange data packets with the server through link 1, and can report when the transmission quality of link 1 is less than or equal to the quality threshold.
[0263] 8) The system detects that the user is performing a preset action on the electronic device. Preset actions include frequently swiping up and down on a page, resetting a switch, etc. For example, when the page is lagging, the user can frequently swipe up and down on the page, or reset the cellular or Wi-Fi switch. If the electronic device detects that the user is performing a preset action, it can determine that the transmission quality of Link 1 is less than or equal to a quality threshold.
[0264] In some embodiments, the electronic device may determine that the transmission quality of link 2 (or link 3) is higher than that of link 1 by using at least one of the following conditions. The following explanation uses the example of link 2 having a higher transmission quality than link 1:
[0265] If link 2 has been established, the electronic device can determine its status based on at least one of the following conditions: 1)-4).
[0266] 1) The transmission rate of link 2 is greater than that of link 1.
[0267] 2) The retransmission rate (or packet loss rate) of link 2 is less than that of link 1.
[0268] 3) The transmission delay of link 2 is less than that of link 1.
[0269] 4) The jitter of link 2 is less than that of link 1.
[0270] If link 2 is not established (e.g., it is shut down or aging naturally), the electronic device can determine this based on the conditions in section 5):
[0271] 5) The quality of the physical channel (or air interface) where Link 2 is located is higher than the quality of the physical channel (or air interface) where Link 1 is located.
[0272] It should be noted that after the electronic device and the server have completed the first round of data transmission race, if the electronic device and the server are exchanging data based on link 1, the electronic device can shut down links 2 and 3, or wait for link 2 to age naturally and then shut down link 2, and wait for link 3 to age naturally and then shut down link 3, or keep links 2 and 3 alive.
[0273] In some embodiments, in scenarios involving single-round transmission races, multiple-round transmission races, and dynamic transmission races, the electronic device needs to re-race links 1, 2, and 3. However, if links 2 and 3 are already closed, the electronic device needs to re-establish links 2 and 3.
[0274] In some embodiments, the establishment of link 2 by the electronic device can be referred to as separate link establishment. The establishment of link 2 by the electronic device may include: establishing the link in advance or establishing the link in a timely manner.
[0275] In this context, "early link establishment" can be understood as starting link establishment before a round of data transmission is completed. For example, taking each round of transmission race as an example, if the winner of the first round of data transmission race is link 1, and the electronic device shuts down links 2 and 3, or if links 2 and 3 have naturally aged out before the second round of data transmission race, then in this example, the electronic device can re-establish links 2 and 3 when the first round of data transmission is nearing its end. The first round of data transmission nearing its end could be, for example, that the progress of the first round of data transmission has reached a threshold (e.g., 95%), or that there is still a final preset amount of data (e.g., 1KB) remaining to be transmitted in the first round.
[0276] In this context, timely link establishment can be understood as initiating link establishment at the start of a new round of transmission race. For example, taking each round of transmission race as an example, if link 1 wins the first round of data transmission race, and the electronic device shuts down links 2 and 3, or if links 2 and 3 have naturally aged out before the second round of data transmission race, then in this example, the electronic device can re-establish links 2 and 3 during the second round of data transmission race.
[0277] In some embodiments, in scenarios of each round of transmission race, multiple rounds of transmission race, and dynamic transmission race, the electronic device needs to re-race the transmission of links 1, 2, and 3. If links 2 and 3 are still alive, the electronic device can reuse links 2 and 3. That is, the electronic device can directly race the transmission of links 1, 2, and 3.
[0278] In summary, regardless of whether it's initial transmission race, subsequent transmission race, multi-round transmission race, or dynamic transmission race, when electronic devices race for transmission on links 1, 2, and 3, they can use any of the following methods: first-packet race, multi-packet race, and last-packet race. In other words, referring to Figure 10, electronic devices can use any of the following methods for transmission race: initial transmission race, subsequent transmission race, multi-round transmission race, and dynamic transmission race. Furthermore, within each type of transmission race, they can also use any of the following methods: first-packet race, multi-packet race, and last-packet race. That is, electronic devices can support 12 types of transmission races.
[0279] The following sections introduce the first-pack race, multiple-pack races, and the last-pack race:
[0280] 1. First Pack Race
[0281] First packet race can be understood as: racing using the first data packet in a round.
[0282] In some embodiments, the electronic device is configured with the HTTP / HTTPS protocol. During transmission speed competition, the electronic device can send HTTP requests to the corresponding server on different links in a tiered or concurrent manner. For example, if the electronic device competes for transmission speed on links 1, 2, and 3, the order after the link establishment competition is link 1, link 2, link 3.
[0283] The electronic device uses a tiered approach, sending HTTP requests to corresponding servers on different links. This can be understood as follows: the electronic device first sends an HTTP request to the corresponding server via link 1, waits for a preset time, then sends an HTTP request via link 2, waits for a preset time, and then sends an HTTP request via link 3. In some embodiments, the preset time here may differ from the preset time in the tiered link establishment.
[0284] The concurrent sending of HTTP requests to corresponding servers by electronic devices on different links can be understood as follows: at the same time, the electronic device sends an HTTP request to the corresponding server using link 1, an HTTP request to the corresponding server using link 2, and an HTTP request to the corresponding server using link 3.
[0285] Understandably, electronic devices can pre-obtain the IP addresses corresponding to Link 1, Link 2, and Link 3. This allows the electronic device to send HTTP requests to the corresponding servers on the corresponding links concurrently. Alternatively, if the electronic device obtains the IP addresses for Link 1, Link 2, and Link 3 in a specific order, it can use a tiered approach to send HTTP requests to the corresponding servers on the corresponding links.
[0286] In some embodiments, if the service has high performance requirements, the electronic device can establish a connection immediately after obtaining an IP address.
[0287] In the first-packet race, the link that receives the first packet response (such as 200 OK) from the server first can be considered the winner of the transmission race.
[0288] Referring to Figure 11, taking concurrent HTTP requests as an example, an electronic device can simultaneously send HTTP requests using Link 1, Link 2, and Link 3. If the electronic device receives the first packet feedback (such as 200 OK) on Link 1 first, the electronic device can consider Link 1 as the winner of the transmission race, while Link 2 and Link 3 can be considered as the losers of the transmission race.
[0289] In some embodiments, referring to FIG11, for the losing links 2 and 3 in a transmission race, the electronic device can shut down links 2 and 3. Taking link 2 as an example, the electronic device can release the socket / channel corresponding to link 2. Taking the release of the socket corresponding to link 2 by the electronic device as an example, if the electronic device is configured with the TCP protocol, the electronic device can execute the FIN (finish) procedure or the RST (reset) procedure to release the socket corresponding to link 2. If the electronic device is configured with the UDP protocol, the service layer and service of the electronic device need to execute the release procedure, and subsequent data packets received from the server will no longer be acknowledged. The FIN procedure and RST procedure can be referred to the description in the prior art.
[0290] In some embodiments, referring to FIG11, for the losing links 2 and 3 in the transmission speed race, the electronic device may retain links 2 and 3. Specifically, the electronic device may wait for link 2 to age naturally and then shut down link 2, and wait for link 3 to age naturally and then shut down link 3; alternatively, the electronic device may keep links 2 and 3 alive.
[0291] In some embodiments, the electronic device is configured with the TCP / UDP protocol. During a transmission race, the electronic device can use a tiered or concurrent approach to send the first data packet to the corresponding server on different links. In the first-packet race, the electronic device can identify the link that first receives an acknowledgment character (ACK) from the server as the winner of the transmission race. In some embodiments, the electronic device can handle the losers of the transmission race in the manner shown in Figure 11.
[0292] In this example, the electronic device is configured with TCP / UDP protocols. In some embodiments, the electronic device can determine the completion of the transmission race at the transport layer, or the client can call the relevant interface to determine the link that first receives the ACK.
[0293] 2. Multi-packet racing
[0294] Multiple packets can be understood as: the number of data packets reaches a preset number, or the data volume reaches a preset data volume. The preset number can be 2 packets or 3 packets. The preset data volume can include: the total length of the data reaching a preset percentage (such as 1%, 3%, or 5%) or the absolute data size reaching a preset data volume (such as 100 bytes, 1KB, or 3KB).
[0295] In some embodiments, the electronic device is configured with the HTTP / HTTPS protocol. When conducting transmission speed competition, the electronic device can use a tiered or concurrent approach to send HTTP requests to the corresponding server on different links. Taking multi-packet speed competition as an example of 2-packet speed competition, after the electronic device sends HTTP requests to the corresponding server on different links, the electronic device can take the link that first receives the feedback of 2 data packets (such as 200 OK) as the winner of the transmission speed competition.
[0296] In some embodiments, the electronic device is configured with TCP / UDP protocols. During transmission speed-up, the electronic device can use a tiered or concurrent approach to send the first data packet, the second data packet, to the corresponding server on different links. Taking a two-packet speed-up as an example, after the electronic device sends two data packets to the corresponding server on different links, the link that first receives feedback (such as two ACKs or two data packets) is considered the winner of the transmission speed-up. In the TCP scenario, the feedback is an ACK; in the UDP scenario, the feedback is data.
[0297] In this example, the electronic device can determine the completion of the transmission race at the transport layer, or the client can call the relevant interface to determine the link that first receives two ACKs or data.
[0298] In a multi-packet race scenario, electronic devices can handle the losers of the transmission race in the manner shown in Figure 11.
[0299] 3. Tail Pack Race
[0300] Tail packet speedrun can be understood as: using the last data packet in a round for speedrunning.
[0301] In some embodiments, the electronic device is configured with the HTTP / HTTPS protocol. When competing for transmission speed, the electronic device can send HTTP requests to the corresponding server on different links in a tiered or concurrent manner. After the electronic device sends HTTP requests to the corresponding server on different links, the electronic device can identify the link that first receives the feedback of the tail packet (such as 200 OK) as the winner of the transmission speed competition.
[0302] The electronic device can determine the total length of the current data packet based on the Content-Length field in the server's response to the first packet (such as the HTTP Response Header), and then use this total length to identify the last packet. Alternatively, the last packet may contain a tail packet marker, which the electronic device can use to identify the last packet. Another option is to use HTTP end markers (such as two CRLF carriage returns and line feeds) to identify the last packet.
[0303] In some embodiments, when an electronic device interacts with a server for a round of data, the electronic device may use the last packet of data from that round as the tail packet.
[0304] In some embodiments, the electronic device is configured with the TCP / UDP protocol. During transmission speed competition, the electronic device can use a tiered or concurrent approach to send data packets to the corresponding servers on different links. After the electronic device sends the last data packet to the corresponding server on different links, the electronic device can identify the link that first receives the feedback (such as the last ACK or data) of the last data packet as the winner of the transmission speed competition.
[0305] In this example, the electronic device can determine the completion of the transmission race at the transport layer, or the client can call the relevant interface to determine the link that first received the last ACK or data.
[0306] In the tail packet race scenario, electronic devices can handle the losers of the transmission race in the manner shown in Figure 11.
[0307] It is important to note that in the first packet race, multiple packet races, and last packet races, regardless of whether the electronic device is configured with HTTP / HTTPS or TCP / UDP protocols, if the system module cannot obtain information from the server at the transport layer, it cannot determine whether the transmission race should be terminated. In this case, it is necessary to allow the client to call relevant interfaces to terminate the transmission race. It is understood that in this embodiment, the system module can adaptively determine to terminate the transmission race, or the client can call relevant interfaces to determine the termination of the transmission race.
[0308] It is understood that the above embodiments are illustrated using examples of electronic devices configured with HTTP / HTTPS and TCP / UDP protocols. The embodiments of this application do not limit the data transmission protocol configured in the electronic device. For example, it can also be a file transfer protocol (FTP) or other transmission protocols.
[0309] The termination of the transmission race can be understood as the completion of the transmission race, or as the electronic device having determined the winner and loser of the transmission race.
[0310] Phase 4: Dynamic Racing
[0311] The dynamic race in Phase 4 can be referred to the description in "Dynamic Transmission Race" above.
[0312] In this embodiment, the electronic device supports DNS speed-up, chain-building speed-up, transmission speed-up, and dynamic speed-up during transmission. The electronic device can query more IP addresses through dual-stack, different DNS services, different physical channels, peripheral devices, cloud or third-party DNS services, etc. This can expand the range of IP addresses that the electronic device can choose for chain-building and help the electronic device select faster IP addresses for chain-building.
[0313] During the chain-building race, electronic devices do not simply sort IP addresses under IPv6 before IP addresses under IPv4. Instead, they sort the queried IP addresses based on at least one of the following information: preference for IPv4 and IPv6, remaining traffic, power consumption, and / or heat, as well as historical chain-building information. This allows for a more accurate determination of the order of IP addresses and improves the chain-building speed.
[0314] In this embodiment, the electronic device can also perform transmission speed competition, which avoids the problem that fast link establishment does not necessarily mean fast data transmission. The electronic device can use the fastest link for data transmission. In addition, the electronic device also supports dynamic speed competition. During data transmission, if the link quality deteriorates, the electronic device can switch links in a timely manner to ensure data transmission success rate.
[0315] In addition, this application also describes a method for electronic devices to perform transmission speed-up and dynamic speed-up when the electronic device is configured with the UDP protocol. This method can be adapted to electronic devices configured with TCP or UDP.
[0316] Furthermore, this application embodiment also provides a racing method for the TLS and DTLS phases after successful chain establishment. For example, after the chain establishment race ends and before the transmission race, the electronic device can use a concurrent or tiered approach, such as performing TLS / DTLS handshakes on link 1, link 2, and link 3. The electronic device can select the link that completes the handshake fastest as the winner. It is understood that after the TLS and DTLS phases, the electronic device can also support transmission racing and dynamic racing, as described in the above embodiments.
[0317] In some embodiments, the race between the TLS and DTLS phases after successful chain establishment can be optional, and the race between the TLS and DTLS phases can be used in cryptographic scenarios.
[0318] Figure 12 is a flowchart illustrating one embodiment of the communication method provided in this application. Referring to Figure 12, the communication method provided in this application may include:
[0319] It should be understood that an electronic device can obtain multiple IP addresses by performing a DNS query based on the first domain name, and these multiple IP addresses may include the first address and the second address. The method by which the electronic device performs the DNS query can be referred to the description in the above embodiments.
[0320] In some embodiments, when the electronic device uses the TCP protocol, after obtaining IP addresses, the electronic device can sort the IP addresses and establish links according to the sorted IP addresses in sequence to achieve link establishment speed competition. This process can be referred to the description in the above embodiments. In this embodiment, the process of transmission speed competition after the electronic device establishes a link is described using a first IP address and a second IP address as examples. Specifically, the electronic device establishes a first link based on the first IP address and establishes a second link based on the second IP address.
[0321] In some embodiments, when an electronic device uses the UDP protocol, the electronic device can directly perform a transmission race instead of performing a chain-building race.
[0322] In summary, in this embodiment of the application, the electronic device can interact with the server using a first link and a second link. The first link corresponds to a first IP address, and the second link corresponds to a second IP address. The first IP address and the second IP address are obtained by the electronic device through a Domain Name System (DNS) lookup based on the first domain name.
[0323] When the electronic device uses the TCP protocol, it can establish a first link based on a first IP address and a second link based on a second IP address. The link establishment process can be referred to the description in the above embodiments. When the electronic device uses the UDP protocol, it does not need to perform a link establishment race. It can interact with the server through both the first and second IP addresses. Accordingly, the link through which the electronic device interacts with the server using the first IP address can be called the first link, and the link through which it interacts with the server using the second IP address can be called the second link.
[0324] S1201, a transmission speed competition is performed between the first link and the second link, and the transmission quality of the first link is found to be higher than that of the second link.
[0325] S1202 uses the first link to transmit data.
[0326] In this embodiment, the electronic device can compete for transmission speed between the first link and the second link, and uses the first link with high transmission quality to transmit data. In this application, the electronic device can compete for transmission speed and truly use the link with high transmission quality to transmit data, which can improve the success rate and speed of data transmission. In addition, it can also avoid the problem of slow data transmission caused by using the link with fast connection speed to transmit data in the prior art.
[0327] The transmission speed-up method in this application embodiment can be referred to the description in the above embodiments.
[0328] In some embodiments, the electronic device in this application also supports DNS racing, chain-building racing, and dynamic racing, as described in the above embodiments.
[0329] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0330] This application provides an electronic device. Referring to FIG13, the electronic device includes a processor 1301 (e.g., CPU) and a memory 1302. The memory 1302 may include high-speed random-access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device. The memory 1302 can store various instructions for performing various processing functions and implementing the method steps of this application.
[0331] Optionally, the electronic device involved in this application may further include: a power supply 1303, a communication bus 1304, and a communication port 1305. The aforementioned communication port 1305 is used to enable communication between the electronic device and other peripherals. In this embodiment, the memory 1302 is used to store computer-executable program code, which includes instructions; when the processor 1301 executes the instructions, the instructions cause the processor 1301 of the electronic device to perform the actions described in the above method embodiment. The implementation principle and technical effects are similar and will not be repeated here.
[0332] Optionally, the electronic device involved in this application may further include: a display screen 1306. The display screen 1306 is used to display the interface of the electronic device.
[0333] The communication method of the embodiments of this application has been described above. The apparatus for executing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced by each other. The related apparatus provided in the embodiments of this application can execute the steps in the above list sorting method. The related apparatus can be referred to the following description:
[0334] This application provides a chip. The chip includes a processor, which calls a computer program in memory to execute the technical solutions in the above embodiments. Its implementation principle and technical effects are similar to those in the related embodiments described above, and will not be repeated here.
[0335] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0336] In one possible implementation, a computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry or store required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0337] This application provides a computer program product, which includes a computer program that, when run, causes a computer to perform the above-described method.
[0338] It should be noted that the modules or components described in the above embodiments can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), etc. Furthermore, when a module is implemented through processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors capable of calling program code, such as a controller. Additionally, these modules can be integrated together to implement a system-on-a-chip (SOC).
[0339] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0340] The term "multiple" in this document refers to two or more. The term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.
[0341] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
[0342] It is understood that, in the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
Claims
1. A communication method characterized by comprising: Applied to an electronic device, the electronic device interacts with a server via a first link and a second link, wherein the first link corresponds to a first IP address and the second link corresponds to a second IP address, and the first IP address and the second IP address are obtained by the electronic device through a Domain Name System (DNS) query based on a first domain name, the method comprising: A transmission speed competition was conducted between the first link and the second link, and it was found that the transmission quality of the first link was higher than that of the second link. Data is transmitted using the first link.
2. The method of claim 1, wherein, The transmission speed-up operation between the first link and the second link includes: During the first round of data transmission, a transmission speed race is conducted between the first link and the second link; or, In each round of data transmission, a transmission speed race is conducted between the first link and the second link; or, During at least two rounds of data transmission, a transmission race is conducted between the first link and the second link.
3. The method of claim 2, wherein, The at least two rounds include a first round and an xth round, where x is an integer greater than 1; the transmission speed competition between the first link and the second link during the at least two rounds of data transmission includes: During the first round of data transmission, a transmission race is conducted between the first link and the second link, and a first score for the first link and a second score for the second link are obtained. During the xth round of data transmission, a transmission speed competition is conducted between the first link and the second link, and a third score for the first link and a fourth score for the second link are obtained. The score of the first link is determined based on the first score and the third score, and the score of the second link is determined based on the second score and the fourth score; Based on the scores of the first link and the second link, the result of the xth round of the transmission race is determined, and the result is used to indicate the winner of the xth round of the transmission race.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: During the data transmission process using the first link, a transmission speed race is conducted between the first link and the second link; When the transmission quality of the first link is less than or equal to the quality threshold, or the transmission quality of the second link is higher than the transmission quality of the first link, the second link is used to transmit data.
5. The method of claim 4, wherein, The use of the second link to transmit data includes: During the transmission of data in the y-th round using the first link, the remaining data of the y-th round is transmitted using the second link, where y is an integer greater than or equal to 1; or, During the transmission of data in round y using the first link, the remaining data of round y is transmitted using the first link, and data for round y+1 is transmitted using the second link; or, If the first link is used to transmit data for the y-th round, and the transmission ratio of the y-th round data is greater than the first ratio, the second link is used to continue transmitting the remaining data for the y-th round; or, If the first link is used to transmit data for the yth round, and the transmission ratio of the data for the yth round is less than or equal to the first ratio, the second link is used to retransmit the data for the yth round.
6. The method according to any one of claims 1-4, characterized in that, The transmission speed-up operation between the first link and the second link includes: The transmission speedup of the first link and the second link is achieved by using the first data packet, at least two data packets, or the last data packet in a round of data.
7. The method of claim 6, wherein, The step of using the first data packet in a round of data to perform transmission speed competition between the first link and the second link includes: The first data packet is sent on the first link, and the first data packet is sent on the second link; The first link that receives the feedback information in response to the first data packet is considered the winner of the transmission race. The feedback information can be 200 OK, ACK, or data.
8. The method of claim 6, wherein, The step of using at least two data packets from a round of data to perform transmission speed-up on the first link and the second link includes: At least two data packets are sent sequentially on the first link, and at least two data packets are sent sequentially on the second link; The first link that receives feedback information in response to at least two data packets is the winner of the transmission race, and the feedback information is 200 OK, ACK, or data.
9. The method of claim 8, wherein, The at least two data packets are used to indicate that the number of data packets is at least two, or that the data volume of the data packets reaches a preset data volume.
10. The method of claim 9, wherein, The data volume of the data packet reaching the preset data volume includes: the total length of the data in the data packet reaching a preset ratio, or the absolute data volume reaching a preset data volume.
11. The method of claim 6, wherein, The step of using the last data packet in a round of data to perform transmission speed-up on the first link and the second link includes: Send the last data packet on the first link and send the last data packet on the second link; The first link to receive feedback information in response to the last data packet is considered the winner of the transmission race. The feedback information can be 200 OK, ACK, or data.
12. The method of any one of claims 1-5, wherein, After performing a transmission speed race between the first link and the second link to obtain a transmission quality where the first link has a higher transmission quality than the second link, the method further includes: Close the second link; or, The second link is retained, which includes: waiting for the second link to age naturally, or keeping the second link active.
13. The method of claim 12, wherein, The method further includes: When competing for transmission speed between the first link and the second link, if the second link is closed, then the second link is re-established based on the second IP address; or, When competing for transmission speed between the first link and the second link, if the second link is kept alive, then the second link is reused.
14. The method of any one of claims 1-13, wherein, The method further includes: The first IP address and the second IP address are obtained by performing a DNS query based on the first domain name; A first link is established based on a first IP address, and a second link is established based on a second IP address.
15. The method of claim 14, wherein, The establishment of the first link based on the first IP address and the establishment of the second link based on the second IP address include: At the same time, the first link is established based on the first IP address, and the second link is established based on the second IP address; or, The first link is established based on the first IP address, and after a preset time period, the second link is established based on the second IP address.
16. The method according to claim 14 or 15, characterized in that The electronic device includes a network subsystem and a client. The steps of establishing a first link based on a first IP address and establishing a second link based on a second IP address include: When the network subsystem obtains the first IP address and the second IP address, it establishes a first link based on the first IP address and establishes a second link based on the second IP address. The network subsystem sends the first IP address and the second IP address to the client.
17. The method of claim 15, wherein, The process of establishing the first link based on the first IP address and establishing the second link based on the second IP address after a preset time period further includes: Sort the first IP address and the second IP address, and determine that the first IP address is sorted before the second IP address; Before establishing the first link based on the first IP address and establishing the second link based on the second IP address at the same time, the method further includes: When the number of IP addresses obtained from a DNS query exceeds a threshold, the retrieved IP addresses are sorted, with the first IP address and the second IP address being the first two in the sorted list.
18. The method of claim 17, wherein, The sorting of the first IP address and the second IP address includes: The first IP address and the second IP address are sorted according to at least one of the following: the electronic device's preference for Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6), the remaining traffic, power consumption, heat of the electronic device, and historical connection establishment information; the historical connection establishment information includes at least one of the following: connection establishment success rate, connection establishment latency, time information, spatial information, version, port, connection establishment protocol corresponding to at least one IP address, and handshake success rate and handshake latency at the transport layer security / packet transport layer security stage.
19. The method according to any one of claims 14-18, characterized by, The electronic device is configured with at least one of the following: Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6), at least one DNS service, and at least one physical channel; the step of obtaining the first IP address and the second IP address by performing a DNS query based on the first domain name includes: Based on the first domain name, a DNS query is performed using at least one of dual-stack, at least one DNS service, and at least one physical channel to obtain multiple IP addresses, including the first IP address and the second IP address.
20. The method of any one of claims 14-19, wherein, The electronic device is connected to any of the following: cloud, peripheral devices, or third-party DNS services; the step of obtaining the first IP address and the second IP address by performing a DNS query based on the first domain name includes: Based on the first domain name, a DNS query is performed through the cloud, the peripheral device, or the third-party DNS service to obtain multiple IP addresses, including the first IP address and the second IP address.
21. An electronic device, comprising: The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1-20.
22. A chip system, characterized by The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-20.
23. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-20.
24. A computer program product, characterised in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1-20.
Citation Information
Patent Citations
Network selection method, device and system
CN104954431A
Terminal application networking method and terminal
CN113473455A
Multi-IP link connection management method, system and device and storage medium
CN116566954A