Communication method and related apparatus
By introducing multiple forwarders and communication modules into the terminal, multiple communication paths are dynamically managed, network resource management problems in multi-path communication are solved, stable and efficient application communication with servers is achieved, and user experience is improved.
Patent Information
- Application Number
- PCT/CN2025/076947
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-27
- Filing Date
- 2025-02-12
- Publication Date
- 2025-09-04
AI Technical Summary
In the prior art, electronic devices such as mobile phones are difficult to efficiently manage network resources during multi-path communication, resulting in network disturbances and stutters when the application communicates with the server, and poor user experience.
By introducing multiple forwarders and communication modules into the terminal, multiple communication connections are established and network paths are dynamically managed, including Wi-Fi and cellular technology paths, soft handover and path optimization are realized, ensuring the stability and efficiency of communication.
It reduces the impact of network connection changes on applications, improves the stability and quality of communication, avoids disconnection and lag caused by network disturbances, and improves the service communication efficiency required by real-time.
Smart Images

Figure CN2025076947_04092025_PF_FP_ABST
Abstract
Description
Communication method and related device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on February 27, 2024, with application number 202410216867.4 and application name “Communication Methods and Related Devices”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to communication methods and related devices. Background Art
[0003] Applications (APPs) on mobile devices and other electronic devices typically communicate with application servers through multiple paths, such as wireless fidelity (Wi-Fi) networks and cellular networks. With multi-path communication becoming an industry hot topic, how to rationally utilize network resources to provide users with a superior application experience has become a research topic in this field. Summary of the Invention
[0004] This application provides a communication method and related devices, which can conveniently use one or more communication paths supported by the terminal to communicate with the application server.
[0005] In a first aspect, a communication method is provided, which is applied to a terminal installed with a first application. The method may include: the terminal initiates a network connection request through the first application; the terminal responds to the network connection request and establishes a first connection with the first application; the terminal establishes one or more communication connections with the application server; the terminal communicates with the first application through the first connection, and communicates with the application server through one or more communication connections, and both communications contain first communication data.
[0006] By implementing the method of the first aspect, an app can conveniently communicate with an application server using one or more communication paths supported by the terminal. Furthermore, the connection between the terminal and the application remains constant, independent of the on / off status of the actual external communication connection. This allows the application to remain unaware of changes in the actual communication connection, thus reducing or avoiding disconnections caused by network disturbances and preventing users from experiencing application lag.
[0007] In conjunction with the first aspect, in some implementations, the network connection request is initiated by the first application when initiating a target service, where the target service includes a service with real-time requirements. This ensures efficient communication between the target service and the application server.
[0008] In combination with the first aspect, in some embodiments, one of the one or more communication connections is a connection based on Wi-Fi technology, or a connection based on cellular technology.
[0009] In combination with the first aspect, in some embodiments, the terminal establishes multiple communication connections with the application server, the multiple communication connections include a second connection and a third connection, and after the terminal communicates with the first application through the first connection and communicates with the application server through one or more communication connections, the method also includes: the terminal disconnects the second connection with the application server and maintains the first connection; the terminal communicates with the first application through the first connection and communicates with the application server through the third connection, and both communications contain second communication data.
[0010] Through the above implementation, the terminal can partially or completely disconnect one or more communication connections with the application server according to actual conditions.
[0011] In conjunction with the previous embodiment, before the terminal disconnects the second connection with the application server, the method further includes: the terminal detecting that the network status of the third connection is better than the network status of the second connection. In this way, the terminal can disconnect the communication connection with the poor network status and retain the communication connection with the better network status, thereby ensuring the communication quality with the application server.
[0012] In combination with the previous embodiment, the first connection, the second connection and the third connection are all based on TCP, and the terminal detects that the network status of the third connection is better than the network status of the second connection, specifically including one or more of the following: the terminal detects that the establishment speed of the third connection is faster than the establishment speed of the second connection; or, the speed at which the terminal receives data sent by the application server through the third connection is faster than the speed at which the terminal receives data sent by the application server through the second connection.
[0013] In combination with the previous embodiment, the first connection, the second connection and the third connection are all based on UDP, and the terminal detects that the network status of the third connection is better than the network status of the second connection, specifically including: the terminal cannot receive data sent by the application server through the second connection, and the terminal receives data sent by the application server through the third connection.
[0014] In combination with the first aspect, in some embodiments, the terminal establishes one or more communication connections with the application server, the one or more communication connections include a second connection, and after the terminal communicates with the first application through the first connection and communicates with the application server through one or more communication connections, the method also includes: the terminal establishes a third connection with the application server; the terminal communicates with the first application through the first connection and communicates with the application server through the second connection and the third connection, and both communications contain third communication data.
[0015] Through the above implementation, the terminal can add a communication connection with the application server to improve the communication quality with the application server.
[0016] In conjunction with the previous embodiment, after the terminal establishes the third connection with the application server, the method further includes: the terminal disconnecting the second connection with the application server while maintaining the first connection; the terminal communicating with the first application via the first connection and communicating with the application server via the third connection, both communications including fourth communication data. In this way, the terminal can switch the communication connection with the application server, and the soft switching method of first establishing the third connection and then disconnecting the second connection can avoid the risk of application service lag or interruption.
[0017] According to a second aspect, a terminal is provided, characterized in that the terminal includes a multiplexer and a communication module, the terminal is installed with a first application, the first application is used to initiate a network connection request; the multiplexer is used to respond to the network connection request and establish a first connection with the first application; the multiplexer is also used to establish one or more communication connections with the application server through the communication module; the multiplexer is used to communicate with the first application through the first connection, and the multiplexer is used to communicate with the application server through one or more communication connections, and both communications contain first communication data.
[0018] Secondly, the terminal supports apps that conveniently communicate with application servers using one or more communication paths supported by the terminal. Furthermore, the connection between the terminal and the app remains constant, independent of the actual connection to the external communication. This allows the app to remain unaware of changes in the actual connection, minimizing or avoiding disconnections caused by network disturbances and preventing users from experiencing app lag.
[0019] In conjunction with the second aspect, in some implementations, the network connection request is initiated by the first application when initiating a target service, which includes a service with real-time requirements. This ensures efficient communication between the target service and the application server.
[0020] In conjunction with the second aspect, in some embodiments, one of the one or more communication connections is a connection based on Wi-Fi technology, or a connection based on cellular technology.
[0021] In combination with the second aspect, in some embodiments, the multiplexer establishes multiple communication connections with the application server through the communication module, and the multiple communication connections include a second connection and a third connection. The multiplexer is also used to disconnect the second connection with the application server through the communication module and maintain the first connection; communicate with the first application through the first connection, and communicate with the application server through the third connection and the communication module, and both communications contain the second communication data.
[0022] Through the above implementation, the terminal can partially or completely disconnect one or more communication connections with the application server according to actual conditions.
[0023] In conjunction with the previous embodiment, the multiplexer is further configured to detect that the network status of the third connection is superior to that of the second connection before disconnecting the second connection with the application server via the communication module. This allows the terminal to disconnect the communication connection with the poorer network status and retain the communication connection with the better network status, thereby ensuring communication quality with the application server.
[0024] In combination with the previous embodiment, the first connection, the second connection and the third connection are all based on TCP, and the multiplexer detects that the network status of the third connection is better than the network status of the second connection, specifically including one or more of the following: the multiplexer detects that the establishment speed of the third connection is faster than the establishment speed of the second connection; or, the speed at which the multiplexer receives data sent by the application server through the third connection is faster than the speed at which the multiplexer receives data sent by the application server through the second connection.
[0025] In combination with the previous embodiment, the first connection, the second connection and the third connection are all based on UDP, and the multiplexer detects that the network status of the third connection is better than the network status of the second connection, specifically including: the multiplexer cannot receive data sent by the application server through the second connection, and the multiplexer receives data sent by the application server through the third connection.
[0026] In combination with the second aspect, in some embodiments, the multiplexer establishes one or more communication connections with the application server through the communication module, and the one or more communication connections include a second connection. The multiplexer is also used to establish a third connection with the application server, communicates with the first application through the first connection, and communicates with the application server through the second connection, the third connection, and the communication module, and both communications contain third communication data.
[0027] Through the above implementation, the terminal can add a communication connection with the application server to improve the communication quality with the application server.
[0028] In conjunction with the previous embodiment, the multiplexer is further configured to disconnect the second connection with the application server while maintaining the first connection. The terminal then communicates with the first application via the first connection and with the application server via the third connection, both of which contain the fourth communication data. This allows the terminal to switch communication connections with the application server, and the soft handover method of first establishing the third connection and then disconnecting the second connection can avoid the risk of application service lag or interruption.
[0029] In combination with the second aspect, in some embodiments, the multi-way forwarder includes a built-in server and a built-in client, the built-in server is used to respond to the network connection request and establish a first connection with the first application; the built-in client is used to establish one or more communication connections with the application server through the communication module; the built-in server is used to communicate with the first application through the first connection, and the built-in client is used to communicate with the application server through one or more communication connections, and both communications contain first communication data.
[0030] In combination with the previous embodiment, the built-in server communicates with the first application through the first connection, and the built-in client communicates with the application server through one or more communication connections. The built-in server and the built-in client transparently transmit communication data.
[0031] In a third aspect, a terminal is provided, comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions. When the one or more processors execute the computer instructions, the terminal executes the method provided in the first aspect, or any embodiment of the first aspect.
[0032] In a fourth aspect, a communication system is provided, comprising a terminal and an application server, wherein the terminal is used to execute the method provided in the first aspect, or any one of the embodiments of the first aspect, or the terminal is the terminal of the second aspect, or any one of the embodiments of the second aspect, or the third aspect.
[0033] In a fifth aspect, a chip system is provided, which is applied to an electronic device. The chip system includes one or more processors, which are used to call computer instructions to enable the electronic device to execute the method provided in the first aspect or any embodiment of the first aspect.
[0034] In a sixth aspect, a computer-readable storage medium is provided, comprising instructions. When the instructions are executed on an electronic device, the electronic device executes the method provided in the first aspect or any one of the embodiments of the first aspect.
[0035] In a seventh aspect, a computer program product comprising instructions is provided. When the computer program product is run on an electronic device, the electronic device executes the method provided in the first aspect or any one of the embodiments of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figures 1A-1C show three multipath communication modes;
[0037] FIG2 is an architecture diagram of a terminal 100 provided in an embodiment of the present application;
[0038] FIG3 is a flow chart of a communication method provided in an embodiment of the present application;
[0039] FIG4 is a flowchart of a terminal disconnecting a communication connection between two TCP-based communication connections provided by an embodiment of the present application;
[0040] FIG5 is a flowchart of a terminal disconnecting a communication connection between two UDP-based communication connections provided by an embodiment of the present application;
[0041] FIG6 is a block diagram of the hardware structure of the terminal 100 provided in an embodiment of the present application;
[0042] FIG7 is a block diagram of the software structure of the terminal 100 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and in detail below with reference to the accompanying drawings.
[0044] Multipath communication
[0045] The multi-path communication referred to in this application refers to the communication between the APP installed in the terminal and the application server through multiple paths. The APP and the application server are in a corresponding relationship. The application server corresponding to the APP is used to provide various services for the APP, such as registration, login, and various services after login. Different APPs can correspond to different application servers.
[0046] Apps communicate with application servers using different communication technologies, which can be seen as the two communicating through different paths. Under the same communication technology, apps communicate with application servers using different software and hardware resources in the terminal, which can also be seen as the two communicating through different paths.
[0047] Based on the communication technology, there are two types of communication paths between the app and the application server:
[0048] 1. Communication path based on Wi-Fi technology
[0049] APP can connect to the wireless local area network (WLAN) created by the access point (AP) or router through Wi-Fi technology, and then access the Internet and communicate with the application server on the Internet. The premise of this communication method is that the terminal has Wi-Fi communication capability, that is, the terminal has a Wi-Fi communication module, an antenna corresponding to the Wi-Fi communication module and other devices. The Wi-Fi communication module can also be called a Wi-Fi chip, which is responsible for communicating with the Internet using the Wi-Fi communication protocol. The Wi-Fi communication module can operate in the 2.4GHz frequency band or the 5GHz frequency band.
[0050] If a terminal has two or more Wi-Fi communication devices, for example, two Wi-Fi communication modules, it can use these devices to connect to different WLANs, access the Internet, and communicate with the application server through these different WLANs. Communication with the application server through multiple Wi-Fi communication devices can also be considered as communication between the app and the application server using multiple paths.
[0051] In some implementations, even if the terminal is configured with only one Wi-Fi communication module, the terminal can connect to two different WLANs and communicate with the application server via two paths. For example, the terminal can operate in both the 2.4 GHz and 5 GHz frequency bands.
[0052] 2. Communication path based on cellular technology
[0053] Apps can connect to access network devices such as base stations through cellular technology, then access the Internet and communicate with application servers on the Internet. This communication method requires that the terminal has cellular communication capabilities, that is, the terminal has a subscriber identity module (SIM) card, a cellular mobile communication module, a modem, a baseband processor, an antenna corresponding to the cellular mobile communication module, and other components. The SIM card stores user information such as the mobile phone number. The terminal can communicate with the access network, core network, etc. through the mobile phone number and use the services provided by the operator to which the mobile phone number belongs, such as voice call services, video call services, and data communications. The cellular mobile communication module provides 3G, 4G, and 5G wireless communication solutions, supporting terminal communication with the internet via wireless communication technologies such as the Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Universal Mobile Telecommunications System (UMTS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), and New Radio Access Technology (New RAT). The functions of the modem and baseband processor can be found in the terminal architecture description below.
[0054] If a terminal has two or more SIM cards, for example, two SIM cards from different carriers, the terminal can use the phone numbers provided by each of these SIM cards to access the Internet and communicate with the application server. Communication with the application server through multiple SIM cards can also be viewed as communication between the app and the application server using multiple paths.
[0055] To give a specific example, if the terminal is configured with two sets of Wi-Fi communication devices and two SIM cards, there can be the following four communication paths between the APP in the terminal and the application server: a communication path based on Wi-Fi technology and operating in the 2.4GHz frequency band, a communication path based on Wi-Fi technology and operating in the 5GHz frequency band, a communication path based on 4G cellular communication technology, and a communication path based on 5G cellular communication technology.
[0056] During multi-path communication, the selection and switching of communication paths, and the coordination / aggregation of multiple paths are operations that are often involved in the use of apps. These operations are closely related to the user experience.
[0057] 3 multipath communication methods
[0058] 1A-1C show three multi-path communication modes.
[0059] FIG1A shows how APP controls multi-path communication. As shown in FIG1A , configuration The terminal can provide a network request (network request) application programming interface (API), which supports the APP in the terminal to call the API to use the communication path based on Wi-Fi technology and the communication path based on cellular technology at the same time. Apps such as DingTalk and WeChat can accurately control the timing of calling the API according to their own business. However, this solution consumes a lot of power, and although the APP understands its own business, it cannot accurately control the switching timing of the terminal's underlying communication link, and cannot accurately control the use of the two communication paths. In addition, some terminal manufacturers will turn off the API for power consumption considerations, resulting in the APP being unable to call the API, and thus the solution is invalid.
[0060] FIG1B shows how the operating system (OS) controls multipath communication. As shown in FIG1B , The device can detect the terminal's network status and automatically switch to a supported communication path when the network status is poor. During this process, users may experience a network disconnect, and streaming services such as mobile games, audio and video calls provided by apps may also experience lag or disconnection.
[0061] Figure 1C illustrates the method of end-cloud collaborative control of multi-path communication. As shown in Figure 1C, the terminal manufacturer provides a server, and the APP in the terminal connects to the server through multiple communication paths. The server is responsible for aggregating the multi-path data of the APP and communicating with the application server. In this way, each terminal communicates with the application server through the server, and neither the APP nor the application server is aware of the multiple communication paths. This solution requires the terminal manufacturer to deploy a server, which is costly and can only be used for some services of some APPs due to cost constraints.
[0062] The communication method provided by this application
[0063] The following embodiments of the present application provide a communication method, in which an APP can conveniently use one or more communication paths supported by a terminal to communicate with an application server, and the terminal can also manage the communication path according to the actual network situation without the APP being aware of it, such as adding a communication path, disconnecting a communication path, or switching a communication path.
[0064] The method of the present application is applied to a terminal that supports one or more communication paths. The communication paths supported by the terminal may include one or more communication paths described above, such as a communication path based on Wi-Fi technology, a communication path based on cellular technology, etc. The terminal can be various device types, such as a tablet computer, a desktop computer, a desktop computer with a touch-sensitive surface or touch panel, a laptop computer (laptop), a handheld computer, a notebook computer, a smart screen, a wearable device (such as a smart watch, a smart bracelet, a smart headset, etc.), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a car computer, etc.
[0065] Before introducing the method provided by this application, the structure of the terminal provided by this application is first introduced.
[0066] FIG2 exemplarily shows an architecture diagram of the terminal 100 provided in this application.
[0067] The terminal architecture shown in FIG. 2 is a combination of software and hardware, which shows a partial software structure and a partial hardware structure of the terminal 100 .
[0068] As shown in FIG. 2 , the terminal 100 includes: an APP, a transmission control protocol (TCP) / internet protocol (IP) protocol stack, a multiplexer 10 , and a communication module 11 .
[0069] The APP is located in the application layer of the software architecture, and the application layer may include multiple APPs. These APPs may include third-party applications or applications provided by the same manufacturer as the terminal 100.
[0070] The TCP / IP protocol stack provides a four-layer model and the protocols for each layer. The four-layer model includes the application layer, transport layer, network interconnection layer, and host-to-network layer. Transport layer protocols include TCP and the User Datagram Protocol (UDP). TCP provides connection-oriented, reliable, point-to-point communication, while UDP provides connectionless, unreliable, point-to-multipoint communication. The connection mentioned above for TCP and UDP refers to the connection at Layer 4, the transport layer, in the Open Systems Interconnection (OSI) reference model.
[0071] The multiplexer 10 is responsible for establishing connections internally and externally, and for transferring communication data between the APP and the application server 200. Specifically, the multiplexer 10 can be used to establish a virtual logical connection with the APP of the application layer. The multiplexer 10 is also used to establish one or more communication connections with the external application server 200 through the communication module 11. A communication connection may correspond to a communication path between the terminal 100 and the external application server 200, and the terminal 100 can communicate with the application server 200 through the communication connection. The communication connection may specifically include a socket connection, which may be established based on TCP or UDP. The logical connection between the multiplexer 10 and the APP, and the one or more communication connections between the multiplexer 10 and the application server 200, can be used to transmit the communication data between the APP and the application server 200. In this process, the multiplexer 10 can be used to transparently transmit these communication data.
[0072] The multiplexer 10 may include: a forwarding unit 1, a service identification unit 2, and a link detection unit 3. The forwarding unit 1 may include a built-in server 1-1 and a built-in client 1-2. The built-in server 1-1 is used to intercept the network connection request issued by the APP of the application layer, and respond to the network connection request and establish a virtual logical connection with the APP, so that the APP will think that the network connection with the application server 200 has been successfully established. The service identification unit 2 is used to identify the service targeted by the network connection request issued by the APP, and determine whether the service is the target service. If so, the link detection unit 3 is notified. After receiving the notification, the link detection unit 3 drives the built-in client 1-2 to use the TCP / IP protocol stack to establish one or more communication connections with the application server 200 through the communication module 11. The connection can refer to the connection facing the seventh layer, namely the application layer, in the OSI. If the service is not the target service, the terminal 100 can communicate with the application server 200 according to the original communication method. The original communication method can refer to the three methods of Figures 1A to 1C, and of course it can also be other communication methods. The target business may include a business with real-time requirements, and its specific meaning can be referred to the detailed description of the subsequent method embodiments.
[0073] In some embodiments, the multiplexer 10 may not include the service identification unit 2. After the built-in server 1-1 establishes a virtual logical connection with the APP in the application layer, the link detection unit 3 can drive the built-in client 1-2 to establish multiple communication connections with the application server 200 without determining the service type. In this way, all service types of the APP can interact with the application server 200 using the method provided in this application.
[0074] The multiplexer 10 is also used to manage the communication connections between the terminal 100 and the external application server 200, such as disconnecting some of the communication connections, establishing new communication connections, switching communication connections, etc. During this process, the logical connection between the multiplexer 10 and the APP is maintained and uninterrupted. Specifically, the link detection unit 3 can also be used to detect the status of each communication connection between the built-in client 1-2 and the external application server 200 and manage each communication connection based on its status, such as driving the built-in client 1-2 to disconnect some existing communication connections, establish new communication connections, or switch communication connections.
[0075] The modules within multiplexer 10 can be combined or separated, and this application does not impose any restrictions on this. Multiplexer 10 can be a software module, located in the application layer, program framework layer, or kernel layer within the terminal 100 software framework; it can also be a hardware module, such as an integrated circuit within a modem or chip. The names of multiplexer 10 and its modules are merely examples. Their functions and definitions are explained in this application, and they may be referred to by other names.
[0076] The communication module 11 is used to establish one or more communication connections with the application server 200 to provide one or more communication paths between the terminal 100 and the application server 200. Each of the communication paths can be a communication path introduced above, such as a communication path based on Wi-Fi technology, a communication path based on cellular technology, etc. The communication module 11 includes relevant hardware for supporting multiple communication paths, for example, it may include one or more of the following: one or more Wi-Fi communication modules, one or more SIM cards. The communication module 11 may also include devices such as antennas used in conjunction with the Wi-Fi communication module, and devices such as cellular mobile communication modules, modems, baseband processors, antennas, etc. used in conjunction with the SIM card. For example, the communication module 11 shown in Figure 2 includes a Wi-Fi communication module, SIM card 1 and SIM card 2.
[0077] The communication module 11 is specifically configured to respond to requests from the built-in clients 1 - 2 in the multiplexer 10 and to establish one or more communication connections with the application server 200 .
[0078] FIG2 illustrates a simplified architecture of the terminal 100 and does not limit the present application. In a specific implementation, the terminal 100 may include more or fewer modules, or some modules may be combined or separated. For example, the service identification unit 2 and the link detection unit 3 in the multiplexer 10 may be combined into a single unit.
[0079] FIG3 is a flow chart of a communication method provided in an embodiment of the present application.
[0080] The method can be applied to the terminal 100 shown in Figure 2. As shown in Figure 3, the method may include the following steps:
[0081] S101, the terminal 100 initiates a network connection request through a first application.
[0082] The first application is an APP installed in the terminal 100 , which may be a third-party application or an application provided by the same manufacturer as the terminal 100 .
[0083] When terminal 100 is running a first application, the services initiated by the first application may need to communicate with the corresponding application server 200, such as some mobile game services, audio and video call services, etc. In this case, the first application may generate a network connection request. Typically, the first application may send the network connection request down through the software layer architecture of terminal 100 layer by layer, such as the application layer, program framework layer, and kernel layer, and finally send the network connection request to application server 200 through the communication module of terminal 100.
[0084] When a first application initiates a network connection request, it can specify the transport layer protocol used to establish the network connection. This transport layer protocol can be TCP or UDP. The specific transport layer protocol can be determined by the service currently initiated by the first application. For example, services that require reliability can use TCP, while services that do not require reliability can use UDP.
[0085] S102 : The terminal 100 responds to the network connection request of the first application through the multiplexer 10 , and establishes a first connection with the first application through the multiplexer 10 .
[0086] During the process of the first application sending the network connection request, the network connection request will be intercepted by the multiplexer 10. After receiving the network connection request, the multiplexer 10 will no longer send the network connection request, but will respond to the network connection request and establish a first connection with the first application through the built-in server 1-1. The first connection is a virtual logical connection, and the first connection is oriented to the fourth layer in OSI, namely the transport layer. Unlike a real communication connection, the first connection does not require binding to a socket port. After the first connection is established between the built-in server 1-1 and the first application, the first application may believe that its own network connection request has been responded to, and that the corresponding network connection with the application server 200 has been established.
[0087] S103, the terminal 100 sends the data of the first application to the application server 200 to the built-in server 1-1 through the first connection.
[0088] After the first application confirms that the network connection with application server 200 has been established, it can send an uplink data packet for the currently initiated service to application server 200. This data packet can carry data to be sent to application server 200. After establishing the first connection with built-in server 1-1, the first application confirms that the network connection with application server 200 has been established. However, in reality, the network connection between the first application and server 200 may not yet be established. The uplink data packet sent by the first application is sent to built-in server 1-1 via the first connection established in S102.
[0089] S104 , the terminal 100 determines whether the service initiated by the first application is the target service according to the data sent by the first application through the service identification unit 2 in the multiplexer 10 .
[0090] After the built-in server 1-1 in the multiplexer 10 receives the data sent by the first application, the service identification unit 2 can determine whether the service currently initiated by the first application is the target service. Among them, the target service may include services with real-time requirements, such as services with strong real-time requirements such as web pages, audio and video services, mobile games, etc. Based on the traffic characteristics of the target service, the service identification unit 2 can determine whether the service initiated by it is the target service based on the data packet sent by the first application. Specifically, the service identification unit 2 can make a judgment based on one or more of the following: fields in the data packet, target IP address, packet shape (such as size, frequency), etc.
[0091] If the result of S104 is yes, S105 and subsequent steps are executed. If not, the terminal 100 can communicate with the application server 200 using the original communication method. The original communication method can refer to the three methods shown in Figures 1A to 1C, or other communication methods are also possible. This ensures that the target service can achieve efficient communication with the application server 200 through the multiplexer 10, and other services will not preempt the multiplexer 10 and will not affect the terminal 100's efficient processing of the target service.
[0092] In some embodiments of the present application, steps S103 and S104 are optional and may not be performed. After the terminal 100 establishes the first connection with the first application, S105 and subsequent steps may be performed directly without determining whether the service initiated by the first application is the target service. In this way, all services initiated by the first application can use the multiplexer 10 to transfer data.
[0093] In some embodiments of the present application, S103 and S104 can be replaced by the terminal 100 determining whether the first application is the target application through the service identification unit 2, and if so, executing S105 and subsequent steps; if not, the terminal 100 can communicate with the application server 200 according to the original communication method, and the original communication method can refer to the three methods of Figures 1A-1C, of course, it can also be other communication methods. The target application may include an application with real-time requirements. In this way, the connection establishment methods of different terminals 100 and application servers 200 can be distinguished from the application level. This can ensure that the target application can achieve efficient communication with the application server 200 through the multiplexer 10, and other applications will not preempt the multiplexer 10, nor will it affect the terminal 100's efficient processing of the target application.
[0094] S105 , the terminal 100 drives the built-in client 1 - 2 through the link detection unit 3 in the multiplexer 10 , and establishes one or more communication connections with the application server 200 through the built-in client 1 - 2 and the communication module 11 .
[0095] Each of the one or more communication connections established by the terminal 100 through the built-in client 1-2 and the communication module 11 may include a connection facing the fourth layer, i.e., the transport layer, in OSI, and may also include a connection facing the seventh layer, i.e., the application layer, in OSI. The communication connection requires binding a socket port. Specifically, one or more communication connections are established between the built-in client 1-2 and the communication module 11, and one or more communication connections are established between the communication module 11 and the application server 200. Each communication connection established between the communication module 11 and the application server 200 may be one of the following: a connection based on Wi-Fi technology, or a connection based on cellular technology.
[0096] The number of communication connections established between the terminal 100 and the application server 200 may be preset in the terminal 100 or determined by the terminal 100 based on the actual network status, which is not limited in this application. For example, the terminal 100 may select a communication technology and a communication module that can achieve the preset network status from the supported communication paths to establish a communication connection.
[0097] For example, if the communication module 11 includes a Wi-Fi communication module and two SIM cards, the following three communication connections can be established between the communication module 11 and the application server 200: one connection based on Wi-Fi technology and two connections based on cellular technology.
[0098] When establishing a communication connection between the terminal 100 and the application server 200, the transport layer protocol used may also be specified. The transport layer protocol used for the communication connection is consistent with the transport layer protocol specified when the first application initiates the network connection request in S101 above, for example, TCP or UDP.
[0099] S106 , the terminal 100 communicates with the first application via the first connection, and communicates with the application server 200 via one or more communication connections with the application server 200 , and the two communications include the same communication data such as the first communication data.
[0100] The communication process between terminal 100 and application server 200 may include one or more of the following: an uplink communication process in which the first application sends data to application server 200, and a downlink communication process in which application server 200 sends data to the first application. Both of these communication processes use multiplexer 10 in terminal 100 as a transfer station. For example, during the uplink communication process, the first application sends data to built-in server 1-1 in multiplexer 10 via a first connection. Built-in server 1-1 transmits the data to built-in client 1-2. Built-in client 1-2 sends data to application server 200 via one or more communication connections with application server 200. During the downlink communication process, application server 200 sends data to built-in client 1-2 via one or more communication connections with built-in client 1-2. Built-in client 1-2 transmits data to built-in server 1-1. Built-in server 1-1 sends data to the first application via the first connection. Multiplexer 10 acts as a data transfer station, transparently transmitting data without performing any processing on the data. The multiplexer 10 can also be regarded as a physical medium in the terminal 100 for transmitting communication data between the first application and the application server 200 .
[0101] The communication process between the terminal 100 and the application server 200 may include sending the data sent by the first application in S103 to the application server 200, and may also include the application server 200 feeding back data to the first application based on the data, and may also include more subsequent communication processes between the first application and the application server 200.
[0102] When terminal 100 communicates with application server 200 via multiple communication connections, communication data between the first application and application server 200 can be distributed across the multiple communication connections. Each communication connection can transmit different communication data, and multiple communication connections can speed up communication. Alternatively, each communication connection can be used to transmit complete communication data between the first application and application server 200, thereby increasing communication reliability.
[0103] Optionally, after S106, the method shown in FIG3 may further include S107.
[0104] S107 , the terminal 100 adjusts the communication connection with the application server 200 through the built-in client 1 - 2 and the communication module 11 and maintains the first connection.
[0105] The terminal 100 may adjust the communication connection with the application server 200 by one or more of the following operations: adding a new communication connection, disconnecting a communication connection, or switching a communication connection.
[0106] New communication connection
[0107] In some cases, the terminal 100 may establish a new communication connection with the application server 200 via the built-in client 1-2 and the communication module 11, based on the one or more communication connections established in S105. For example, if the terminal 100 detects that the network status of one or more communication connections established in S105 is poor, or detects an increase in the data volume of the service initiated by the first application in S101, a new communication connection may be established with the application server 200. By adding the new communication connection, the communication quality and efficiency between the first application and the application server 200 can be guaranteed.
[0108] This application does not impose any restrictions on the number of new communication connections added by the terminal 100 and the communication technology used. The terminal 100 can decide specifically based on actual business needs and network conditions.
[0109] For example, the communication connection established between the terminal 100 and the application server 200 in S105 may include a second connection, and the connection newly added between the terminal 100 and the application server 200 in S107 may be referred to as a third connection.
[0110] Disconnect communication
[0111] In some cases, the terminal 100 may disconnect part or all of one or more communication connections established in S105. For example, when the terminal 100 detects that the network status of some communication connections does not meet the preset conditions, these communication connections can be disconnected. For another example, when the terminal 100 detects that the network status of some communication connections is better than that of another part of the communication connections, the other part of the communication connections with poor network status can be disconnected, which can save the power consumption of the terminal 100. The network status can be determined by one or more of the factors such as the speed of establishing the communication connection, whether the terminal 100 can receive data through the communication connection, the signal strength, and the speed at which the terminal 100 receives data on the communication connection. For another example, when the service initiated by the first application in S101 ends, the terminal 100 can disconnect all communication connections established in S105, and can further disconnect the first connection established in S102.
[0112] For example, the communication connection established between the terminal 100 and the application server 200 in S105 may include the second connection and the third connection, and the terminal 100 may disconnect the second connection in S107. In some embodiments, the network status of the third connection is better than the network status of the second connection.
[0113] Based on the foregoing description, if the transport layer protocol specified by the first application when initiating the network connection request in S101 is TCP, then both the second connection and the third connection include TCP connections based on TCP. TCP is connection-oriented, and thus the network status of the third connection being superior to the network status of the second connection may specifically include one or more of the following: the speed at which the third connection is established is faster than the speed at which the second connection is established, or the speed at which terminal 100 receives data sent by application server 200 via the third connection is faster than the speed at which terminal 200 receives data sent by application server 200 via the second connection.
[0114] If the transport layer protocol specified when the first application initiates a network connection request in S101 is UDP, the second connection and the third connection are both based on UDP. UDP provides connectionless communication, so the network status of the third connection is better than the network status of the second connection. Specifically, it may include one or more of the following: data sent by the application server 200 is received through the third connection, and data sent by the application server 200 cannot be received through the second connection.
[0115] FIG4 illustrates an exemplary process of the terminal 100 disconnecting a communication connection with a poor network status between two TCP-based communication connections. The two communication connections in FIG4 are exemplified by a connection based on Wi-Fi technology and a connection based on cellular technology. As shown in the figure, the process includes the following steps:
[0116] 1. The first application initiates a TCP connection request, the built-in server 1-1 responds to the TCP connection request, and the built-in client 1-2 sends the TCP connection request to the application server 200 via the Wi-Fi network and the cellular network. During this process, the first application sends a synchronization frame (SYNC) of the TCP handshake signal. This SYNC frame passes through the built-in server 1-1 and the built-in client 1-2, and is then sent by the built-in client 1-2 to the application server 200 via the Wi-Fi network and the cellular network.
[0117] 2. The application server 200 responds to the TCP connection request and returns TCP connection feedback to the built-in client 1-2 via the Wi-Fi network and the cellular network respectively. The built-in server 1-1 sends the TCP connection feedback to the first application. During this process, the application server 200 responds to the received synchronization frame and sends a synchronization confirmation frame (SYNC-ACK) of the TCP handshake to the built-in client 1-2 via the Wi-Fi network and the cellular network respectively. The SYNC-ACK passes through the built-in client 1-2 and the built-in server 1-1 in turn, and is then sent by the built-in server 1-1 to the first application. At this point, two communication connections are established between the built-in client 1-2 and the application server 200.
[0118] Step 1 may correspond to S101 in FIG. 3 , and step 2 may correspond to S105 in FIG. 3 .
[0119] In step 2, after the built-in client 1-2 receives the SYNC-ACKs fed back from the application server 200 via the Wi-Fi network and the cellular network, the communication connection corresponding to the path where the SYNC-ACK was received earlier can be recorded as the faster connection. For example, in Figure 4, the built-in client 1-2 receives the SYNC-ACK fed back via the Wi-Fi network first.
[0120] 3. The first application sends a data request (DATA-HTTP-REQ) based on the hypertext transfer protocol (HTTP) or an encrypted secure socket layer (SSL) handshake request. The above message is sent to the application server 200 through the built-in server 1-1, the built-in client 1-2, and the Wi-Fi network and the cellular network respectively.
[0121] 4. The application server 200 responds to the DATA-HTTP-REQ or SSL handshake request and feeds back a DATA-HTTP-REQ confirmation message (DATA-HTTP-REQ-ACK) and an HTTP-based data reply (DATA-HTTP-RES) or an SSL handshake reply to the built-in client 1-2 via the Wi-Fi network and the cellular network. The above messages are sent to the first application via the built-in client 1-2 and the built-in server 1-1.
[0122] Steps 3 and 4 may correspond to S106 in FIG. 3 .
[0123] In step 4, after the built-in client 1-2 receives the DATA-HTTP-RES or SSL handshake response from the application server 200 via the Wi-Fi network and the cellular network, the communication connection corresponding to the path where the message was received earlier can be recorded as the faster response. For example, in Figure 4, the built-in client 1-2 receives the message fed back via the Wi-Fi network first.
[0124] 5. Based on the connection establishment speed of the two connections in step 2 and the packet return speed in step 4, the built-in client 1-2 determines that the network status of the connection with a faster connection establishment speed and a faster packet return speed is better. Based on this, the built-in client 1-2 disconnects the communication connection with a poor network status. For example, in Figure 4, the built-in client 1-2 disconnects a communication connection based on the cellular network. Specifically, the built-in client 1-2 can send a reset (RET) command or a finish (FIN) command to the application server 200 through the cellular network to disconnect the communication connection based on cellular technology between the built-in client 1-2 and the application server 200.
[0125] FIG5 illustrates an exemplary process in which the terminal 100 disconnects a communication connection with a poor network status between two UDP-based communication connections. The two communication connections in FIG5 are exemplified by a connection based on Wi-Fi technology and a connection based on cellular technology. As shown in the figure, the process includes the following steps:
[0126] 1. The first application sends DATA-1. Built-in server 1-1 sends DATA-1 to built-in client 1-2. Built-in client 1-2 then sends DATA-1 to application server 200 via Wi-Fi and cellular networks. Application server 200 first receives the complete DATA-1 via Wi-Fi and therefore responds to terminal 100 only via Wi-Fi. Terminal 100 receives the response from application server 200 via Wi-Fi.
[0127] 2. The first application sends DATA-2. Built-in server 1-1 sends DATA-2 to built-in client 1-2. Built-in client 1-2 then sends DATA-2 to application server 200 via the Wi-Fi network and the cellular network, respectively. If the Wi-Fi network status deteriorates, the data sent to application server 200 via the Wi-Fi network in step 2 may be lost. Application server 200 will reply to terminal 100 with part of the message via the Wi-Fi network and another part via the cellular network. Terminal 100 can receive the reply messages from application server 200 via both the Wi-Fi network and the cellular network. The dotted lines in the figure indicate that only part of the data is transmitted along the corresponding path.
[0128] 3. The first application sends DATA-3. Built-in server 1-1 sends DATA-3 to built-in client 1-2. Built-in client 1-2 then sends DATA-3 to application server 200 via the Wi-Fi network and the cellular network. If the Wi-Fi network continues to deteriorate, the data sent to application server 200 via the Wi-Fi network in step 3 may be completely lost. Application server 200 can only receive uplink data packets from terminal 100 via the cellular network and, therefore, reply messages to terminal 100 only via the cellular network. Terminal 100 can only receive reply messages from application server 200 via the cellular network.
[0129] Through steps 1-3, the data received by the built-in client 1-2 through the Wi-Fi network gradually decreases until there is no data at all. In step 3, the built-in client 1-2 can mark a communication connection corresponding to the Wi-Fi network as unavailable.
[0130] 4. The first application sends DATA-4. Built-in server 1-1 sends DATA-4 to built-in client 1-2. Built-in client 1-2 stops sending data over the Wi-Fi network and sends DATA-4 to application server 200 only via the cellular network. At this point, built-in client 1-2 disconnects from the Wi-Fi-based communication connection with application server 200.
[0131] For simplicity, Figures 4-5 omit some execution entities, such as the Wi-Fi communication module and cellular mobile communication module in the communication module 11 of terminal 100. The Wi-Fi network in Figures 4-5 may include devices such as routers and access points, while the cellular network may include devices such as base stations. There is only one application server 200 in Figures 4-5. For simplicity, two application servers are shown in the figure as examples; these two application servers are the same application server 200.
[0132] The two communication connections exemplified in Figures 4 and 5 are not limited to each other. When two other communication connections are established between the terminal 100 and the application server 200, the method shown in Figure 4 or 5 can also be used to detect a communication connection with a better network status. For example, the terminal 100 can also detect a connection with a better network status from two communication connections based on Wi-Fi technology and disconnect the connection with a worse network status. For another example, the terminal 100 can also detect a connection with a better network status from two communication connections based on cellular technology and disconnect the connection with a worse network status.
[0133] Switching communication connections
[0134] In some cases, the terminal 100 may switch part or all of the one or more communication connections established in S105 to other communication connections. For example, when the terminal 100 detects that the network status of some communication connections is not good, it may switch to other communication connections.
[0135] Specifically, terminal 100 can first add one or more communication connections, and then gradually disconnect some or all of the original communication connections using a method similar to that described above and shown in Figures 4 or 5. This allows for a gradual transition to the new communication connection, thus achieving a communication connection switch. This switching method ensures that the communication connection between terminal 100 and application server 200 persists, ensuring that the service data exchanged between the two ends is not lost. This transitional switching method is known as soft switching, and it allows the communication connection to be switched without the user noticing.
[0136] For example, the communication connection established between the terminal 100 and the application server 200 in S105 may include the second connection. In S107, the terminal 100 may first add a third connection, then disconnect the second connection, and then transition to the third connection. In some embodiments, the network status of the third connection is better than the network status of the second connection.
[0137] Scenarios for switching communication connections include but are not limited to the following:
[0138] Scenario 1: Terminal 100 moves from one office to another. For example, the two offices have Wi-Fi 1 and Wi-Fi 2, respectively. Terminal 100 first connects to Wi-Fi 1. During the movement, it switches from Wi-Fi 1 to the cellular network. After moving to the other office, it connects to Wi-Fi 2.
[0139] Scenario 2: Terminal 100 is in a scenario with signal interference. For example, in a home or dormitory scenario, the user's room has Wi-Fi 1 and the next room has Wi-Fi 2. Before the user opens the door, Terminal 100 can access Wi-Fi 1. After the user opens the door, Wi-Fi 1 is interfered with by Wi-Fi 2. Terminal 100 can switch to the cellular network. After the user closes the door, the interference decreases or disappears, and Terminal 100 switches back to Wi-Fi 1.
[0140] Scenario 3: Cross-regional commuting scenario. For example, a user drives from one region to another, and the two regions provide different cellular networks, such as cellular networks of different operators. In this case, the terminal 100 can first access the cellular network of one region, and then switch to the cellular network of the other region after entering the other region.
[0141] S108 , the terminal 100 communicates with the first application via the first connection, and communicates with the application server 200 via the adjusted communication connection with the application server 200 , and both communications contain the same communication data.
[0142] The specific implementation of S108 can refer to S106 and will not be repeated here.
[0143] After the terminal 100 adjusts the communication connection with the application server 200 through the built-in client 1-2 and the communication module 11, if the adjustment is to disconnect the communication connection, the two communications in S108 may both include the second communication data; if the adjustment is to add a new communication connection, the two communications in S108 may both include the third communication data; if the adjustment is to switch the communication connection, the two communications in S108 may both include the fourth communication data.
[0144] In some implementations, if the terminal 100 disconnects all communication connections with the application server 200 due to termination of services in S107, it is not necessary to execute S108.
[0145] The first connection between the multiplexer 10 and the first application, and the one or more connections between the multiplexer 10 and the application server 200 involved in the above S101-S108 are all established for the network connection request initiated by the first application in S101, and their function is to transmit data of the service to which the network connection request belongs between the first application and the application server 200. If the first application subsequently initiates other services and initiates new network connection requests based on the other services, the multiplexer 10 in the terminal 100 can establish new connections with the first application and the application server 200, respectively, to transmit data of the other services. Of course, in some embodiments, the connection between the same application and its corresponding application server can be used to transmit data of all services initiated by the application, so the terminal 100 does not need to establish a new connection when the first application initiates other services and other network connection requests.
[0146] Similar to the above-mentioned S101-S108 process, if the second application in the terminal 100 initiates a network connection request, the terminal 100 can establish a connection with the second application through the multiplexer 100, establish one or more connections with the application server corresponding to the second application through the multiplexer 10, and adjust these connections. These connections can be used for communication between the second application and its corresponding application server.
[0147] The communication method shown in FIG3 has at least the following technical effects:
[0148] 1. By establishing external and internal connections through the terminal 100, multiple communication connections can be established with the external application server 200 to achieve multi-path communication. Multiple communication connections can be initiated in parallel, avoiding the waiting delay of serial connections.
[0149] 2. Terminal 100 establishes an internal connection with the application, causing the application to believe it has already established a connection with application server 200, thereby speeding up the application's connection establishment. Furthermore, the connection between terminal 100 and the application remains unchanged regardless of the actual connection to the external communication server; it remains constant, oblivious to changes in the actual communication connection. This reduces or avoids disconnections caused by network disturbances, preventing users from experiencing application lag.
[0150] 3. Terminal 100 establishes connections internally with applications and establishes and manages external communication connections. This decouples applications from the actual network, allowing applications to perceive that they are always connected to application server 200 without requiring them to manage communication connections. This allows applications to quickly and seamlessly switch between multiple communication connections in multi-path communication scenarios.
[0151] 4. Terminal 100 can automatically switch the communication connection with application server 200 based on network conditions, without requiring manual user intervention or user awareness. This soft switching approach avoids the risk of application service lag or interruption. This solution effectively utilizes terminal 100's network resources and provides users with an excellent application experience.
[0152] 5. This solution does not require calling specific APIs as shown in Figures 1A-1C, nor does it require deploying cloud servers. It provides a low-cost and all-weather available multi-path communication solution.
[0153] 6. This solution is improved on the terminal 100 side, does not require application adaptation, and has low implementation cost and is easy to implement.
[0154] Refer to Table 1, which exemplarily shows application freeze records using the communication method provided by this application and other methods.
[0155] Table 1
[0156] As can be seen from Table 1, the communication method provided in this application can reduce the application freeze rate and provide users with an excellent application usage experience.
[0157] Equipment provided by this application
[0158] FIG6 is a hardware structure diagram of the terminal 100 provided in an embodiment of the present application.
[0159] As shown in Figure 6, the terminal 100 may include: the terminal 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0160] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal 100. In other embodiments of the present application, the terminal 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0161] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0162] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0163] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0164] The charging management module 140 is configured to receive charging input from a charger. The power management module 141 is configured to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.
[0165] The wireless communication function of the terminal 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0166] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0167] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the terminal 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0168] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0169] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied on the terminal 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0170] In some embodiments, the antenna 1 of the terminal 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal 100 can communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0171] The terminal 100 implements the display function through a GPU, a display screen 194, and an application processor.
[0172] The terminal 100 can realize the shooting function through the ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0173] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0174] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0175] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0176] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.
[0177] The terminal 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0178] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or removed from the terminal 100 by inserting it into or removing it from the SIM card interface 195. The terminal 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The terminal 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the terminal 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal 100 and cannot be separated from the terminal 100.
[0179] In the embodiment of the present application, the internal memory 121 is used to store a program for implementing the method provided by the present application on the terminal 100 side, and the processor 110 is used to call the instructions contained in the program to trigger the terminal 100 to execute the various steps of the method performed on the terminal 100 side. The specific process of the method can be referred to Figure 3 and related descriptions above.
[0180] Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor may be part of the communication module 11 of the terminal 100 mentioned above, which is used to establish one or more communication connections with the application server 200. The operating system of the terminal 100 may be one of the following: etc.
[0181] The software system of the terminal 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, a mobile operating system with a layered architecture is used as an example to illustrate the software structure of the terminal 100.
[0182] FIG7 is a block diagram of the software structure of the terminal 100 according to an embodiment of the present application.
[0183] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, a mobile operating system is divided into four layers: the application layer, the framework layer / core services layer, the underlying libraries and runtime, and the kernel layer.
[0184] The application layer can include a series of application packages.
[0185] As shown in FIG7 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
[0186] The program framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The program framework layer includes some predefined functions.
[0187] As shown in Figure 7 , the program framework layer may include a multiplexer 10. Multiplexer 10 may include a forwarding unit 1, a service identification unit 2, and a link detection unit 3. Forwarding unit 1 may include a built-in server 1-1 and a built-in client 1-2. The function of multiplexer 10 can be found in the description of Figures 2 and 3 above and will not be further elaborated here.
[0188] The multiplexer 10 shown in FIG7 is not limited to being located at the program framework layer of the software framework. In some other embodiments, the multiplexer 10 may also be located at the application layer or kernel layer in the software framework; or, the multiplexer 10 may also be a hardware module, such as an integrated circuit located in a modem or a chip.
[0189] As shown in FIG7 , the program framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0190] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0191] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0192] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0193] The phone manager is used to provide terminal communication functions, such as call status management (including answering, hanging up, etc.).
[0194] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0195] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically, without requiring user interaction. For example, the Notification Manager can be used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating the terminal, or flashing indicator lights.
[0196] The runtime can refer to all code libraries, frameworks, and other components required for a program to run. For example, for the C language, the runtime includes a series of function libraries required for C programs to run. For the Java language, in addition to the core libraries, the runtime also includes the virtual machine required for Java programs to run. These core libraries include the functions required by the Java language.
[0197] The underlying library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0198] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0199] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0200] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0201] A 2D graphics engine is a drawing engine for 2D drawings.
[0202] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0203] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0204] The present application also provides a terminal, which may include: a memory and a processor. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory to enable the terminal to execute the method executed by the terminal 100 side in any of the above embodiments.
[0205] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the terminal 100 side in any of the above embodiments.
[0206] In one possible design, the chip system further includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.
[0207] The chip system can be composed of chips, or can include chips and other discrete devices.
[0208] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0209] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.
[0210] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0211] The present application also provides a communication system, which may include: a terminal 100 and an application server 200. The terminal 100 is used to execute the steps executed by the terminal 100 side in any of the above embodiments, and the application server 200 is used to execute the steps executed by the application server 200 side in any of the above embodiments.
[0212] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute the method executed by the terminal 100 in any of the above embodiments.
[0213] The present application also provides a computer-readable storage medium storing a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the terminal 100 in any of the above embodiments.
[0214] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.
[0215] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The 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 processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0216] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0217] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0218] The terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0219] In short, the above description is only an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of this application should be included in the scope of protection of this application.
Claims
1. A communication method, characterized in that: Applied to a terminal having a first application installed, the method includes: The terminal initiates a network connection request through the first application; The terminal establishes a first connection with the first application in response to the network connection request; The terminal establishes one or more communication connections with the application server; The terminal communicates with the first application via the first connection and communicates with the application server via the one or more communication connections, and both communications contain first communication data.
2. The method according to claim 1, characterized in that The network connection request is initiated by the first application when initiating a target service, and the target service includes a service with real-time requirements.
3. The method according to claim 1 or 2, characterized in that One of the one or more communication connections is a connection based on Wi-Fi technology, or a connection based on cellular technology.
4. The method according to any one of claims 1 to 3, characterized in that The terminal establishes multiple communication connections with the application server, wherein the multiple communication connections include a second connection and a third connection. After the terminal communicates with the first application through the first connection and communicates with the application server through the one or more communication connections, the method further includes: The terminal disconnects the second connection with the application server and maintains the first connection; The terminal communicates with the first application through the first connection and communicates with the application server through the third connection, and both communications contain second communication data.
5. The method according to claim 4, characterized in that Before the terminal disconnects the second connection with the application server, the method further includes: The terminal detects that the network status of the third connection is better than the network status of the second connection.
6. The method according to claim 5, characterized in that The first connection, the second connection, and the third connection are all based on TCP, and the terminal detects that the network status of the third connection is better than the network status of the second connection, which specifically includes one or more of the following: The terminal detects that the establishment speed of the third connection is faster than the establishment speed of the second connection; or, The speed at which the terminal receives the data sent by the application server through the third connection is faster than the speed at which the terminal receives the data sent by the application server through the second connection.
7. The method according to claim 5, characterized in that The first connection, the second connection, and the third connection are all based on UDP, and the terminal detects that the network status of the third connection is better than the network status of the second connection, specifically including: The terminal cannot receive the data sent by the application server through the second connection, and the terminal receives the data sent by the application server through the third connection.
8. The method according to any one of claims 1 to 3, characterized in that The terminal establishes one or more communication connections with the application server, wherein the one or more communication connections include a second connection, After the terminal communicates with the first application through the first connection and communicates with the application server through the one or more communication connections, the method further includes: The terminal establishes a third connection with the application server; The terminal communicates with the first application via the first connection, and communicates with the application server via the second connection and the third connection, and both communications contain third communication data.
9. The method according to claim 8, characterized in that After the terminal establishes a third connection with the application server, the method further includes: The terminal disconnects the second connection with the application server and maintains the first connection; The terminal communicates with the first application through the first connection and communicates with the application server through the third connection, and both communications include fourth communication data.
10. A terminal, characterized in that: The terminal includes a multiplexer and a communication module, and the terminal is installed with a first application. The first application is used to initiate a network connection request; The multiplexer is configured to respond to the network connection request and establish a first connection with the first application; The multiplexer is further configured to establish one or more communication connections with the application server via the communication module; The multiplexer is used to communicate with the first application via the first connection, and the multiplexer is used to communicate with the application server via the one or more communication connections, and both communications contain first communication data. The terminal according to claim 10 , wherein: The network connection request is initiated by the first application when initiating a target service, and the target service includes a service with real-time requirements.
12. The terminal according to claim 10 or 11, characterized in that: One of the one or more communication connections is a connection based on Wi-Fi technology, or a connection based on cellular technology.
13. The terminal according to any one of claims 10 to 12, characterized in that: The multiplexer establishes multiple communication connections with the application server through the communication module, wherein the multiple communication connections include a second connection and a third connection. The multiplexer is also used to disconnect the second connection with the application server through the communication module and maintain the first connection; communicate with the first application through the first connection, and communicate with the application server through the third connection, the communication module, and both communications contain second communication data. The terminal according to claim 13 , wherein: The multiplexer is further configured to detect that the network status of the third connection is better than the network status of the second connection before disconnecting the second connection with the application server through the communication module. The terminal according to claim 14 , wherein: The first connection, the second connection, and the third connection are all based on TCP, and the multiplexer detects that the network status of the third connection is better than the network status of the second connection, which specifically includes one or more of the following: The multiplexer detects that the establishment speed of the third connection is faster than the establishment speed of the second connection; or, The speed at which the multiplexer receives the data sent by the application server through the third connection is faster than the speed at which the multiplexer receives the data sent by the application server through the second connection. The terminal according to claim 14 , wherein: The first connection, the second connection, and the third connection are all based on UDP, and the multiplexer detects that the network status of the third connection is better than the network status of the second connection, specifically including: The multiplexer cannot receive the data sent by the application server through the second connection, and the multiplexer receives the data sent by the application server through the third connection.
17. The terminal according to any one of claims 10 to 12, characterized in that: The multiplexer establishes one or more communication connections with the application server through the communication module, wherein the one or more communication connections include a second connection. The multiplexer is further configured to establish a third connection with the application server, communicate with the first application via the first connection, and communicate with the application server via the second connection, the third connection, and the communication module, both communications including third communication data. The terminal according to claim 17 , wherein: The multiplexer is further configured to disconnect the second connection with the application server and maintain the first connection; communicate with the first application via the first connection and communicate with the application server via the third connection, both communications containing fourth communication data.
19. The terminal according to any one of claims 10 to 18, characterized in that: The multiplexer includes a built-in server and a built-in client. The built-in server is used to respond to the network connection request and establish the first connection with the first application; The built-in client is used to establish the one or more communication connections with the application server through the communication module; The built-in server is used to communicate with the first application through the first connection, and the built-in client is used to communicate with the application server through the one or more communication connections, and both communications contain the first communication data.
20. The terminal according to claim 19, characterized in that The built-in server communicates with the first application through the first connection, and the built-in client communicates with the application server through the one or more communication connections. The built-in server and the built-in client transparently transmit communication data.
21. A terminal, characterized in that: include: A memory, one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the terminal to execute the method according to any one of claims 1 to 9.
22. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 9.
23. A chip system, comprising at least one processor and a memory, wherein the memory is used to store program instructions and data, and the processor is used to call the program instructions and data to implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Connection establishment method and terminal equipment
CN111200557A
Connection establishment method and terminal equipment
CN111372329A
Multi-path transmission method and device
CN113014483A
Multi-Path Transmission Control Protocol
US20170188407A1
Multipath Transmission Control Protocol Proxy Use in a Cellular Network
US20190306068A1