WO2023202533A1 - Communication method, electronic device, and system - Google Patents

Communication method, electronic device, and system Download PDF

Info

Publication number
WO2023202533A1
WO2023202533A1 PCT/CN2023/088711 CN2023088711W WO2023202533A1 WO 2023202533 A1 WO2023202533 A1 WO 2023202533A1 CN 2023088711 W CN2023088711 W CN 2023088711W WO 2023202533 A1 WO2023202533 A1 WO 2023202533A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
operator
cell
network
data
Prior art date
Application number
PCT/CN2023/088711
Other languages
French (fr)
Chinese (zh)
Inventor
倪银堂
石帅
代贝
张号
姚松平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202210827794.3A external-priority patent/CN116980864A/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023202533A1 publication Critical patent/WO2023202533A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Definitions

  • the present application relates to the field of communication technology, and in particular to communication methods, electronic devices and systems.
  • This application discloses communication methods, electronic devices and systems, and relates to the field of electronic technology.
  • the communication method provided by this application includes: when the user's electronic device is in a situation where the Internet quality is poor, it can discover other surrounding electronic devices and establish a connection, and access the Internet through the cellular mobile communication function of other electronic devices. Through this method, users can still get a good Internet experience in scenarios such as high-speed trains and densely populated areas.
  • embodiments of the present application provide a communication method, applied to a system including a first electronic device and a second electronic device.
  • the method includes: when the network status of the first electronic device is in the first state, The first electronic device exchanges network parameters with the second electronic device.
  • the network parameters include the identity of the first operator and/or the identity of the second operator.
  • the operation of the cellular mobile communication network to which the first electronic device is accessed The operator is the first operator, and the operator of the cellular mobile communication network accessed by the second electronic device is the second operator; if the first operator and the second operator are different, the third operator An electronic device establishes a first connection with the second electronic device; the first electronic device sends first data to the second electronic device through the first connection; and the second electronic device forwards the first data to the server.
  • the first electronic device when the first electronic device is in the first state, it can actively discover the second electronic device with a different operator and establish a connection with the second electronic device. After the connection is established, the second electronic device The first electronic device provides a network agent. Since the operators of the first electronic device and the second electronic device are different, the probability that the communication quality of the second electronic device and the first electronic device are both poor at the same time is very small. In this way, the first electronic device always It is possible to maintain a better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
  • the first electronic device when the first operator and the second operator are the same and the first access cell and the second access cell are different, the first electronic device The first connection is established with the second electronic device.
  • the network parameters include the identity of the first access cell and/or the identity of the second access cell.
  • the first access cell The area is the access cell of the first electronic device, and the second access cell is the access cell of the second electronic device.
  • the first electronic device when the first electronic device is in the first state, it can actively discover a second electronic device connected to a different cell and establish a connection with the second electronic device. After the connection is established, the second electronic device Provide a network agent for the first electronic device. Since the access cells of the first electronic device and the second electronic device are different, the probability of the communication quality of the second electronic device and the first electronic device being both poor at the same time is very small. In this way, the first electronic device The device can always maintain a better communication quality, thus improving the online experience of users of the first electronic device.
  • the network parameters include the The identifier of the first cell switching strategy and/or the identifier of the second cell switching strategy.
  • the first cell switching strategy is the cell switching strategy of the first electronic device
  • the second cell switching strategy is the cell of the second electronic device. Switch strategy.
  • the two electronic devices should not switch cells at the same time to avoid interrupting the network during the cell switching process; or, because the cell switching strategies of the two electronic devices are different, Then there is always one electronic device that switches quickly, and another electronic device that switches stably.
  • the electronic device that switches stably provides the bottom line for the communication quality of the network between the two electronic devices.
  • the electronic device that switches quickly has a greater chance of detecting the communication quality. community.
  • the network parameter Including an identifier of the first cell reselection strategy and/or an identifier of the second cell reselection strategy is the cell reselection strategy of the first electronic device, and the second cell reselection strategy is The cell reselection strategy of the second electronic device.
  • the two electronic devices since the cell reselection strategies of the two electronic devices are different, the two electronic devices should not reselect cells at the same time to avoid interrupting the network during the cell reselection process; or, due to the cell reselection strategies of the two electronic devices, If the selection strategies are different, then one electronic device will switch quickly and the other electronic device will switch stably.
  • the electronic device with stable switching will guarantee the communication quality of the network between the two electronic devices.
  • the electronic device with fast switching will have a greater chance. Cells with good communication quality can be discovered.
  • the first account when the first account and the second account are the same, or when the first account and the second account belong to the same group, the first account The electronic device establishes a first connection with the second electronic device, the first account is an account logged in on the first electronic device, and the second account is an account logged in on the second electronic device.
  • the two electronic devices when the accounts of two electronic devices are the same, or when the two electronic devices belong to the same group, the two electronic devices establish a connection, and the first electronic device can obtain benefits through the multi-path algorithm, Improve the communication quality of the network.
  • the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
  • the method before the first electronic device establishes the first connection with the second electronic device, the method further includes: the first electronic device and/or the second electronic device The device determines a network proxy mode, which is used to determine the type of the first connection.
  • the first electronic device and/or the second electronic device can also determine the mode of the network proxy, and then select a more appropriate type of first connection. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures the first connection.
  • the data transmission rate between the electronic device and the second electronic device meets the requirements of the first electronic device.
  • the first connection when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode , the first connection is 5G WiFi connect.
  • the first connection changes from a 2.4G WiFi connection to a 5G WiFi connection.
  • the first electronic device receives the second data sent by the server on a second data channel, the first data channel being a cellular mobile device of the first electronic device.
  • the communication function is provided; after receiving the second data, the first electronic device sends the first instruction to the second electronic device.
  • the first instruction is used to indicate that the first electronic device has received the second data.
  • the first instruction includes a first sequence number, which is the TCP sequence number of the second data or the sequence number in the data segment of the second data; the second electronic device does not send a request to the third data after receiving the second data.
  • An electronic device sends the second data.
  • the first electronic device and the second electronic device can cooperate to deduplicate the received data.
  • the first electronic device When the first electronic device has received certain data through its own cellular mobile network, it can instruct the second electronic device to deduplicate the received data.
  • the electronic device does not send the data to the first electronic device, thereby reducing the overhead of the first electronic device and the second electronic device.
  • embodiments of the present application provide a communication method, applied to a system including a first electronic device and a second electronic device.
  • the method includes: when the network status of the first electronic device is in the first state, The first electronic device establishes a first connection with the second electronic device; in the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device to switch Operator, wherein in the first case, the first operator and the second operator are the same, the operator of the cellular mobile communication network to which the first electronic device accesses is the first operator, and the second electronic device The operator of the cellular mobile communication network that the device accesses is the second operator; the second electronic device switches operators after receiving the first instruction; the first electronic device communicates with the second electronic device through the first connection. Send the first data; the second electronic device forwards the first data to the server.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the operator, so that the first electronic device can always maintain a Better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
  • the first electronic device sends a second instruction to the second electronic device, the second instruction is used to instruct the second electronic device to change Cell switching strategy; the second electronic device changes the cell switching strategy after receiving the second instruction, wherein in the second case, the first operator is the same as the second operator, and the first case is the same as the second operator.
  • the second situation is different; wherein, after the second electronic device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell switching strategy, so that the first electronic device can always maintain A better communication quality, thereby improving the online experience of users of the first electronic device.
  • the method further includes: in a third situation, the first electronic device sends a third instruction to the second electronic device, the third instruction is used to instruct the The second electronic device changes the cell reselection strategy; the second electronic device changes the cell reselection strategy after receiving the third instruction, wherein, in the third case, the first operator is the same as the second operator, And the first situation is different from the third situation; wherein, after the second electronic device changes the cell reselection strategy, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell reselection strategy, so that the first electronic device can always Keep A better communication quality, thereby improving the online experience of users of the first electronic device.
  • the method further includes: in a fourth situation, the first electronic device sends a fourth instruction to the second electronic device, the fourth instruction is used to instruct the The second electronic device changes the access cell; the second electronic device changes the access cell after receiving the third indication, wherein, in the fourth case, the first operator is the same as the second operator, and the The first situation is different from the fourth situation; wherein, after the second electronic device changes the access cell, the access cell of the second electronic device is different from the access cell of the first electronic device.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the access cell, so that the first electronic device can always maintain A better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first state includes the cellular mobile communication quality of the first electronic device being lower than a threshold, the first electronic device failing to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
  • the first electronic device and/or the second electronic device determines a network proxy mode, and the network proxy mode is accessed by the first electronic device through the second electronic device.
  • the mode of the server in the Internet the network proxy mode is used to determine the type of the first connection; when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is In the case of the second mode, the first connection is a 5G WiFi connection.
  • the first electronic device and/or the second electronic device can also determine the mode of the network proxy, and then select a more appropriate type of first connection. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures the first connection.
  • the data transmission rate between the electronic device and the second electronic device meets the requirements of the first electronic device.
  • the type of the first connection changes from 2.4G WiFi to 5G WiFi.
  • the first electronic device receives the second data sent by the server on a second data channel, and the first data channel is a cellular mobile device of the first electronic device.
  • the communication function is provided; after receiving the second data, the first electronic device sends the first instruction to the second electronic device.
  • the first instruction is used to indicate that the first electronic device has received the second data.
  • the first instruction includes a first sequence number, which is the TCP sequence number of the second data or the sequence number in the data segment of the second data; the second electronic device does not send a request to the third data after receiving the second data.
  • An electronic device sends the second data.
  • the first electronic device and the second electronic device can cooperate to deduplicate the received data.
  • the first electronic device When the first electronic device has received certain data through its own cellular mobile network, it can instruct the second electronic device to deduplicate the received data.
  • the electronic device does not send the data to the first electronic device, thereby reducing the overhead of the first electronic device and the second electronic device.
  • embodiments of the present application provide a communication method.
  • the method includes: when the network status of the first electronic device is in the first state, the first electronic device obtains the network parameters of the second electronic device.
  • the network parameters include the identification of the second operator, the operator of the cellular mobile communication network to which the first electronic device is connected is the first operator, and the operator of the cellular mobile communication network to which the second electronic device is connected is be the second operator; in the case where the first operator is different from the second operator, the first electronic device establishes a first connection, and the first connection is used to connect to the second electronic device; the third An electronic device sends first data to the second electronic device through the first connection, and the first data is used to be forwarded to the server by the second electronic device.
  • the first electronic device when the first electronic device is in the first state, it can actively discover the second electronic device with a different operator and establish a connection with the second electronic device. After the connection is established, the second electronic device The first electronic device provides a network agent. Since the operators of the first electronic device and the second electronic device are different, the probability that the communication quality of the second electronic device and the first electronic device are both poor at the same time is very small. In this way, the first electronic device always It is possible to maintain a better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
  • the first electronic device when the first operator and the second operator are the same and the first access cell and the second access cell are different, the first electronic device
  • the first connection is established with the second electronic device.
  • the network parameters include the identifier of the first access cell and/or the identifier of the second access cell.
  • the first access cell is the interface of the first electronic device.
  • the second access cell is the access cell of the second electronic device.
  • the first electronic device when the first electronic device is in the first state, it can actively discover a second electronic device connected to a different cell and establish a connection with the second electronic device. After the connection is established, the second electronic device Provide a network agent for the first electronic device. Since the access cells of the first electronic device and the second electronic device are different, the probability of the communication quality of the second electronic device and the first electronic device being both poor at the same time is very small. In this way, the first electronic device The device can always maintain a better communication quality, thus improving the online experience of users of the first electronic device.
  • the network parameters include the The identifier of the first cell switching strategy and/or the identifier of the second cell switching strategy.
  • the first cell switching strategy is the cell switching strategy of the first electronic device
  • the second cell switching strategy is the cell of the second electronic device. Switch strategy.
  • the two electronic devices should not switch cells at the same time to avoid interrupting the network during the cell switching process; or, because the cell switching strategies of the two electronic devices are different, Then there is always one electronic device that switches quickly, and another electronic device that switches stably.
  • the electronic device that switches stably provides the bottom line for the communication quality of the network between the two electronic devices.
  • the electronic device that switches quickly has a greater chance of detecting the communication quality. community.
  • the network parameter Including an identifier of the first cell reselection strategy and/or an identifier of the second cell reselection strategy is the cell reselection strategy of the first electronic device, and the second cell reselection strategy is The cell reselection strategy of the second electronic device.
  • the two electronic devices since the cell reselection strategies of the two electronic devices are different, the two electronic devices should not reselect cells at the same time to avoid interrupting the network during the cell reselection process; or, due to the cell reselection strategies of the two electronic devices, If the selection strategies are different, then one electronic device will switch quickly and the other electronic device will switch stably.
  • the electronic device with stable switching will guarantee the communication quality of the network between the two electronic devices.
  • the electronic device with fast switching will have a greater chance. Cells with good communication quality can be discovered.
  • the first account and the second account are the same, or when the first account and the second account belong to the same group, the first account An electronic device establishes a first connection with the second electronic device, the first account is an account logged in on the first electronic device, and the second account is an account logged in on the second electronic device.
  • the two electronic devices when the accounts of two electronic devices are the same, or when the two electronic devices belong to the same group, the two electronic devices establish a connection, and the first electronic device can obtain benefits through the multi-path algorithm, Improve the communication quality of the network.
  • the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the first electronic device One or more of the mobile communication networks provided are unserviceable.
  • the method before the first electronic device establishes the first connection, the method further includes: the first electronic device determines a network proxy mode, and the network proxy mode is used to determine the The type of the first connection; when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode, the first connection is a 5G WiFi connection .
  • the first electronic device can also determine the mode of the network proxy, and then select a more appropriate first connection type. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures that the first electronic device and the second electronic device The data transfer rate between them meets the needs of the first electronic device.
  • embodiments of the present application provide a communication method applied to a first electronic device.
  • the method includes: when the network status of the first electronic device is in the first state, the first electronic device establishes a third A connection, the first connection is used to connect to the second electronic device; in the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device Switching operators, wherein in the first case, the first operator is the same as the second operator, the operator of the cellular mobile communication network accessed by the first electronic device is the first operator, and the second operator The operator of the cellular mobile communication network accessed by the electronic device is the second operator; the first electronic device sends first data to the second electronic device through the first connection, and the first data is used by the second electronic device.
  • the electronic device is forwarded to the server.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the operator, so that the first electronic device can always maintain a Better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
  • the method further includes: in the second situation, the first electronic device sends a second instruction to the second electronic device, the second instruction is used to instruct the The second electronic device changes the cell switching strategy; wherein, in the second case, the first operator is the same as the second operator, and the first case is different from the second case; wherein, in the second electronic device After the device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell switching strategy, so that the first electronic device can always maintain A better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first electronic device sends a third instruction to the second electronic device, the third instruction is used to instruct the second electronic device to change Cell reselection strategy; wherein, in the third situation, the first operator is the same as the second operator, and the first situation is different from the third situation; wherein, when the second electronic device changes the cell reselection After the strategy is selected, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell reselection strategy, so that the first electronic device can always Maintain a better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first electronic device sends a fourth instruction to the second electronic device, the fourth instruction is used to instruct the second electronic device to change Access a cell; wherein, in the fourth case, the first operator is the same as the second operator, and the first case is different from the fourth case; wherein, when the second electronic device changes the access cell Finally, the access cell of the second electronic device is different from the access cell of the first electronic device.
  • the first electronic device when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the access cell, so that the first electronic device can always maintain a Better communication quality, thereby improving the online experience of users of the first electronic device.
  • the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
  • the method before the first electronic device establishes the first connection, the method further includes: the first electronic device determines a network proxy mode, and the network proxy mode is the first electronic device.
  • the first electronic device can also determine the mode of the network proxy, and then select a more appropriate first connection type. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures that the first electronic device and the second electronic device The data transfer rate between them meets the needs of the first electronic device.
  • inventions of the present application provide an electronic device.
  • the electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes,
  • the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute: when the network status of the first electronic device is in the first state, the first electronic device obtains the Network parameters of the second electronic device.
  • the network parameters include the identification of the second operator.
  • the operator of the cellular mobile communication network accessed by the first electronic device is the first operator.
  • the operator of the cellular mobile communication network accessed by the second electronic device is the first operator.
  • the operator of the cellular mobile communication network is the second operator; when the first operator is different from the second operator, the first electronic device establishes a first connection, and the first connection is used to connect to the a second electronic device; the first electronic device sends first data to the second electronic device through the first connection, and the first data is used to be forwarded to the server by the second electronic device.
  • the one or more processors are also used to call the computer instructions to cause the electronic device to execute: when the first operator and the second operator are the same And when the first access cell and the second access cell are different, the first electronic device establishes the first connection with the second electronic device, and the network parameters include the identification of the first access cell and/or the An identifier of the second access cell, the first access cell is the access cell for the first electronic device, and the second access cell is the access cell for the second electronic device.
  • the one or more processors are also used to call the computer instructions to cause the electronic device to execute: when the first operator and the second operator are the same And when the first cell switching strategy and the second cell switching strategy are different, the network parameters include the identification of the first cell switching strategy and/or the identification of the second cell switching strategy, and the first cell switching strategy is the third cell switching strategy.
  • a cell switching strategy of an electronic device, and the second cell switching strategy is a cell switching strategy of the second electronic device.
  • the one or more processors are also used to call the computer instructions to cause the electronic device to execute: when the first operator and the second operator are the same And when the first cell reselection strategy and the second cell reselection strategy are different, the network parameters include the identifier of the first cell reselection strategy and/or the identifier of the second cell reselection strategy, and the first cell reselection strategy
  • the selection strategy is a cell reselection strategy of the first electronic device
  • the second cell reselection strategy is a cell reselection strategy of the second electronic device.
  • the one or more processors are also used to call the computer Computer instructions are provided to cause the electronic device to execute: in the case where the first account and the second account are the same, or in the case where the first account and the second account belong to the same group, the first electronic device and the The second electronic device establishes a first connection, the first account is an account logged in on the first electronic device, and the second account is an account logged in on the second electronic device.
  • the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
  • the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: the first electronic device determines the network agent mode, and the network agent The mode is used to determine the type of the first connection; when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode, the third connection One connection is a 5G WiFi connection.
  • inventions of the present application provide an electronic device.
  • the electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes,
  • the computer program code includes computer instructions, which are invoked by the one or more processors to cause the electronic device to execute: when the network status of the first electronic device is in the first state, the first electronic device establishes a third A connection, the first connection is used to connect to the second electronic device; in the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device Switching operators, wherein in the first case, the first operator is the same as the second operator, the operator of the cellular mobile communication network accessed by the first electronic device is the first operator, and the second operator The operator of the cellular mobile communication network accessed by the electronic device is the second operator; the first electronic device sends first data to the second electronic device through the first connection, and the first data is used by the second electronic device.
  • the one or more processors are also used to call the computer instructions to cause the electronic device to execute: In the second case, the first electronic device sends a request to the The second electronic device sends a second instruction, the second instruction is used to instruct the second electronic device to change the cell switching strategy; wherein, in the second case, the first operator is the same as the second operator, and the The first situation is different from the second situation; wherein, after the second electronic device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
  • the one or more processors are also configured to call the computer instructions to cause the electronic device to execute:
  • the first electronic device sends a request to the The second electronic device sends a third instruction, the third instruction is used to instruct the second electronic device to change the cell reselection strategy; wherein, in the third case, the first operator is the same as the second operator, and The first situation is different from the third situation; wherein, after the second electronic device changes the cell reselection strategy, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
  • the one or more processors are also used to call the computer instructions to cause the electronic device to execute:
  • the first electronic device sends a request to the The second electronic device sends a fourth instruction, which is used to instruct the second electronic device to change the access cell; wherein, in the fourth case, the first operator is the same as the second operator, and the The first situation is different from the fourth situation; wherein, after the second electronic device changes the access cell, the access cell of the second electronic device is different from the access cell of the first electronic device.
  • the first state includes the cellular mobile communication quality of the first electronic device being lower than a threshold, the first electronic device failing to register in the core network, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the first electronic device One or more of the mobile communication networks provided are unserviceable.
  • the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: the first electronic device determines the network agent mode, and the network agent The mode is a mode in which the first electronic device accesses a server in the Internet through the second electronic device, and the network proxy mode is used to determine the type of the first connection; when the network proxy mode is the first mode, the third The first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode, the first connection is a 5G WiFi connection.
  • embodiments of the present application provide a chip system, which is applied to an electronic device.
  • the chip system includes one or more processors, and the processor is used to call computer instructions to cause the electronic device to execute the fifth step.
  • the sixth aspect any possible implementation manner of the fifth aspect, and the method described in any possible implementation manner of the sixth aspect.
  • embodiments of the present application provide a computer program product containing instructions.
  • the electronic device causes the electronic device to execute any one of the fifth aspect, the sixth aspect, and the fifth aspect. Possible implementations and the method described in any possible implementation in the sixth aspect.
  • embodiments of the present application provide a computer-readable storage medium, including instructions.
  • the electronic device When the instructions are run on an electronic device, the electronic device causes the electronic device to execute any one of the fifth aspect, the sixth aspect, and the fifth aspect. Possible implementations and the method described in any possible implementation in the sixth aspect.
  • the electronic device provided by the fifth aspect, the electronic device provided by the sixth aspect, the chip system provided by the seventh aspect, the computer program product provided by the eighth aspect and the computer storage medium provided by the ninth aspect are all used to execute The method provided by the embodiment of this application. Therefore, the beneficial effects it can achieve can be referred to the beneficial effects in the corresponding methods, and will not be described again here.
  • FIG. 1A and FIG. 1B are an exemplary schematic diagram of a usage scenario of the communication method provided by the embodiment of the present application.
  • FIG. 2 is an exemplary schematic diagram of a SIM card switching method provided by an embodiment of the present application.
  • FIG. 3A and FIG. 3B are exemplary schematic diagrams of applicable scenarios of the communication method provided by the embodiment of the present application.
  • FIG. 4 is an exemplary schematic diagram of the method flow of the communication method provided by the embodiment of the present application.
  • FIG. 5A and FIG. 5B are an exemplary schematic diagram of two data channels on the first electronic device provided by the embodiment of the present application.
  • FIG. 6A, FIG. 6B, and FIG. 6C are an exemplary schematic diagram of the data channel 2 through which the first electronic device provided by this application transmits data.
  • FIG. 7A, FIG. 7B, and FIG. 7C are an exemplary schematic diagram of the first electronic device sending data through two data channels according to the embodiment of the present application.
  • 8A and 8B are an exemplary schematic diagram of the first electronic device receiving data through two data channels according to the embodiment of the present application.
  • Figure 9A is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • FIG. 9B is another exemplary schematic diagram of the flow of the communication method provided by the embodiment of the present application.
  • FIG. 10A is an exemplary schematic diagram of the first interface displayed on the first electronic device in the transmission method provided by the embodiment of the present application.
  • FIG. 10B is an exemplary schematic diagram in which the user instructs the first electronic device to perform a communication method according to an embodiment of the present application.
  • 11A and 11B are an exemplary schematic diagram of the second interface displayed by the second electronic device in the communication method provided by the embodiment of the present application.
  • FIG. 11C is an exemplary schematic diagram of the second electronic device determining the upper limit of data traffic in the communication method provided by the embodiment of the present application.
  • Figure 11D is an exemplary schematic diagram of the second electronic device determining the SIM card used by the network agent in the communication method provided by the embodiment of the present application.
  • FIG. 12A and FIG. 12B are an exemplary schematic diagram of the interface of the first electronic device and/or the second electronic device provided by the embodiment of the present application.
  • Figure 13 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • Figure 14 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • Figure 15 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • Figure 16 is an exemplary schematic diagram of an interface of a first electronic device provided by an embodiment of the present application.
  • Figure 17 is an exemplary schematic diagram of the cell camping situation of the first electronic device and the second electronic device in the transmission method provided by the embodiment of the present application.
  • FIG. 18 is an exemplary schematic diagram in which the first electronic device instructs the second electronic device to switch the type of connection establishment in the communication method provided by the embodiment of the present application.
  • Figure 19 is an exemplary schematic diagram of a second electronic device modifying the priority of data sent by the first electronic device in the transmission method provided by the embodiment of the present application.
  • Figure 20 is another exemplary schematic diagram of the flow of a transmission method provided by an embodiment of the present application.
  • Figure 21 is an exemplary schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • Figure 22 is an exemplary schematic diagram of the software architecture of the electronic device provided by the embodiment of the present application.
  • FIG. 23 is an exemplary schematic diagram of data flow in a system including a first electronic device and a second electronic device provided by an embodiment of the present application.
  • first and second are used for descriptive purposes only and shall not be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, “plurality” The meaning is two or more.
  • GUI graphical user interface
  • FIG. 1A and FIG. 1B are an exemplary schematic diagram of a usage scenario of the communication method provided by the embodiment of the present application.
  • the SIM card is the first electronic device of operator 1. During the movement, it passes through the coverage areas of three cells, namely cell 1, cell 2 and cell 3 respectively. Among them, the operator of cell 1 is operator 1; the operator of cell 2 is operator 2; and the operator of cell 3 is operator 1.
  • the first electronic device whose SIM card is operator 1 means that the operator of the cellular mobile communication network accessed by the first electronic device is operator 1.
  • the coverage range of cell 1 overlaps with the coverage range of cell 2
  • the coverage range of cell 2 overlaps with the coverage range of cell 3
  • the coverage range of cell 1 does not overlap with the coverage range of cell 3.
  • the first electronic device is within the coverage of Cell 1 and accesses Cell 1; after the first electronic device moves out of Cell 1 and is located within the coverage of Cell 2, since the operator corresponding to the SIM card is different from Cell 2 The corresponding operator 2 does not match, and the first electronic device does not access cell 2. At this time, the first electronic device disconnects from the network, that is, it cannot connect to the core network; then the first electronic device moves out of cell 2 and is located in cell 3. After being within the coverage range, the first electronic device accesses the cell 3. At this time, the first electronic device is connected to the network.
  • the coverage area of cell 1, the coverage area of cell 2, and the coverage area of cell 3 overlap.
  • the first electronic device is also located in the central area of Cell 2 and the edge of Cell 3.
  • the communication quality of the first electronic device is poor.
  • the Internet access rate of the first electronic device is unstable.
  • the first electronic device in the scenario shown in FIG. 1A , when the first electronic device is only located within the coverage of cell 2, the first electronic device can still access cell 2 through an emergency call.
  • whether the first electronic device has a network refers to whether the first electronic device can be connected to the core network through the cellular mobile communication function and thereby connected to the Internet.
  • embodiments of the present application provide a SIM card switching method.
  • FIG. 2 is an exemplary schematic diagram of a SIM card switching method provided by an embodiment of the present application.
  • SIM card 1 is the card of operator 1
  • SIM card 2 is the card of operator 2
  • the currently used SIM card will be switched to SIM card 1
  • the currently used SIM card will be switched to SIM card 1.
  • the SIM card is switched to SIM card 2.
  • the first electronic device can compare various parameters between the two cells, and then choose to switch to SIM card 2 or SIM card 1.
  • the first electronic device is in a disconnected network state, that is, the first electronic device may change from a weak network state to a disconnected network state; secondly, , after the first electronic device performs SIM card switching, the first electronic device also needs to perform a cell search step. Since cell search requires the first electronic device to scan the frequency to discover surrounding cells, and then it can access the corresponding cell, resulting in SIM The card switching process takes a long time and consumes high power, which is not conducive to the user experience.
  • embodiments of the present application provide a communication method that can improve the performance of any one of the multiple electronic devices or a specific electronic device in some weak network or no network environments by utilizing the cellular mobile communication capabilities of multiple electronic devices. Communication quality of cellular mobile communications in .
  • FIG. 3A and FIG. 3B are exemplary schematic diagrams of applicable scenarios of the communication method provided by the embodiment of the present application.
  • stage 1 the first electronic device determines whether the first condition is met.
  • the first electronic device may determine whether the quality of the real-time cellular mobile communication is lower than a threshold. If the quality of the cellular mobile communication of the first electronic device is lower than a certain set quality threshold, it is determined that the first condition is met. Alternatively, the first electronic device can predict that the probability of fluctuations in cellular mobile communications in the future is greater than the probability threshold, and then determines that the first condition is met.
  • the first condition is introduced below as an example.
  • the quality of real-time cellular mobile communication can be determined by determining parameters such as signal strength, bit error rate, and congestion level of the current access cell between the first electronic device and the current access cell.
  • the first electronic device may determine through positioning that the location of the first electronic device is located in a densely populated area such as a hospital or an airport. The first electronic device may believe that there is a high probability that cellular mobile communications will fluctuate, and then determine that the first electronic device meets the requirements of the first electronic device. A condition; or, the first electronic device can determine through positioning that the location of the first electronic device is located in a relatively closed internal area of a building such as a garage or a commercial office building, then the first electronic device can believe that there is a high probability that cellular mobile communications will fluctuate.
  • the first condition is that the first electronic device determines that the speed of the first electronic device is greater than a threshold speed such as 200km/h through a speed sensor or a change in position, then the first electronic device is determined to meet the first condition; Or, the first condition is that the first electronic device determines that the cell accessed is a cell served by the high-speed rail dedicated network (high-speed rail dedicated network cell), then the first electronic device determines that it meets the first condition; or, the first condition is that the first electronic device The device determines that the user has subscribed to a high-speed rail, high-speed train or long-distance bus ticket, and the first electronic device determines that the current time is between the departure time and the alighting time of the high-speed rail, high-speed train or long-distance bus ticket, then the first electronic device determines that the first condition is met ; Or, the first condition is that the first electronic device determines that the user has subscribed to a high-speed rail, high-speed speed
  • the first electronic device determines that the SIM card is in arrears or the first electronic device fails to register with the core network.
  • Stage 2 The first electronic device discovers the surrounding second electronic device through broadcasting, and asks the second electronic device whether it meets the second condition.
  • the second electronic device can be connected to the Internet.
  • the second condition may be related to the first condition.
  • the second condition is that the second electronic device determines that the quality of the real-time cellular mobile communication is lower than the threshold.
  • the second condition is that the second electronic device determines that the operator used to access the Internet is the same as the one used by the first electronic device. different operators.
  • the second condition may be independent of the first condition.
  • the second condition is that the second electronic device determines that the current access cell is different from the current access cell of the first electronic device, or that the operator of the cellular network accessed by the second electronic device is different from the operator of the cellular network accessed by the first electronic device. Operators vary.
  • the second electronic device may be any electronic device, or an electronic device specified by the user, and the second electronic device may not meet the second condition.
  • Stage 3 The first electronic device and the second electronic device establish a connection through wired or wireless means.
  • the wireless method may include WiFi, Bluetooth, ultra wide band (UWB), etc., and is not limited here.
  • the second electronic device After the connection is established, the second electronic device provides a network proxy for the first electronic device, that is, the first electronic device can access the Internet through the second electronic device.
  • the second electronic device provides a network proxy for the first electronic device means that after the first electronic device and the second electronic device establish a connection, the first electronic device can send a request to access the network to the second electronic device, and the second electronic device After the device receives the request to access the network, it is forwarded to the server on the Internet.
  • the server may be an application server, such as a media server that provides videos, a game server that provides game servers, and an authentication server that provides identity verification information.
  • Stage 4 The first electronic device can interact with the server in the Internet through two data channels, one of which is provided by the second electronic device.
  • the two data channels on the first electronic device are constructed by different actual physical links.
  • the communication quality of the two data channels is more independent, which is beneficial to improving the communication quality of the first electronic device. Compared with Traditional multipath communication methods are more robust and can avoid situations such as high data delays and slow data transmission rates, thereby improving user experience.
  • the first electronic device can also provide a network proxy for the second electronic device, which can also improve the communication quality of the second electronic device.
  • the SIM card of the first electronic device is operator 1, and the SIM card of the second electronic device is operator 2; for the first electronic device, when the communication of cell 1 is at the location of the first electronic device, The quality is greater than the communication quality of cell 2, and the first electronic device accesses cell 1 and then accesses the Internet; for the first electronic device, when the communication quality of cell 1 is less than or equal to the communication quality of cell 2 at the location of the first electronic device, or the communication quality of cell 2 The communication quality of 2 is greater than or equal to the communication quality of cell 3, and the first electronic device accesses the Internet through the network agent provided by the second electronic device; for the first electronic device, when the communication quality of cell 3 is greater than that of cell 3 at the location of the first electronic device With the communication quality of 2, the first electronic device accesses the community 2 and then accesses the Internet.
  • the following first exemplarily introduces the communication method provided by the embodiment of the present application from the perspective of interaction between electronic devices and human-computer interaction, combined with the content shown in FIG. 4 .
  • the communication method provided by the embodiment of the present application is first introduced from the perspective of the interaction between electronic devices.
  • FIG. 4 is an exemplary schematic diagram of the method flow of the communication method provided by the embodiment of the present application.
  • the first electronic device may discover the second electronic device through the broadcast.
  • the broadcast can be a broadcast specified by Bluetooth, UWB, WiFi and other protocols, which is not limited here.
  • the second electronic device when the first electronic device is connected to the second electronic device, the second electronic device can be discovered directly without discovering the second electronic device through broadcasting.
  • the first electronic device when both the first electronic device and the second electronic device are logged in with the same account or account, such as account or According to the account, the first electronic device can discover the second electronic device in an end-to-end manner instead of discovering the second electronic device in a broadcast manner.
  • S402 The first electronic device and the second electronic device exchange network parameters. After the first electronic device determines that the second electronic device meets the second condition, the first electronic device and the second electronic device establish a connection.
  • the second condition can refer to the text description corresponding to Figure 2 above, and will not be described again here.
  • the first electronic device requests the second electronic device to send network parameters, and the first electronic device determines whether the second electronic device meets the second condition based on the received network parameters.
  • the network parameters may include an operator of a cellular network to which the second electronic device accesses.
  • the network parameters may include the operator of the cellular network accessed by the first electronic device and the operator of the cellular network accessed by the second electronic device. operator.
  • the network parameters may include the identity of the cell to which the second electronic device accesses.
  • the network parameters may include the identity of the cell accessed by the first electronic device and the identity of the cell accessed by the second electronic device.
  • the network parameters may include the cell switching (channel switch) strategy and/or cell reconfiguration of the second electronic device. Choose a strategy.
  • the type of connection established by the first electronic device and the second electronic device may be determined by the second electronic device or by the first electronic device. Among them, the types of connections are shown in Table 1 below.
  • the first electronic device may determine the type of connection according to the type of business currently requiring Internet access.
  • the connection can include Bluetooth connection, UWB connection or WiFi 2.4G connection or WiFi 5G connection.
  • WiFi 2.4G connection and WiFi 5G connection are both WiFi direct connections. For example, if the current business that requires Internet access is online video playback, the first electronic device can determine the connection to be a UWB connection or WiFi 5G connection; for another example, if the current business that requires Internet access is online audio playback, web browsing, etc., then the first electronic device You can determine whether the connection is a Bluetooth connection or a WiFi 2.4G connection.
  • the second electronic device can also update the current network parameters of the second electronic device to the first electronic device.
  • the second electronic device when the user specifies a second electronic device, the second electronic device may not meet the second condition.
  • the first electronic device can broadcast its own network parameters to the outside, and the second electronic device determines whether the first electronic device meets the second condition, for example, the operator is different. After multiple second electronic devices determine that the first electronic device satisfies the second condition, that is, after multiple second electronic devices determine that they can provide a network proxy for the first electronic device, the first electronic device may determine which third electronic device to use.
  • the second electronic device provides a network agent for the first electronic device. For example, a first electronic device broadcasts network parameters, multiple second electronic devices respond, and then the first electronic device selects from the multiple responding second electronic devices to determine one or more second electronic devices. Then, the first electronic device may establish a connection with the one or more second electronic devices.
  • the first electronic device can broadcast its own network parameters to the outside world.
  • the second electronic device can broadcast its own network parameters. parameters so that the first electronic device can receive the network parameters of the second electronic device, or the second electronic device can send the network parameters of the second electronic device to the first electronic device.
  • the first electronic device may be the party initiating the connection
  • the second electronic device may also be the party initiating the connection
  • network parameters may include round-trip time delay (Round-Trip Time, RTT), packet loss rate and other parameters.
  • RTT round-trip time delay
  • the first electronic device when the first electronic device is accessing a webpage such as "www.huawei.com", the first electronic device will carry "www.huawei.com” when broadcasting.
  • the second electronic device can obtain the packet loss rate and/or RTT of the second electronic device accessing "www.huawei.com”.
  • the packet loss rate or RTT of the second electronic device is lower than the set threshold, the first electronic device determines that the second electronic device meets the second condition.
  • the first call The sub-device can establish a connection with the second electronic device.
  • the network parameters may include the packet loss rate or RTT when the second electronic device accesses the online video website, or, for another example, when the user plays online games through the first electronic device , then the network parameters may include the packet loss rate or RTT when the second electronic device accesses the application server corresponding to the game application.
  • the second electronic device provides a network proxy for the first electronic device.
  • the second electronic device After the connection is established, the second electronic device provides a network proxy for the first electronic device. After the second electronic device and the first electronic device provide network proxies, there are two data channels on the first electronic device to access the data packet. Among them, one data channel is established by the first electronic device through its own cellular mobile communication, and the other is established by the second electronic device.
  • FIG. 5A and FIG. 5B are an exemplary schematic diagram of two data channels on the first electronic device provided by the embodiment of the present application.
  • the first electronic device has two data channels, namely data channel 1 and data channel 2.
  • the data channel 1 includes a first electronic device accessing a base station 2 and connecting to a server in the Internet through the base station 2 .
  • the data channel 2 includes a connection established between a first electronic device and a second electronic device, and the second electronic device is connected to a server in the Internet through the base station 1 .
  • base station 1 and base station 2 are the same base station, that is, the access cell of the first electronic device and the access cell of the second electronic device are the same.
  • the source IPs of different paths are different.
  • the source IPs of the two data channels can be the same, which are both the IP addresses of the first electronic device, that is, there is no need for the first
  • the electronic device is a multi-network card (multi-network interface) device, or one network interface of the first electronic device is not required to be configured with multiple IP addresses; except for the first time, for traditional multi-path communication methods such as MPTCP, the server can determine from The requests from different paths are all sent by the first electronic device. However, optionally, in some embodiments of the present application, the server cannot determine that the requests from different data channels are all sent by the first electronic device.
  • the first electronic device may establish a connection with a second electronic device and a connection with a third electronic device, and the second electronic device and the third electronic device may provide the first electronic device with Network proxy, as shown in Figure 5B.
  • the first electronic device has three data channels, namely data channel 1, data channel 2, and data channel 3.
  • the first electronic device receives and sends data based on at least two data channels.
  • the data can be sent redundantly, or the data can be sent by the first electronic device on a data channel with good communication quality.
  • the first electronic device can adjust the data on the two data channels based on the network parameters of the second electronic device and the network parameters of the first electronic device. distribution situation.
  • the network parameters of the first electronic device and the network parameters of the second electronic device may be updated in real time, and the network parameters of the first electronic device and the network parameters of the second electronic device may include one of RTT, packet loss rate or Various.
  • the second electronic device When the first electronic device and the second electronic device each receive the response data from the server, the second electronic device sends the received data to the first electronic device through the previously established connection.
  • the first electronic device receives the response data from the two data channels. The data is compared and deduplicated, and then the latest data is submitted to the application.
  • the data received on different data channels can be deduplicated through TCP sequence numbers; for unreliable transmission protocols represented by UDP, the sequence can be configured inside the data field. Number field, the protocol stack or application program deduplicates the received data on different data channels.
  • FIG. 6A, FIG. 6B, and FIG. 6C are an exemplary schematic diagram of the data channel 2 through which the first electronic device provided by this application transmits data.
  • the first electronic device sends data field 1 to the server in the Internet through the network proxy provided by the second electronic device. That is, the first electronic device sends data field 1 to the server in the Internet through data channel 2.
  • the first electronic device encapsulates the data that needs to be sent into data in a specific format according to the type of connection between the first electronic device and the second electronic device. For example, when the connection between the first electronic device and the second electronic device is a Bluetooth connection, the first electronic device will encapsulate data field 1 into a Bluetooth format message; when the connection between the first electronic device and the second electronic device When the connection is a UWB connection, the first electronic device will encapsulate data field 1 into a UWB format message; when the connection between the first electronic device and the second electronic device is a WiFi direct connection, the first electronic device will encapsulate the data Field 1 is encapsulated into a message in WIFI direct connection format.
  • the second electronic device decapsulates and obtains data field 1.
  • the second electronic device After determining data field 1, the second electronic device encapsulates data field 1 as an application layer message, that is, adds a transport layer field, a network layer field, a link layer field, and a physical layer field to obtain a network message (in Figure 6A The data 2) is then sent out.
  • the first electronic device can send the transport layer message to the second electronic device, that is, the first electronic device encapsulates the transport layer message into a Bluetooth format message. , UWB format messages, WiFi direct format messages. Moreover, after receiving the data, the second electronic device decapsulates and obtains the transport layer message sent by the first electronic device, and then continues to encapsulate it into a network message (data 2 in Figure 6B) before sending it out.
  • the first electronic device can send the transport layer message to the second electronic device, that is, the first electronic device encapsulates the transport layer message into a Bluetooth format message. , UWB format messages, WiFi direct format messages.
  • the second electronic device decapsulates and obtains the transport layer message sent by the first electronic device, and then continues to encapsulate it into a network message (data 2 in Figure 6B) before sending it out.
  • the server can determine that the network message is sent by the first electronic device.
  • the first electronic device can send the transport layer message to the second electronic device, that is, the first electronic device encapsulates the transport layer message into a Bluetooth format message, a UWB format message, or a WiFi format message. Messages in direct connection format.
  • the second electronic device decapsulates and obtains the transport layer message sent by the first electronic device, and then encapsulates the transport layer message as data field 2 to obtain a network message and sends it out.
  • the network message received by the server through the data channel 2 includes the transport layer field 1 corresponding to the first electronic device and the transport layer field 2 corresponding to the second electronic device, and then the network can be determined
  • the message is data of the first electronic device forwarded by the second electronic device.
  • the server can determine that the same request data from data channel 1 and data channel 2 are both sent by the first electronic device, and thus redundant or non-redundant. Send the remaining response data.
  • the non-redundant sending response data is a data channel in which the server can select any one of the two data channels and send the response data on this data channel.
  • FIG. 7A, FIG. 7B, and FIG. 7C are an exemplary schematic diagram of the first electronic device sending data through two data channels according to the embodiment of the present application.
  • the first electronic device sends data to the server through data channel 1 and data channel 2.
  • the data sent by the first electronic device includes message 1, message 2, message 3, message 4 and message 5.
  • the first electronic device can send message 1, message 2, message 3, message 4 and message 5 on data channel 1 and data channel 2 respectively, that is, the first electronic device can send message 1, message 2, message 3, message 4 and message 5 on two data channels. Send data redundantly on the data channel.
  • the first electronic device may estimate the RTT of the two data channels or other parameters used to measure the communication quality of the data channel, and then based on the RTT of the two data channels or other parameters used to measure the communication quality of the data channel.
  • the parameters evenly distribute the data that needs to be sent to the two data channels.
  • data channel 1 The RTT is 1.5 times the RTT of data channel 2, so message 1, message 2, and message 3 are assigned to data channel 2, and message 4 and message 5 are assigned to data channel 1.
  • other parameters used to measure the communication quality of the data channel can be the transmission rate and scrambling rate.
  • the second electronic device determines the RTT between the second electronic device and the server. Then the first electronic device can be allowed to calculate and determine the RTT of the data channel 2 .
  • the second electronic device After a similar second electronic device determines other parameters for measuring the communication quality of the data channel between the second electronic device and the server, the second electronic device notifies the first of the parameters for measuring the communication quality between the second electronic device and the server. The electronic device, and in turn the first electronic device, determines the communication quality of the data channel 2 .
  • the first electronic device after receiving the parameters sent by the second electronic device for measuring the communication quality between the second electronic device and the server, the first electronic device can directly determine the data based on the parameters.
  • the communication quality of channel 2 does not take into account the impact of the connection between the first electronic device and the second electronic device on data channel 2.
  • the first electronic device can compare the reference signal power (reference signal receiving power, RSRP) and reference signal quality (reference signal receiving quality, RSRQ) of the cells corresponding to the two data channels.
  • received signal strength received signal strength indicator, RSSI
  • signal to interference plus noise ratio signal to interference plus noise ratio, SINR
  • channel quality channel quality indicator
  • the first electronic device determines a ratio of the communication quality of the two data channels based on the RSRP of cell 1 and the RSRP of cell 2. It can be understood that, after ignoring the influence between the first electronic device and the second electronic device, the ratio of the communication quality of the two data channels can be determined directly through the same type of parameters without the need for parameter conversion.
  • the first electronic device can also estimate the round-trip time delay (Round-Trip Time, RTT) of the two data channels or other parameters used to measure the communication quality of the data channels, and then select one of the two data channels.
  • RTT Round-Trip Time
  • Data channel with good communication quality For example, in the content shown in Figure 7C, after determining that the communication quality of data channel 2 is better than the communication quality of data channel 1, the first electronic device transfers message 1, message 2, message 3, message 4 and Telegram 5 is assigned to data channel 2.
  • the first electronic device when the first electronic device establishes connections with both the second electronic device and the third electronic device, there are at least three data channels between the first electronic device and the server, wherein the first electronic device is connected to at least three data channels.
  • the method of allocating data on the data channel please refer to the content shown in Figure 7A, Figure 7B and Figure 7C above, and will not be described again here.
  • the first electronic device when the first electronic device determines that the communication quality of data channel 2 is better than the communication quality of data channel 1, the first electronic device temporarily transmits the data to the second electronic device. Save, during the interaction process between the second electronic device and the server, after the second electronic device receives the retransmission message or the error message, the second electronic device notifies the first electronic device. After the first electronic device receives the notification, the first electronic device determines to resend the data on data channel 1. The second electronic device may or may not retransmit.
  • the first electronic device serves as the receiving end to compare and deduplicate the data received on different data channels, as shown in Figure 8A and Figure 8B.
  • 8A and 8B are an illustration of the first electronic device receiving data through two data channels according to the embodiment of the present application. Example diagram.
  • the times when the first electronic device receives message 1, message 2, message 3, message 4 and message 5 from data channel 1 are T1, T3, T7, T9 and T10 respectively;
  • the times when the first electronic device receives message 1, message 2, message 3, message 4 and message 5 from data channel 2 are T2, T4, T5, T6 and T8 respectively; then the first electronic device is After performing comparison and deduplication, message 1 is received at time T1, message 2 is received at time T3, message 3 is received at time T5, message 4 is received at time T6, and message is received at time T8. 5.
  • the first electronic device when the first electronic device determines that message 1 on data channel 1 or message 3 on data channel 2 is lost or has errors, it may not send a retransmission request to the server.
  • the data transmission rate of the first electronic device can be increased.
  • the second electronic device since the first electronic device will not stop receiving subsequent messages and request retransmission after determining that any message is lost or error-coded, the second electronic device will not stop receiving subsequent messages and request retransmission after determining that any message is lost or miscoded. After the message is lost or miscoded, it stops receiving subsequent messages and requires the server to retransmit, where the message is data for sending to the first electronic device.
  • the communication method provided by the embodiment of the present application can reduce the data transmission delay of the first electronic device and improve the robustness of the data transmission of the first electronic device.
  • the first electronic device can reduce the delay of data transmission and improve the robustness of data transmission through multiple data channels.
  • Figure 9A is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • S9A01 After determining that the first condition is met, the first electronic device displays the first interface, and the first interface is used to obtain user authorization.
  • the first condition can refer to the text description corresponding to Figure 4 above, and will not be described again here.
  • the first interface may be as shown in Figure 10A below.
  • FIG. 10A is an exemplary schematic diagram of the first interface displayed on the first electronic device in the transmission method provided by the embodiment of the present application.
  • the first electronic device displays window 1001.
  • the window 1001 includes the text "The current network is not good, whether to enable network acceleration mode", and also Including control 1002 and control 1003.
  • the text in window 1001 may also be other information used to prompt the user for authorization, which is not limited here.
  • window 1001 can also be other forms of controls, such as notifications.
  • the first electronic device determines to obtain the user's authorization and begins to perform subsequent steps; in response to receiving the user's click on the control 1002, the first electronic device determines that the user's authorization is not obtained and does not perform subsequent steps. steps.
  • the first electronic device when the first electronic device has not yet determined whether the first condition is met, in response to receiving the user's operation, the first electronic device determines to obtain the user's authorization and begins to perform subsequent operations. Steps, as shown in Figure 10B.
  • FIG. 10B is an exemplary schematic diagram in which the user instructs the first electronic device to perform a communication method according to an embodiment of the present application.
  • the interface displayed by the first electronic device changes from the main interface to the menu bar.
  • the operation may be a user's sliding operation, where the starting point of the sliding operation is the upper left corner of the screen.
  • the main interface displayed by the first electronic device is as shown in (A) in Figure 10B, and the menu bar displayed by the first electronic device is as shown in (B) in Figure 10B.
  • the menu bar displayed by the first electronic device includes control 1004.
  • the first electronic device determines that the user's authorization is obtained and begins to perform subsequent steps.
  • the operation in which the user clicks on the control 1003 or the control 1004 and other operations for triggering the first electronic device to start executing the communication method provided by the embodiment of the present application is called the first operation.
  • S9A02 The first electronic device discovers the second electronic device through broadcast.
  • S9A03 The first electronic device and the second electronic device exchange network parameters, and the first electronic device determines that the second electronic device meets the second condition.
  • S9A04 The first electronic device sends a first request, and the first request is used to establish a connection and enable the second electronic device to provide a network proxy for the first electronic device.
  • the first electronic device sends a first request to the second electronic device.
  • the network agent can refer to the text description corresponding to Figure 3A and Figure 3B above, and will not be described again here.
  • the first request also includes the identification of the first electronic device, and the identification of the first electronic device can be used to establish the connection in subsequent steps.
  • the identifier may be the MAC of the first electronic device.
  • the first request also includes the account logged in on the first electronic device, such as a Huawei account.
  • the first request may also include network proxy mode.
  • the network proxy mode can refer to the text description below and will not be described again here.
  • S9A05 The second electronic device displays the second interface, obtains the user's authorization and determines the network proxy mode.
  • the second electronic device After receiving the first request, the second electronic device displays the second interface.
  • the second interface is shown in Figure 11A and Figure 11B below.
  • 11A and 11B are an exemplary schematic diagram of the second interface displayed by the second electronic device in the communication method provided by the embodiment of the present application.
  • the second electronic device displays a window 1101 included in the second interface.
  • the window 1101 includes controls corresponding to different modes of the network proxy, such as a control 1102 corresponding to the extreme speed mode and a control 1103 corresponding to the balanced mode, and a control 1104 corresponding to rejecting network proxy authorization.
  • the text in window 1101 is "data network sharing mode".
  • the second electronic device determines to obtain the user's authorization.
  • the second electronic device determines that the network proxy mode is the extreme speed mode; in response to receiving the user clicking on the control 1103, the second electronic device determines that the network proxy mode is the balanced mode.
  • different network proxy modes may affect the type of connection between the first electronic device and the second electronic device. Or, optionally, in some embodiments of the present application, different network proxy modes may also affect the way the first electronic device sends data.
  • Table 1 is an exemplary schematic table of the correspondence between the network proxy mode and the type of connection and the way in which the first electronic device sends data provided by the embodiment of the present application.
  • the interface displayed by the second electronic device may also be as shown in Figure 11B.
  • the interface displayed by the second electronic device includes a window 1105 , where the window 1105 includes a control 1107 and a control 1106 .
  • the text in the window 1105 is: "Whether to share the data network to the first electronic device".
  • the second electronic device determines to obtain the user's authorization.
  • the second electronic device determines to obtain the user's authorization.
  • the second electronic device determines that the user is not authorized to network proxy.
  • the window 1108 includes controls corresponding to different modes of the network agent, such as a control 1109 corresponding to the extreme speed mode and a control 1110 corresponding to the balanced mode. Among them, the text included in window 1108 is: "data network sharing mode".
  • the second electronic device determines that the network proxy mode is the extreme speed mode; in response to receiving the user click on the control 1110, the second electronic device determines that the network proxy mode is the balanced mode.
  • the second electronic device when the first request also includes the account logged in on the first electronic device, and when the first electronic device and the second electronic device are electronic devices logged in with the same account or the account logged in on the first electronic device and the account logged in on the second electronic device belong to the same group (group) of users, such as a family group, the second electronic device has been authorized by the user by default. That is, the second electronic device only needs to confirm the network proxy mode to the user, or the second electronic device randomly selects the network proxy mode, or the second electronic device selects the default network proxy mode.
  • the second electronic device when the first request includes network proxy mode, the second electronic device only needs to obtain the user's authorization.
  • the way in which the second electronic device obtains the user's authorization is as shown in (A) in Figure 11B.
  • the second electronic device determines that the user's authorization has been obtained and the second electronic device determines the network proxy mode.
  • the second electronic device can also determine the upper limit of data traffic of the network proxy, as shown in Figure 11C.
  • FIG. 11C is an exemplary schematic diagram of the second electronic device determining the upper limit of data traffic in the communication method provided by the embodiment of the present application.
  • the interface displayed by the second electronic device includes a window 1111 , where the window 1111 includes controls 1112 , 1113 , and 1114 .
  • the text included in window 1111 is: "Data traffic limit for network proxy".
  • control 1112 corresponds to the upper limit of data traffic of the network proxy being 1GB
  • control 1113 corresponds to the upper limit of data traffic of the network proxy being 2GB
  • control 1114 is an input field used to obtain user input.
  • the second electronic device determines that the upper limit of data traffic of the network proxy is 1GB; or, in response to receiving the user clicking on the control 1113, the second electronic device determines that the upper limit of data traffic of the network proxy is 2GB; or, In response to receiving the user's input in the control 1114, the second electronic device determines that the data traffic limit of the network proxy is the user's input value.
  • the second electronic device when the account logged in by the first electronic device and the account logged in by the second electronic device are the same or belong to the same group, the second electronic device can directly determine the upper limit of data traffic of the network proxy. is a fixed value, which can be a preset value; alternatively, the second electronic device can directly determine that the upper limit of data flow of the network agent is infinite, that is, there is no upper limit of data flow of the network agent.
  • the second electronic device can also determine the SIM card used by the network agent, as shown in Figure 11D.
  • Figure 11D is an exemplary schematic diagram of the second electronic device determining the SIM card used by the network agent in the communication method provided by the embodiment of the present application.
  • the interface displayed by the second electronic device includes a window 1115 , where the window 1115 includes a control 1116 and a control 1117 .
  • the text included in window 1115 is: "SIM Card Used by Network Agent".
  • control 1116 corresponds to SIM card 1
  • SIM card 1 corresponds to operator 1
  • control 1117 corresponds to SIM card 2
  • SIM card 2 corresponds to operator 2.
  • the second electronic device determines that the SIM card of the network agent is SIM card 1; in response to receiving the user clicking on the control 1117, the second electronic device determines that the SIM card of the network agent is SIM card 2.
  • the second electronic device determines that the SIM card of the network agent is different from the SIM card currently used by the second electronic device
  • the second electronic device can switch SIM cards, or the second electronic device can use SIM card 1 and SIM card 2 at the same time through time division multiplexing or other methods.
  • S9A06 Determine the type of connection based on the network proxy mode and establish the connection.
  • the first electronic device or the second electronic device determines the type of connection based on the network proxy mode.
  • the network proxy mode For the corresponding relationship between the network proxy mode and the type of connection, please refer to the corresponding text description in Table 1 above, which will not be described again here.
  • the first electronic device and the second electronic device may display corresponding icons in the status bar (status bar) or notification bar, as shown in Figures 12A and 12B.
  • FIG. 12A and FIG. 12B are an exemplary schematic diagram of the interface of the first electronic device and/or the second electronic device provided by the embodiment of the present application.
  • the status bar of the first electronic device and/or the second electronic device includes an icon 1201, where the icon 1201 is used to identify that the first electronic device and/or the second electronic device establishes a connection, and the second electronic device is First Electronic Devices provides a network proxy.
  • the notification bar of the first electronic device and/or the second electronic device includes notification 1203, where the notification 1203 is used to identify the first electronic device and/or the second electronic device to establish a connection, and the second electronic device
  • the device provides a network proxy for the first electronic device.
  • the user can call out the notification bar by sliding down, and the starting point of the sliding operation is the upper left corner of the screen.
  • the notification bar includes notification 1202 and notification 1203.
  • FIG. 9B is another exemplary schematic diagram of the flow of the communication method provided by the embodiment of the present application.
  • S9B01 In the process of the second electronic device providing a network agent for the first electronic device, after the second electronic device meets the third condition, the SIM card is switched.
  • the quality of the cellular mobile communication of the second electronic device is lower than the quality threshold, it is determined that the third condition is met.
  • the method of measuring the quality of real-time cellular mobile communication please refer to the text description corresponding to Figure 3A above, and will not be described again here.
  • the third condition may also be: the traffic of the current SIM card of the first electronic device has been used up.
  • S9B02 The second electronic device suspends the network agent and sends updated network parameters to the first electronic device.
  • the second electronic device Since the second electronic device switches the SIM card, after the second electronic device suspends the network agent, it needs to send updated network parameters to the first electronic device.
  • the first electronic device may determine whether the second electronic device continues to provide a network agent based on the updated network parameters.
  • the second electronic device continues to provide a network agent for the first electronic device; in the case of the same operator, the cell switching strategy and/or access cell of the second electronic device is the same as that of the first electronic device.
  • the second electronic device continues to provide a network proxy for the first electronic device.
  • the second electronic device can continue to provide a network proxy for the first electronic device.
  • the second electronic device may continue to provide a network agent for the first electronic device.
  • the first electronic device can send an instruction to the second electronic device to instruct the second electronic device to change the cell switching strategy. Then, second The electronic device may continue to provide a network proxy to the first electronic device.
  • the first electronic device when the operator is the same and the access cell is the same, can send an instruction to the second electronic device to instruct the second electronic device to change the access cell.
  • the second electronic device can then continue to provide the network proxy for the first electronic device.
  • the first electronic device can send an instruction to the second electronic device to instruct the second electronic device to change the cell reselection strategy.
  • the second electronic device can then continue to provide the network proxy for the first electronic device.
  • the transmission method provided by this application is introduced from the perspective of electronic device interaction and human-computer interaction.
  • the transmission method provided by the embodiment of this application is introduced from the first electronic device side and the second electronic device side respectively.
  • the communication method provided by the embodiment of the present application is introduced from the side of the first electronic device.
  • Figure 13 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • S1301 The first electronic device determines whether the first condition is met or whether the user's first operation is received.
  • S1302 Discover the second electronic device through broadcast, and obtain the network parameters of the second electronic device.
  • the first electronic device determines whether the second electronic device meets the second condition based on the obtained network parameters.
  • step S1304 is executed.
  • S1304 Send the first request to the second electronic device and establish a connection with the second electronic device.
  • the first electronic device sends and receives data based on at least two data channels.
  • the first electronic device sends data of part of the application program through at least two data channels.
  • the data of the applications recorded in the whitelist can be sent through at least two data channels, that is, the data of the applications recorded in the whitelist can be sent through the network proxy provided by the second electronic device.
  • the whitelist can include browsers, music applications such as and Video applications such as and Among them, the blacklist can include payment applications such as and Voice communication applications such as wait.
  • the second electronic device provides a network proxy for the first electronic device, and the second electronic device does not For non-network devices, in order to fully protect the privacy and property security of the user of the first electronic device, the first electronic device prohibits sending data of applications in the blacklist or other than the whitelist to the second electronic device.
  • the communication method provided by the embodiment of the present application is introduced from the side of the second electronic device.
  • Figure 14 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • the broadcast is used to request the network parameters of the second electronic device, and the second electronic device sends the network parameters.
  • the second electronic device when it determines that it is in a weak network state or no network state, it may not respond to the broadcast.
  • the network parameters can refer to the text description corresponding to Figure 4 above, and will not be described again here.
  • S1402 The second electronic device receives the first request and determines whether the first request includes an account number and network proxy mode.
  • the second electronic device After receiving the first request, the second electronic device executes step S1403 if the first request includes the account number and the network proxy mode; if the first request does not include the account number and the network proxy mode, executes step S1404.
  • the second electronic device determines whether the account logged in on the second electronic device and the account in the first request are the same or belong to the same group.
  • step S1405 is executed; if the account logged in on the second electronic device is different from the account in the first request and does not belong to the same group. , then execute step S1404.
  • the second electronic device determines to obtain the user's authorization and determines the network proxy mode by referring to the text descriptions corresponding to FIG. 11A, FIG. 11B and FIG. 11C above, which will not be described again here.
  • S1405 The second electronic device directly determines the network proxy mode.
  • the first electronic device can directly determine the network proxy mode.
  • the second electronic device determines the type of connection based on the network proxy mode, establishes a connection with the first electronic device, and provides a network proxy for the first electronic device after the connection is established.
  • the above mainly introduces the communication method provided by the embodiment of the present application from the perspective of electronic equipment, the perspective of human-computer interaction, the first electronic device side, and the second electronic device side.
  • the communication method provided by the embodiment of the present application is introduced below with reference to specific scenarios.
  • Figure 15 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
  • the first electronic device After determining that the first condition is met, the first electronic device discovers the second electronic device through broadcast and obtains network parameters.
  • the first electronic device may send the request in the form of a broadcast, and after receiving the request, the second electronic device sends the network parameters to the first electronic device.
  • the second electronic device after receiving the request, sends parameters such as remaining traffic and power to the first electronic device.
  • the first electronic device may display an interface to display the discovered electronic devices to the user, as shown in FIG. 16 .
  • Figure 16 is an exemplary schematic diagram of an interface of a first electronic device provided by an embodiment of the present application.
  • the interface displayed on the first electronic device includes controls corresponding to different electronic devices.
  • the control 1601 corresponding to the fourth electronic device the control 1602 corresponding to the third electronic device, and the control 1603 corresponding to the second electronic device.
  • the first electronic device determines the second electronic device.
  • each control corresponding to an electronic device may also display information on a different electronic device.
  • the corresponding control of the electronic device may also display information such as the power of the electronic device and the operator.
  • a control 1604 and a control 1605 are displayed on the control 1603 .
  • the control 1604 displays the operator of the cellular mobile network connected to the second electronic device
  • the control 1605 displays the remaining traffic of the second electronic device.
  • the operator of the cellular mobile network accessed by the second electronic device is operator B, and the remaining traffic of the second electronic device is 115GB.
  • the first electronic device can send a query request to obtain the network parameters of the multiple electronic devices, and arrange different electronic devices according to the network parameters.
  • the priority of the network parameter arrangement from high to low can be: the operators of the accessed cellular networks are different, the operators of the accessed cellular networks are the same but the access cells are different, the operators of the accessed cellular networks are the same and the access cells are different, the operators of the accessed cellular networks are the same and the access cells are different. Entering the community is the same.
  • the first electronic device after discovering multiple electronic devices, in front of the display interface, can send an inquiry request to obtain the network parameters, remaining traffic, power, and other electronic devices of the multiple electronic devices.
  • the distance between the device and the first electronic device and other more parameters, and the controls corresponding to different electronic devices are arranged according to more parameters such as network parameters, remaining traffic, power, the distance between other electronic devices and the first electronic device, etc.
  • the sort order on the interface is an electronic device more suitable for improving the communication quality of the first electronic device.
  • S1503 The first electronic device establishes a connection with the second electronic device.
  • the first electronic device after the first electronic device establishes a connection with the second electronic device, the first electronic device obtains the network parameters of the second electronic device based on the connection. In this case, the network parameters of other electronic devices will not be displayed in the interface shown in FIG. 16 .
  • the first electronic device or the second electronic device can also determine the network proxy mode, and then determine the type of connection.
  • the second electronic device provides a network proxy for the first electronic device.
  • the network agent may refer to the text description corresponding to Figure 3A and Figure 3B above, and will not be described again here.
  • the first electronic device determines the cellular mobile communication network accessed by the first electronic device and the second electronic device.
  • the network operator is the same.
  • the first electronic device may determine that the operator of the cellular mobile communication network accessed by the first electronic device and the second electronic device is the same.
  • S1506 Optionally, send a second request, the second request is used to change the cell switching strategy and/or the cell reselection strategy, or the second request is used to indicate that the second electronic device accesses a cell different from the first electronic device accessing the cell. community.
  • the first electronic device may not send the second request.
  • the first electronic device may determine based on the connection that the cell switching strategy of the second electronic device is the same as the cell switching strategy of the first electronic device; or, the first electronic device may determine based on the connection that the cell switching strategy of the second electronic device is the same.
  • the cell reselection strategy of the second electronic device is the same as the cell reselection strategy of the first electronic device.
  • the first electronic device may send a second request to the second electronic device.
  • the second request is used to change the cell switching strategy and/or the cell reselection strategy, or the second request is used to instruct the second electronic device to access a cell that is different from the first electronic device's access cell.
  • the second electronic device and the first electronic device may exchange updated network parameters in real time.
  • the second electronic device after the first electronic device and the second electronic device establish a connection, notifies the first electronic device in real time after the network parameters change.
  • the cell switching strategy and/or the cell reselection strategy of the second electronic device are different.
  • the cell camping status of the first electronic device and the second electronic device is as shown in FIG. 17 .
  • Figure 17 is an exemplary schematic diagram of the cell camping situation of the first electronic device and the second electronic device in the transmission method provided by the embodiment of the present application.
  • the operators of the first electronic device and the second electronic device accessing the cellular mobile communication network are both operator 1, and the signal strength of the first electronic device and the second electronic device in the new cell is higher than the signal strength of the old cell.
  • the locations of the first electronic device and the second electronic device can be considered to be similar (the spatial distance between the first electronic device and the second electronic device is smaller than that of the first electronic device and the second electronic device at least an order of magnitude away from a base station or other type of wireless access point).
  • the cell reselection policy changes to the signal strength of the new cell being higher than the signal strength of the old cell Xdb, and then the second electronic device switches to the new cell.
  • X can take 0.5.
  • the cell camping situation of the first electronic device and the second electronic device is as shown in FIG. 17 .
  • the first electronic device and the second electronic device can determine that the signal strength of cell 1 is higher than the signal strength of cell 2; from time T1 to time T2, the first electronic device and the second electronic device can determine It is determined that the signal strength of cell 2 is higher than the signal strength of cell 1, but the signal strength of cell 2 is not higher than the signal strength of cell 1 by 0.5db; from time T2 to time T3, the first electronic device and the second electronic device can determine the cell The signal strength of 2 is 0.5db higher than the signal strength of cell 1; from time T3 to time T4, the first electronic device and the second electronic device can determine that the signal strength of cell 3 is higher than the signal strength of cell 2, and the signal strength of cell 3 Not higher than the signal strength of Cell 2 by 0.5db; after time T4, the first electronic device and the second electronic device can determine that the signal strength of Cell 3 is higher than the signal strength of Cell 2 by 0.5db.
  • both the first electronic device and the second electronic device reside in cell 1; from time T1 to time T2 At time, the first electronic device resides in cell 2, and the second electronic device resides in cell 1; from time T2 to time T3, the first electronic device and the second electronic device reside in cell 2; from time T3 to time T4 , the first electronic device is camped in cell 3, and the second electronic device is camped in cell 2; after time T4, the first electronic device and the second electronic device are camped in cell 3.
  • the second electronic device can also change the value of the parameter that affects the cell switching strategy reported to the base station or other types of wireless access points.
  • the parameters that affect the cell handover strategy such as the RSRP of the neighboring cell or the cell selection reception level value S rxlev , etc., are not limited here.
  • the first electronic device and the second electronic device will not be in the process of cell reselection or cell switching at the same time, thereby making
  • the first electronic device always has a data channel connected to the Internet most of the time, thereby ensuring the communication quality of the first electronic device and improving the robustness of the communication of the first electronic device; in addition, when the first electronic device is When the second electronic device provides a network agent, the communication quality of the second electronic device is also ensured and the robustness of the communication of the second electronic device is improved.
  • S1507 Optionally, send a third request.
  • the third request is used to instruct the second electronic device to switch SIM cards.
  • the first electronic device may also send a third request to instruct the second electronic device to switch the SIM card and then switch the operator of the cellular mobile communication network for the second electronic device to access.
  • the operator through which the second electronic device accesses the cellular mobile communication network after switching is different from the operator through which the first electronic device accesses the cellular mobile communication network.
  • the first electronic device sends and receives data based on at least two data channels.
  • the first electronic device after the first electronic device and the second electronic device establish a connection, the first electronic device indicates based on the rate of sending data on the data channel 2 and other parameters.
  • the peer electronic device changes the type of connection and reconnects.
  • the second electronic device can instruct the first electronic device to change the type of connection according to the rate of receiving data on data channel 2 and other parameters, and then re-establish connect.
  • FIG. 18 is an exemplary schematic diagram in which the first electronic device instructs the second electronic device to switch the type of connection establishment in the communication method provided by the embodiment of the present application.
  • S1801 The first electronic device determines that the communication quality of data channel 2 is lower than the threshold.
  • the first electronic device can determine the communication quality of the data channel 2 through various parameters.
  • the various parameters may include one or more of signal strength, delay, bit error rate, etc., which are not limited here.
  • the first electronic device may determine that the rate at which the application program on the first electronic device generates data is greater than the rate at which the first electronic device sends data on data channel 2, then the first electronic device determines that the communication quality of data channel 2 is lower than the threshold; Alternatively, the first electronic device may determine that there is backlog of data for sending on the data channel 2 in the network card buffer, and then the first electronic device determines that the communication quality of the data channel 2 is lower than the threshold.
  • the first electronic device sends a fourth request to the second electronic device.
  • the fourth request is used to instruct the second electronic device to change the connection type.
  • different types of connections can have different priorities. For example, the priority of 5G WiFi connection is greater than the priority of UWB connection, the priority of UWB connection is greater than the priority of 2.4G WiFi connection, and the priority of 2.4G WiFi connection is greater than the priority of Bluetooth connection.
  • the priority of the connection type after the change is higher than the priority of the connection type before the change.
  • S1803 The second electronic device sends a confirmation message to the first electronic device.
  • the second electronic device may send a confirmation message to the first electronic device, thereby notifying the first electronic device that the second electronic device is ready to switch the connection.
  • the confirmation message may also include parameters for re-establishing the connection.
  • S1804 The first electronic device and the second electronic device re-establish a connection.
  • the second electronic device can encapsulate the transmission data from the first electronic device as a transport layer message or an application layer message, and then obtain a physical layer message (network message), through cellular mobile communication sent by the network.
  • the second electronic device after receiving the data sent by the first electronic device through data channel 2, can modify the processing priority of the data, thereby allowing the second electronic device to modify the processing priority of the data.
  • the electronic device prioritizes processing of the data or delays processing of the data.
  • the priority is specified by the business or application program, and can also be called business priority.
  • the second electronic device may modify the priority of the data received from the first electronic device according to the network proxy mode. For example, when the network proxy mode is the extreme speed mode, the second electronic device will increase the priority of data from the first electronic device. For another example, when the network proxy mode is the balancing mode, the second electronic device may not change the priority of the data from the first electronic device, or lower the priority of the data from the first electronic device.
  • Figure 19 is an exemplary schematic diagram of a second electronic device modifying the priority of data sent by the first electronic device in the transmission method provided by the embodiment of the present application.
  • the music application sends business data to the protocol stack.
  • the protocol stack adds data with priority identification according to the standard protocol. Then the protocol stack sends the data with the priority identification to the wireless communication module.
  • the first electronic device sends the data to the second electronic device through the wireless communication module, and the second electronic device receives the data through the wireless communication module and sends the received data to the protocol stack.
  • the network proxy module can determine whether to modify the priority of data according to the network proxy mode.
  • the protocol stack can modify the priority of the data, thereby causing the data to enter the packet sending queue with a higher priority.
  • the wireless communication module and the mobile communication module can be referred to the text description corresponding to Figure 21 in the following text, and will not be described again here.
  • the first electronic device and the second electronic device are divided into eight priorities according to the RFC791 protocol.
  • the priority of the service data of the music application on the first electronic device and the second electronic device is 0.
  • the second electronic device will change the priority of the service data of the music application program sent by the first electronic device to 1 during the packaging process.
  • the second electronic device does not actually change the routing priority of the data, such as the field value of IP Precedence or DSCP, but performs encapsulation and allocates packet sending queues according to the modified priority. and/or send deliver.
  • the routing priority of the data such as the field value of IP Precedence or DSCP
  • the first electronic device and the second electronic device can agree on a low-latency service identification field on the application layer or other layers. This field is used to identify whether the data is low-latency service identification. Delay service data. After receiving the data, the second electronic device will determine whether the value of the low-latency service identification field of the data is the agreed value. If the second electronic device determines that the data is data for the low-latency service, it will process it with priority. Encapsulate, encapsulate, and send, thereby ensuring the communication quality of the first electronic device.
  • Figure 20 is another exemplary schematic diagram of the flow of a transmission method provided by an embodiment of the present application.
  • S2001 The first electronic device performs cell search/initial cell search and obtains SIB1 of all cells within the coverage range.
  • the first electronic device After the first electronic device is powered on, or after the first electronic device enters the cell coverage area from an area without cell coverage, or after the first electronic device determines that the communication quality of the currently accessed cell or other types of wireless access points is lower than a threshold. , the first electronic device performs cell search or initial cell search.
  • the first electronic device obtains the system information block (SIB) of all cells within the coverage area, such as SIB1, where SIB1 provides the electronic device with information about whether to allow access to this cell, that is, the public land mobile network (public land mobile network) mobile network (PLMN).
  • SIB system information block
  • PLMN public land mobile network
  • the first electronic device will only select the operator's frequency band corresponding to the SIM to perform cell search or initial cell search.
  • the failure to register the first electronic device in the core network does not include emergency registration.
  • the failure to register the first electronic device in the core network may be a failure in initial registration or mobility registration (periodic registration).
  • the failure to register the first electronic device in the core network may also be a failure to establish the PDU session.
  • the first electronic device determines that the first cell is selected based on the PLMN and the communication quality of the first cell is lower than the threshold; or the cell cannot be selected based on the PLMN; or the first cell is selected based on the PLMN, but the core network registration fails. , the first electronic device sends a broadcast to discover the second electronic device.
  • the first electronic device can determine whether the accessible PLMN list can be selected based on the list of accessible PLMNs and the PLMN of the cell discovered by the first electronic device. community.
  • S2003 The first electronic device and the second electronic device establish a connection, and the second electronic device provides a network proxy for the first electronic device.
  • the first electronic device sends and receives data based on at least two data channels.
  • the hardware structure of the first electronic device and the second electronic device may be the same, for convenience of explanation, the first electronic device and the second electronic device are referred to as electronic devices in the following text to facilitate an exemplary introduction of the hardware structures.
  • Figure 21 is an exemplary schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
  • the electronic device may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (personal digital assistant) assistant (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and/or smart devices City equipment, the embodiment of this application does not place special restrictions on the specific type of electronic equipment.
  • PDA personal digital assistant
  • AR augmented reality
  • VR virtual reality
  • AI artificial intelligence
  • wearable devices wearable devices
  • vehicle-mounted devices smart home devices and/or smart devices City equipment
  • the electronic device 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, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195, etc.
  • 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, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen
  • the sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute specific limitations on the electronic equipment.
  • the electronic device may include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces.
  • the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device.
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device.
  • the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationships between the modules illustrated in the embodiments of the present invention are only schematic illustrations and do not constitute structural limitations on the electronic equipment.
  • the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
  • the power management module 141 is used 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like.
  • the power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as Diversity antennas for wireless LANs. In other embodiments, antennas may be used in conjunction with tuning switches.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent 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.
  • the application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194.
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), and global navigation satellite systems for use in electronic devices. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates 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 through the antenna 2 for radiation.
  • the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device implements display functions through the GPU, display screen 194, and application processor.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used to display images, videos, etc.
  • Display 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, Quantum dot light emitting diodes (QLED), etc.
  • the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • the ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise and brightness. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
  • Camera 193 is used to capture still images or video.
  • the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital video.
  • Electronic devices may support one or more video codecs. In this way, electronic devices can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG)1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG Moving Picture Experts Group
  • MPEG2 MPEG2, MPEG3, MPEG4, etc.
  • NPU is a neural network (NN) computing processor.
  • NN neural network
  • Intelligent cognitive applications of electronic devices can be realized through NPU, such as image recognition, face recognition, speech recognition, text understanding, etc.
  • the internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
  • RAM random access memories
  • NVM non-volatile memories
  • Random access memory can include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.;
  • SRAM static random-access memory
  • DRAM dynamic random-access memory
  • SDRAM synchronous dynamic random-access memory
  • DDR SDRAM double data rate synchronous Dynamic random access memory
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • DDR5SDRAM double data rate synchronous dynamic random access memory
  • Non-volatile memory can include disk storage devices and flash memory.
  • Flash memory can be divided according to the operating principle to include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc.
  • the storage unit potential level it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), third-level storage unit (triple-level cell, TLC), fourth-level storage unit (quad-level cell, QLC), etc., which can include universal flash storage (English: universal flash storage, UFS) according to storage specifications. , embedded multi media card (embedded multi media Card, eMMC), etc.
  • the random access memory can be directly read and written by the processor 110, 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, etc.
  • the non-volatile memory can also store executable programs and user and application program data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.
  • the external memory interface 120 can be used to connect an external non-volatile memory to expand the storage capacity of the electronic device.
  • the external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, save music, video and other files in external non-volatile memory.
  • the electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the electronic device answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C.
  • the electronic device may be provided with at least one microphone 170C. In other embodiments, the electronic device may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the electronic device can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions, etc.
  • the headphone interface 170D is used to connect wired headphones.
  • the headphone interface 170D may be a USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA Cellular Telecommunications Industry Association of the USA
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A there are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
  • a capacitive pressure sensor may include at least two parallel plates of conductive material.
  • the electronic device detects the strength of the touch operation according to the pressure sensor 180A.
  • the electronic device may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B.
  • the gyro sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device shakes, and calculates the distance that the lens module needs to compensate based on the angle, so that the lens can offset the shake of the electronic device through reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • Air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • Magnetic sensor 180D includes a Hall sensor.
  • the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device may detect opening and closing of the flip according to the magnetic sensor 180D. Then, based on the detected opening and closing status of the leather case or the opening and closing status of the flip cover, features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the acceleration of the electronic device in various directions (generally three axes). When electronic equipment The magnitude and direction of gravity can be detected when the device is stationary. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
  • Distance sensor 180F for measuring distance.
  • Electronic devices can measure distance via infrared or laser. In some embodiments, when shooting a scene, the electronic device can utilize the distance sensor 180F to measure distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • Electronic devices emit infrared light through light-emitting diodes.
  • Electronic devices use photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
  • Electronic devices can use the proximity light sensor 180G to detect when the user holds the electronic device close to the ear and talk, so that the screen can be automatically turned off to save power.
  • the proximity light sensor 180G can also be used in holster mode, and pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device can adaptively adjust the brightness of the display screen 194 based on perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touching.
  • Fingerprint sensor 180H is used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to unlock fingerprints, access application locks, take photos with fingerprints, answer incoming calls with fingerprints, etc.
  • Temperature sensor 180J is used to detect temperature.
  • the electronic device uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device reduces the performance of a processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery 142 to prevent the low temperature from causing abnormal shutdown of the electronic device. In some other embodiments, when the temperature is lower than another threshold, the electronic device performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also known as "touch device”.
  • the touch sensor 180K can be disposed on the display screen 194.
  • the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K.
  • the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device at a location different from that of the display screen 194 .
  • Bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part.
  • the bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals.
  • the bone conduction sensor 180M can also be provided in an earphone and combined into a bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibrating bone obtained by the bone conduction sensor 180M to implement the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
  • the buttons 190 include a power button, a volume button, etc.
  • Key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback.
  • touch operations for different applications can correspond to different vibration feedback effects.
  • the motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 .
  • Different application scenarios such as time reminders, receiving information, alarm clocks, games, etc.
  • the touch vibration feedback effect can also be customized.
  • the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation from the electronic device.
  • the electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • Electronic devices interact with the network through SIM cards to implement functions such as calls and data communications.
  • the electronic device uses an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
  • Software systems of electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.
  • the embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.
  • Figure 22 is an exemplary schematic diagram of the software architecture of the electronic device provided by the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has clear roles and division of labor.
  • the layers communicate through software interfaces.
  • the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application framework layer provides an application programming interface (API) and programming framework for applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer can include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
  • a 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, capture the screen, etc.
  • Content providers are used to store and retrieve data and make this data accessible to applications.
  • Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, etc.
  • a view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
  • Telephone managers are used to provide communication functions of electronic devices. For example, call status management (including connected, hung up, etc.).
  • the resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
  • the application layer and application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and application framework layer into binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
  • System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
  • the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
  • 2D Graphics Engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • FIG. 23 is an exemplary schematic diagram of data flow in a system including a first electronic device and a second electronic device provided by an embodiment of the present application.
  • the data channel 1 on the first electronic device is: the data of the application program on the first electronic device can send the data to the mobile communication module through the network proxy module, and then the mobile communication module sends the data to the base station, and then the base station Forwarded to server.
  • the data channel 2 on the first electronic device is: the data of the application program on the first electronic device can send the data to the wireless communication module through the network proxy module, and then send the data to the second electronic device; the second electronic device After receiving the data, the wireless communication module can send the data to the mobile communication module and then to the base station, which then forwards it to the server.
  • the network proxy module can be used to determine whether the data is sent on data channel 1 or data channel 2, as shown in Figures 7A to 7C.
  • the network proxy module can also be used to instruct the protocol stack how to encapsulate the data to be sent, as shown in Figures 6A to 6C.
  • the network proxy module can also be used to determine the network proxy mode, and then instruct the wireless communication module what type of connection to establish with the wireless communication module of the peer electronic device.
  • the network proxy module can also be used to modify the priority of the data sent by the first electronic device, thereby instructing the protocol stack to preferentially encapsulate or decapsulate the data.
  • the network proxy module can also be used to perform deduplication and merging on the received data.
  • the network proxy module can also be used to determine the traffic used, and prohibit the use of data channel 2 to send data after the traffic usage reaches the traffic upper limit.
  • the term “when” may be interpreted to mean “if" or “after” or “in response to determining" or “in response to detecting" depending on the context.
  • the phrase “when determining" or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined" or “in response to determining" or “on detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
  • the computer program product includes one or more computer instructions.
  • 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 or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted over a wired connection from a website, computer, server, or data center (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.

Abstract

The present application relates to the technical field of electronics, and discloses a communication method, an electronic device, and a system. The communication method provided in the present application comprises: when the Internet surfing quality of an electronic device of a user is poor, finding other electronic devices in the neighborhood and establishing a connection, and surfing the Internet by means of cellular mobile communication functions of said electronic devices. By means of the method, users can still obtain good Internet surfing experience in scenes such as high-speed rails and crowded areas.

Description

通信方法、电子设备以及系统Communication methods, electronic devices and systems
本申请要求于2022年04月21日提交中国专利局、申请号为202210425390.1、申请名称为“一种网络接入方法和电子设备”以及于2022年07月14日提交中国专利局、申请号为202210827794.3、申请名称为“通信方法、电子设备以及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the China Patent Office on April 21, 2022, with the application number 202210425390.1, and the application name is "A network access method and electronic device" and to be submitted to the China Patent Office on July 14, 2022, with the application number 202210827794.3, the priority of the Chinese patent application titled "Communication Method, Electronic Device and System", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及通信方法、电子设备以及系统。The present application relates to the field of communication technology, and in particular to communication methods, electronic devices and systems.
背景技术Background technique
随着电子技术的发展,具备上网能力的电子设备,如手机、手表等电子设备越来越多的参与到消费者的日常使用中。其中,对于使用蜂窝移动通信方式上网的电子设备来说,电子设备的数据流量业务是否稳定受到基站的分布、运营商的调度等多种因素影响。例如,在当可服务电子设备的基站数量较少或者电子设备位于小区(cell)边缘的情况下,电子设备的上网速率不稳定,导致用户浏览网页加载时间长、视频或语音通话卡顿,用户体验不佳。With the development of electronic technology, electronic devices with Internet access capabilities, such as mobile phones, watches and other electronic devices, are increasingly involved in consumers' daily use. Among them, for electronic devices that use cellular mobile communication to access the Internet, whether the data traffic business of the electronic device is stable is affected by many factors such as the distribution of base stations and the scheduling of operators. For example, when the number of base stations that can serve electronic devices is small or the electronic devices are located at the edge of a cell, the Internet access rate of electronic devices is unstable, resulting in long loading times for users to browse web pages, lags in video or voice calls, and user Not a good experience.
发明内容Contents of the invention
本申请公开了通信方法、电子设备以及系统,涉及电子技术领域。本申请提供的通信方法包括:当用户的电子设备处于上网质量较差的情况下,可以发现周边的其他电子设备并建立连接,并通过其他电子设备的蜂窝移动通信功能上网。通过这种方法,用户在高铁、人流密集区域等场景下仍然能够获得良好的上网体验。This application discloses communication methods, electronic devices and systems, and relates to the field of electronic technology. The communication method provided by this application includes: when the user's electronic device is in a situation where the Internet quality is poor, it can discover other surrounding electronic devices and establish a connection, and access the Internet through the cellular mobile communication function of other electronic devices. Through this method, users can still get a good Internet experience in scenarios such as high-speed trains and densely populated areas.
第一方面,本申请实施例提供一种通信方法,应用于包括第一电子设备和第二电子设备的系统,该方法包括:在该第一电子设备的网络状态在第一状态的情况下,该第一电子设备与该第二电子设备交换网络参数,该网络参数包括第一运营商的标识和/或第二运营商的标识,该第一电子设备的接入的蜂窝移动通信网络的运营商为该第一运营商,该第二电子设备的接入的蜂窝移动通信网络的运营商为该第二运营商;在该第一运营商与该第二运营商不同的情况下,该第一电子设备与该第二电子设备建立第一连接;该第一电子设备通过该第一连接向该第二电子设备发送第一数据;该第二电子设备转发该第一数据至服务器。In a first aspect, embodiments of the present application provide a communication method, applied to a system including a first electronic device and a second electronic device. The method includes: when the network status of the first electronic device is in the first state, The first electronic device exchanges network parameters with the second electronic device. The network parameters include the identity of the first operator and/or the identity of the second operator. The operation of the cellular mobile communication network to which the first electronic device is accessed The operator is the first operator, and the operator of the cellular mobile communication network accessed by the second electronic device is the second operator; if the first operator and the second operator are different, the third operator An electronic device establishes a first connection with the second electronic device; the first electronic device sends first data to the second electronic device through the first connection; and the second electronic device forwards the first data to the server.
在上述实施例中,第一电子设备在第一状态的情况下,可以主动发现运营商不同的第二电子设备,并与第二电子设备建立连接,在建立连接后,由第二电子设备为第一电子设备提供网络代理,由于第一电子设备和第二电子设备的运营商不同,则第二电子设备和第一电子设备的通信质量同时都差的概率很小,这样第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。其中,第一数据可以为应用发送的数据字段,即可以不包括协议规定的协议字段。In the above embodiment, when the first electronic device is in the first state, it can actively discover the second electronic device with a different operator and establish a connection with the second electronic device. After the connection is established, the second electronic device The first electronic device provides a network agent. Since the operators of the first electronic device and the second electronic device are different, the probability that the communication quality of the second electronic device and the first electronic device are both poor at the same time is very small. In this way, the first electronic device always It is possible to maintain a better communication quality, thereby improving the online experience of users of the first electronic device. The first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
结合第一方面的一些实施例,在一些实施例中,在该第一运营商与该第二运营商相同并且第一接入小区和第二接入小区不同的情况下,该第一电子设备与该第二电子设备建立该第一连接,该网络参数包括该第一接入小区的标识和/或该第二接入小区的标识,该第一接入小 区为该第一电子设备的接入小区,该第二接入小区为该第二电子设备的接入小区。In conjunction with some embodiments of the first aspect, in some embodiments, when the first operator and the second operator are the same and the first access cell and the second access cell are different, the first electronic device The first connection is established with the second electronic device. The network parameters include the identity of the first access cell and/or the identity of the second access cell. The first access cell The area is the access cell of the first electronic device, and the second access cell is the access cell of the second electronic device.
在上述实施例中,第一电子设备在第一状态的情况下,可以主动发现接入小区不同的第二电子设备,并与第二电子设备建立连接,在建立连接后,由第二电子设备为第一电子设备提供网络代理,由于第一电子设备和第二电子设备的接入小区不同,则第二电子设备和第一电子设备的通信质量同时都差的概率很小,这样第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device is in the first state, it can actively discover a second electronic device connected to a different cell and establish a connection with the second electronic device. After the connection is established, the second electronic device Provide a network agent for the first electronic device. Since the access cells of the first electronic device and the second electronic device are different, the probability of the communication quality of the second electronic device and the first electronic device being both poor at the same time is very small. In this way, the first electronic device The device can always maintain a better communication quality, thus improving the online experience of users of the first electronic device.
结合第一方面的一些实施例,在一些实施例中,在该第一运营商与该第二运营商相同并且第一小区切换策略和第二小区切换策略不同的情况下,该网络参数包括该第一小区切换策略的标识和/或该第二小区切换策略的标识,该第一小区切换策略为该第一电子设备的小区切换策略,该第二小区切换策略为该第二电子设备的小区切换策略。In conjunction with some embodiments of the first aspect, in some embodiments, when the first operator and the second operator are the same and the first cell switching strategy and the second cell switching strategy are different, the network parameters include the The identifier of the first cell switching strategy and/or the identifier of the second cell switching strategy. The first cell switching strategy is the cell switching strategy of the first electronic device, and the second cell switching strategy is the cell of the second electronic device. Switch strategy.
在上述实施例中,由于两个电子设备的小区切换策略不同,那么两个电子设备应该不会同时切换小区,避免切换小区的过程中断网;或者,由于两个电子设备的小区切换策略不同,那么总是一个电子设备切的快,一个电子设备切得稳,切得稳的电子设备为两个电子设备的网络的通信质量兜底,切得快的电子设备有更大的几率可以发现通信质量的小区。In the above embodiment, because the cell switching strategies of the two electronic devices are different, the two electronic devices should not switch cells at the same time to avoid interrupting the network during the cell switching process; or, because the cell switching strategies of the two electronic devices are different, Then there is always one electronic device that switches quickly, and another electronic device that switches stably. The electronic device that switches stably provides the bottom line for the communication quality of the network between the two electronic devices. The electronic device that switches quickly has a greater chance of detecting the communication quality. community.
结合第一方面的一些实施例,在一些实施例中,在该第一运营商与该第二运营商相同并且第一小区重选策略和第二小区重选策略不同的情况下,该网络参数包括该第一小区重选策略的标识和/或该第二小区重选策略的标识,该第一小区重选策略为该第一电子设备的小区重选策略,该第二小区重选策略为该第二电子设备的小区重选策略。In conjunction with some embodiments of the first aspect, in some embodiments, when the first operator and the second operator are the same and the first cell reselection strategy and the second cell reselection strategy are different, the network parameter Including an identifier of the first cell reselection strategy and/or an identifier of the second cell reselection strategy, the first cell reselection strategy is the cell reselection strategy of the first electronic device, and the second cell reselection strategy is The cell reselection strategy of the second electronic device.
在上述实施例中,由于两个电子设备的小区重选策略不同,那么两个电子设备应该不会同时重选小区,避免重选小区的过程中断网;或者,由于两个电子设备的小区重选策略不同,那么总是一个电子设备切的快,一个电子设备切得稳,切得稳的电子设备为两个电子设备的网络的通信质量兜底,切得快的电子设备有更大的几率可以发现通信质量的小区。In the above embodiment, since the cell reselection strategies of the two electronic devices are different, the two electronic devices should not reselect cells at the same time to avoid interrupting the network during the cell reselection process; or, due to the cell reselection strategies of the two electronic devices, If the selection strategies are different, then one electronic device will switch quickly and the other electronic device will switch stably. The electronic device with stable switching will guarantee the communication quality of the network between the two electronic devices. The electronic device with fast switching will have a greater chance. Cells with good communication quality can be discovered.
结合第一方面的一些实施例,在一些实施例中,在第一账户和第二账户相同的情况下,或者,在该第一账户和该第二账户属于同一组的情况下,该第一电子设备与该第二电子设备建立第一连接,该第一账户为第一电子设备上登录的账户,该第二账户为第二电子设备上登录的账户。In conjunction with some embodiments of the first aspect, in some embodiments, when the first account and the second account are the same, or when the first account and the second account belong to the same group, the first account The electronic device establishes a first connection with the second electronic device, the first account is an account logged in on the first electronic device, and the second account is an account logged in on the second electronic device.
在上述实施例中,当两个电子设备的账户相同的情况下,或者在两个电子设备属于同一组的情况下,两个电子设备建立连接,第一电子设备可以通过多径算法取得收益,提升网络的通信质量。In the above embodiment, when the accounts of two electronic devices are the same, or when the two electronic devices belong to the same group, the two electronic devices establish a connection, and the first electronic device can obtain benefits through the multi-path algorithm, Improve the communication quality of the network.
结合第一方面的一些实施例,在一些实施例中,该第一状态包括该第一电子设备的蜂窝移动通信质量低于阈值、该第一电子设备在核心网注册失败、该第一电子设备位于预设区域、该第一电子设备的速度大于阈值、该第一电子设备的蜂窝移动通信网络欠费或该第一电子设备的移动通信网络为无服务中的一种或多种。With reference to some embodiments of the first aspect, in some embodiments, the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
结合第一方面的一些实施例,在一些实施例中,在该第一电子设备与该第二电子设备建立第一连接前,该方法还包括:该第一电子设备和/或该第二电子设备确定网络代理模式,该网络代理模式用于确定该第一连接的类型。With reference to some embodiments of the first aspect, in some embodiments, before the first electronic device establishes the first connection with the second electronic device, the method further includes: the first electronic device and/or the second electronic device The device determines a network proxy mode, which is used to determine the type of the first connection.
在上述实施例中,第一电子设备和/或第二电子设备还可以确定网络代理的模式,进而选择更合适的第一连接的类型,一方面避免通信资源的浪费,另一方面保证第一电子设备和第二电子设备之间的数据传输速率满足第一电子设备的需求。In the above embodiment, the first electronic device and/or the second electronic device can also determine the mode of the network proxy, and then select a more appropriate type of first connection. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures the first connection. The data transmission rate between the electronic device and the second electronic device meets the requirements of the first electronic device.
结合第一方面的一些实施例,在一些实施例中,在该网络代理模式为第一模式的情况下,该第一连接为2.4G WiFi连接;在该网络代理模式为第二模式的情况下,该第一连接为5G WiFi 连接。With reference to some embodiments of the first aspect, in some embodiments, when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode , the first connection is 5G WiFi connect.
结合第一方面的一些实施例,在一些实施例中,在该网络代理模式从该第一模式变为该第二模式后,该第一连接从2.4G WiFi连接变为5G WiFi连接。Combined with some embodiments of the first aspect, in some embodiments, after the network proxy mode changes from the first mode to the second mode, the first connection changes from a 2.4G WiFi connection to a 5G WiFi connection.
结合第一方面的一些实施例,在一些实施例中,该第一电子设备在第二数据通道上接收到该服务器发送的第二数据,该第一数据通道为该第一电子设备的蜂窝移动通信功能提供的;该第一电子设备接收该第二数据后,向该第二电子设备发送该第一指示,该第一指示用于指示该第一电子设备已经接收到该第二数据,该第一指示中包括第一序号,该第一序号为该第二数据的TCP序号或该第二数据的数据段中的序号;该第二电子设备在接收到该第二数据后不向该第一电子设备发送该第二数据。In conjunction with some embodiments of the first aspect, in some embodiments, the first electronic device receives the second data sent by the server on a second data channel, the first data channel being a cellular mobile device of the first electronic device. The communication function is provided; after receiving the second data, the first electronic device sends the first instruction to the second electronic device. The first instruction is used to indicate that the first electronic device has received the second data. The first instruction includes a first sequence number, which is the TCP sequence number of the second data or the sequence number in the data segment of the second data; the second electronic device does not send a request to the third data after receiving the second data. An electronic device sends the second data.
在上述实施例中,第一电子设备和第二电子设备可以协作对接收到的数据进行去重,当第一电子设备通过本身的蜂窝移动网络已经接收到某个数据后,则可以指示第二电子设备不发送该数据至第一电子设备,减少第一电子设备和第二电子设备的开销。In the above embodiment, the first electronic device and the second electronic device can cooperate to deduplicate the received data. When the first electronic device has received certain data through its own cellular mobile network, it can instruct the second electronic device to deduplicate the received data. The electronic device does not send the data to the first electronic device, thereby reducing the overhead of the first electronic device and the second electronic device.
第二方面,本申请实施例提供一种通信方法,应用于包括第一电子设备和第二电子设备的系统,该方法包括:在该第一电子设备的网络状态在第一状态的情况下,该第一电子设备与该第二电子设备建立第一连接;在第一情况下,该第一电子设备向该第二电子设备发送第一指示,该第一指示用于指示第二电子设备切换运营商,其中,在该第一情况下,第一运营商与第二运营商相同,该第一电子设备的接入的蜂窝移动通信网络的运营商为该第一运营商,该第二电子设备接入的蜂窝移动通信网络的运营商为该第二运营商;该第二电子设备接收到该第一指示后切换运营商;该第一电子设备通过该第一连接向该第二电子设备发送第一数据;该第二电子设备转发该第一数据至服务器。In a second aspect, embodiments of the present application provide a communication method, applied to a system including a first electronic device and a second electronic device. The method includes: when the network status of the first electronic device is in the first state, The first electronic device establishes a first connection with the second electronic device; in the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device to switch Operator, wherein in the first case, the first operator and the second operator are the same, the operator of the cellular mobile communication network to which the first electronic device accesses is the first operator, and the second electronic device The operator of the cellular mobile communication network that the device accesses is the second operator; the second electronic device switches operators after receiving the first instruction; the first electronic device communicates with the second electronic device through the first connection. Send the first data; the second electronic device forwards the first data to the server.
在上述实施例中,在第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变运营商,进而使得第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。其中,第一数据可以为应用发送的数据字段,即可以不包括协议规定的协议字段。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the operator, so that the first electronic device can always maintain a Better communication quality, thereby improving the online experience of users of the first electronic device. The first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
结合第二方面的一些实施例,在一些实施例中,在第二情况下,该第一电子设备向该第二电子设备发送第二指示,该第二指示用于指示该第二电子设备改变小区切换策略;该第二电子设备接收到该第二指示后改变小区切换策略,其中,在该第二情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第二情况不同;其中,在该第二电子设备改变小区切换策略后,第二电子设备的小区切换策略与该第一电子设备的小区切换策略不同。In conjunction with some embodiments of the second aspect, in some embodiments, in the second situation, the first electronic device sends a second instruction to the second electronic device, the second instruction is used to instruct the second electronic device to change Cell switching strategy; the second electronic device changes the cell switching strategy after receiving the second instruction, wherein in the second case, the first operator is the same as the second operator, and the first case is the same as the second operator. The second situation is different; wherein, after the second electronic device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
在上述实施例中,在第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变小区切换策略,进而使得第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell switching strategy, so that the first electronic device can always maintain A better communication quality, thereby improving the online experience of users of the first electronic device.
结合第二方面的一些实施例,在一些实施例中,该方法还包括:在第三情况下,该第一电子设备向该第二电子设备发送第三指示,该第三指示用于指示该第二电子设备改变小区重选策略;该第二电子设备接收到该第三指示后改变小区重选策略,其中,在该第三情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第三情况不同;其中,在该第二电子设备改变小区重选策略后,该第二电子设备的小区重选策略与该第一电子设备的小区重选策略不同。In conjunction with some embodiments of the second aspect, in some embodiments, the method further includes: in a third situation, the first electronic device sends a third instruction to the second electronic device, the third instruction is used to instruct the The second electronic device changes the cell reselection strategy; the second electronic device changes the cell reselection strategy after receiving the third instruction, wherein, in the third case, the first operator is the same as the second operator, And the first situation is different from the third situation; wherein, after the second electronic device changes the cell reselection strategy, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
在上述实施例中,在第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变小区重选策略,进而使得第一电子设备总是可以保持 一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell reselection strategy, so that the first electronic device can always Keep A better communication quality, thereby improving the online experience of users of the first electronic device.
结合第二方面的一些实施例,在一些实施例中,该方法还包括:在第四情况下,该第一电子设备向该第二电子设备发送第四指示,该第四指示用于指示该第二电子设备改变接入小区;该第二电子设备接收到该第三指示后改变接入小区,其中,在该第四情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第四情况不同;其中,在该第二电子设备改变接入小区后,该第二电子设备的接入小区与该第一电子设备的接入小区不同。In conjunction with some embodiments of the second aspect, in some embodiments, the method further includes: in a fourth situation, the first electronic device sends a fourth instruction to the second electronic device, the fourth instruction is used to instruct the The second electronic device changes the access cell; the second electronic device changes the access cell after receiving the third indication, wherein, in the fourth case, the first operator is the same as the second operator, and the The first situation is different from the fourth situation; wherein, after the second electronic device changes the access cell, the access cell of the second electronic device is different from the access cell of the first electronic device.
在上述实施例中,在第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变接入小区,进而使得第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the access cell, so that the first electronic device can always maintain A better communication quality, thereby improving the online experience of users of the first electronic device.
结合第二方面的一些实施例,在一些实施例中,该第一状态包括该第一电子设备的蜂窝移动通信质量低于阈值、该第一电子设备在核心网注册失败、该第一电子设备位于预设区域、该第一电子设备的速度大于阈值、该第一电子设备的蜂窝移动通信网络欠费或该第一电子设备的移动通信网络为无服务中的一种或多种。Combined with some embodiments of the second aspect, in some embodiments, the first state includes the cellular mobile communication quality of the first electronic device being lower than a threshold, the first electronic device failing to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
结合第二方面的一些实施例,在一些实施例中,该第一电子设备和/或该第二电子设备确定网络代理模式,该网络代理模式为该第一电子设备通过该第二电子设备访问互联网中的服务器的模式,该网络代理模式用于确定该第一连接的类型;在该网络代理模式为第一模式的情况下,该第一连接为2.4G WiFi连接;在该网络代理模式为第二模式的情况下,该第一连接为5G WiFi连接。In conjunction with some embodiments of the second aspect, in some embodiments, the first electronic device and/or the second electronic device determines a network proxy mode, and the network proxy mode is accessed by the first electronic device through the second electronic device. The mode of the server in the Internet, the network proxy mode is used to determine the type of the first connection; when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is In the case of the second mode, the first connection is a 5G WiFi connection.
在上述实施例中,第一电子设备和/或第二电子设备还可以确定网络代理的模式,进而选择更合适的第一连接的类型,一方面避免通信资源的浪费,另一方面保证第一电子设备和第二电子设备之间的数据传输速率满足第一电子设备的需求。In the above embodiment, the first electronic device and/or the second electronic device can also determine the mode of the network proxy, and then select a more appropriate type of first connection. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures the first connection. The data transmission rate between the electronic device and the second electronic device meets the requirements of the first electronic device.
结合第二方面的一些实施例,在一些实施例中,在该网络代理模式从该第一模式变为该第二模式后,该第一连接的类型从2.4G WiFi变为5G WiFi。Combined with some embodiments of the second aspect, in some embodiments, after the network proxy mode changes from the first mode to the second mode, the type of the first connection changes from 2.4G WiFi to 5G WiFi.
结合第二方面的一些实施例,在一些实施例中,该第一电子设备在第二数据通道上接收到该服务器发送的第二数据,该第一数据通道为该第一电子设备的蜂窝移动通信功能提供的;该第一电子设备接收该第二数据后,向该第二电子设备发送该第一指示,该第一指示用于指示该第一电子设备已经接收到该第二数据,该第一指示中包括第一序号,该第一序号为该第二数据的TCP序号或该第二数据的数据段中的序号;该第二电子设备在接收到该第二数据后不向该第一电子设备发送该第二数据。In conjunction with some embodiments of the second aspect, in some embodiments, the first electronic device receives the second data sent by the server on a second data channel, and the first data channel is a cellular mobile device of the first electronic device. The communication function is provided; after receiving the second data, the first electronic device sends the first instruction to the second electronic device. The first instruction is used to indicate that the first electronic device has received the second data. The first instruction includes a first sequence number, which is the TCP sequence number of the second data or the sequence number in the data segment of the second data; the second electronic device does not send a request to the third data after receiving the second data. An electronic device sends the second data.
在上述实施例中,第一电子设备和第二电子设备可以协作对接收到的数据进行去重,当第一电子设备通过本身的蜂窝移动网络已经接收到某个数据后,则可以指示第二电子设备不发送该数据至第一电子设备,减少第一电子设备和第二电子设备的开销。In the above embodiment, the first electronic device and the second electronic device can cooperate to deduplicate the received data. When the first electronic device has received certain data through its own cellular mobile network, it can instruct the second electronic device to deduplicate the received data. The electronic device does not send the data to the first electronic device, thereby reducing the overhead of the first electronic device and the second electronic device.
第三方面,本申请实施例提供了一种通信方法,该方法包括:在该第一电子设备的网络状态在第一状态的情况下,该第一电子设备获取该第二电子设备的网络参数,该网络参数包括第二运营商的标识,该第一电子设备的接入的蜂窝移动通信网络的运营商为第一运营商,该第二电子设备的接入的蜂窝移动通信网络的运营商为该第二运营商;在该第一运营商与该第二运营商不同的情况下,该第一电子设备建立第一连接,该第一连接用于连接至该第二电子设备;该第一电子设备通过该第一连接向该第二电子设备发送第一数据,该第一数据用于被该第二电子设备转发至服务器。 In a third aspect, embodiments of the present application provide a communication method. The method includes: when the network status of the first electronic device is in the first state, the first electronic device obtains the network parameters of the second electronic device. , the network parameters include the identification of the second operator, the operator of the cellular mobile communication network to which the first electronic device is connected is the first operator, and the operator of the cellular mobile communication network to which the second electronic device is connected is be the second operator; in the case where the first operator is different from the second operator, the first electronic device establishes a first connection, and the first connection is used to connect to the second electronic device; the third An electronic device sends first data to the second electronic device through the first connection, and the first data is used to be forwarded to the server by the second electronic device.
在上述实施例中,第一电子设备在第一状态的情况下,可以主动发现运营商不同的第二电子设备,并与第二电子设备建立连接,在建立连接后,由第二电子设备为第一电子设备提供网络代理,由于第一电子设备和第二电子设备的运营商不同,则第二电子设备和第一电子设备的通信质量同时都差的概率很小,这样第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。其中,第一数据可以为应用发送的数据字段,即可以不包括协议规定的协议字段。In the above embodiment, when the first electronic device is in the first state, it can actively discover the second electronic device with a different operator and establish a connection with the second electronic device. After the connection is established, the second electronic device The first electronic device provides a network agent. Since the operators of the first electronic device and the second electronic device are different, the probability that the communication quality of the second electronic device and the first electronic device are both poor at the same time is very small. In this way, the first electronic device always It is possible to maintain a better communication quality, thereby improving the online experience of users of the first electronic device. The first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
结合第三方面的一些实施例,在一些实施例中,在该第一运营商与该第二运营商相同并且第一接入小区和第二接入小区不同的情况下,该第一电子设备与该第二电子设备建立该第一连接,该网络参数包括该第一接入小区的标识和/或该第二接入小区的标识,该第一接入小区为该第一电子设备的接入小区,该第二接入小区为该第二电子设备的接入小区。With reference to some embodiments of the third aspect, in some embodiments, when the first operator and the second operator are the same and the first access cell and the second access cell are different, the first electronic device The first connection is established with the second electronic device. The network parameters include the identifier of the first access cell and/or the identifier of the second access cell. The first access cell is the interface of the first electronic device. The second access cell is the access cell of the second electronic device.
在上述实施例中,第一电子设备在第一状态的情况下,可以主动发现接入小区不同的第二电子设备,并与第二电子设备建立连接,在建立连接后,由第二电子设备为第一电子设备提供网络代理,由于第一电子设备和第二电子设备的接入小区不同,则第二电子设备和第一电子设备的通信质量同时都差的概率很小,这样第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device is in the first state, it can actively discover a second electronic device connected to a different cell and establish a connection with the second electronic device. After the connection is established, the second electronic device Provide a network agent for the first electronic device. Since the access cells of the first electronic device and the second electronic device are different, the probability of the communication quality of the second electronic device and the first electronic device being both poor at the same time is very small. In this way, the first electronic device The device can always maintain a better communication quality, thus improving the online experience of users of the first electronic device.
结合第三方面的一些实施例,在一些实施例中,在该第一运营商与该第二运营商相同并且第一小区切换策略和第二小区切换策略不同的情况下,该网络参数包括该第一小区切换策略的标识和/或该第二小区切换策略的标识,该第一小区切换策略为该第一电子设备的小区切换策略,该第二小区切换策略为该第二电子设备的小区切换策略。In conjunction with some embodiments of the third aspect, in some embodiments, when the first operator and the second operator are the same and the first cell switching strategy and the second cell switching strategy are different, the network parameters include the The identifier of the first cell switching strategy and/or the identifier of the second cell switching strategy. The first cell switching strategy is the cell switching strategy of the first electronic device, and the second cell switching strategy is the cell of the second electronic device. Switch strategy.
在上述实施例中,由于两个电子设备的小区切换策略不同,那么两个电子设备应该不会同时切换小区,避免切换小区的过程中断网;或者,由于两个电子设备的小区切换策略不同,那么总是一个电子设备切的快,一个电子设备切得稳,切得稳的电子设备为两个电子设备的网络的通信质量兜底,切得快的电子设备有更大的几率可以发现通信质量的小区。In the above embodiment, because the cell switching strategies of the two electronic devices are different, the two electronic devices should not switch cells at the same time to avoid interrupting the network during the cell switching process; or, because the cell switching strategies of the two electronic devices are different, Then there is always one electronic device that switches quickly, and another electronic device that switches stably. The electronic device that switches stably provides the bottom line for the communication quality of the network between the two electronic devices. The electronic device that switches quickly has a greater chance of detecting the communication quality. community.
结合第三方面的一些实施例,在一些实施例中,在该第一运营商与该第二运营商相同并且第一小区重选策略和第二小区重选策略不同的情况下,该网络参数包括该第一小区重选策略的标识和/或该第二小区重选策略的标识,该第一小区重选策略为该第一电子设备的小区重选策略,该第二小区重选策略为该第二电子设备的小区重选策略。Combined with some embodiments of the third aspect, in some embodiments, when the first operator and the second operator are the same and the first cell reselection strategy and the second cell reselection strategy are different, the network parameter Including an identifier of the first cell reselection strategy and/or an identifier of the second cell reselection strategy, the first cell reselection strategy is the cell reselection strategy of the first electronic device, and the second cell reselection strategy is The cell reselection strategy of the second electronic device.
在上述实施例中,由于两个电子设备的小区重选策略不同,那么两个电子设备应该不会同时重选小区,避免重选小区的过程中断网;或者,由于两个电子设备的小区重选策略不同,那么总是一个电子设备切的快,一个电子设备切得稳,切得稳的电子设备为两个电子设备的网络的通信质量兜底,切得快的电子设备有更大的几率可以发现通信质量的小区。In the above embodiment, since the cell reselection strategies of the two electronic devices are different, the two electronic devices should not reselect cells at the same time to avoid interrupting the network during the cell reselection process; or, due to the cell reselection strategies of the two electronic devices, If the selection strategies are different, then one electronic device will switch quickly and the other electronic device will switch stably. The electronic device with stable switching will guarantee the communication quality of the network between the two electronic devices. The electronic device with fast switching will have a greater chance. Cells with good communication quality can be discovered.
结合第三方面的一些实施例,在一些实施例中,在该第一账户和该第二账户相同的情况下,或者在该第一账户和该第二账户属于同一组的情况下,该第一电子设备与该第二电子设备建立第一连接,该第一账户为第一电子设备上登录的账户,该第二账户为第二电子设备上登录的账户。In conjunction with some embodiments of the third aspect, in some embodiments, when the first account and the second account are the same, or when the first account and the second account belong to the same group, the first account An electronic device establishes a first connection with the second electronic device, the first account is an account logged in on the first electronic device, and the second account is an account logged in on the second electronic device.
在上述实施例中,当两个电子设备的账户相同的情况下,或者在两个电子设备属于同一组的情况下,两个电子设备建立连接,第一电子设备可以通过多径算法取得收益,提升网络的通信质量。In the above embodiment, when the accounts of two electronic devices are the same, or when the two electronic devices belong to the same group, the two electronic devices establish a connection, and the first electronic device can obtain benefits through the multi-path algorithm, Improve the communication quality of the network.
结合第三方面的一些实施例,在一些实施例中,该第一状态包括该第一电子设备的蜂窝移动通信质量低于阈值、该第一电子设备在核心网注册失败、该第一电子设备位于预设区域、该第一电子设备的速度大于阈值、该第一电子设备的蜂窝移动通信网络欠费或该第一电子设 备的移动通信网络为无服务中的一种或多种。Combined with some embodiments of the third aspect, in some embodiments, the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the first electronic device One or more of the mobile communication networks provided are unserviceable.
结合第三方面的一些实施例,在一些实施例中,在该第一电子设备建立第一连接前,该方法还包括:该第一电子设备确定网络代理模式,该网络代理模式用于确定该第一连接的类型;在该网络代理模式为第一模式的情况下,该第一连接为2.4G WiFi连接;在该网络代理模式为第二模式的情况下,该第一连接为5G WiFi连接。With reference to some embodiments of the third aspect, in some embodiments, before the first electronic device establishes the first connection, the method further includes: the first electronic device determines a network proxy mode, and the network proxy mode is used to determine the The type of the first connection; when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode, the first connection is a 5G WiFi connection .
在上述实施例中,第一电子设备还可以确定网络代理的模式,进而选择更合适的第一连接的类型,一方面避免通信资源的浪费,另一方面保证第一电子设备和第二电子设备之间的数据传输速率满足第一电子设备的需求。In the above embodiment, the first electronic device can also determine the mode of the network proxy, and then select a more appropriate first connection type. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures that the first electronic device and the second electronic device The data transfer rate between them meets the needs of the first electronic device.
第四方面,本申请实施例提供了一种通信方法,应用于第一电子设备,该方法包括:在该第一电子设备的网络状态在第一状态的情况下,该第一电子设备建立第一连接,该第一连接用于连接至该第二电子设备;在第一情况下,该第一电子设备向该第二电子设备发送第一指示,该第一指示用于指示第二电子设备切换运营商,其中,在该第一情况下,第一运营商与第二运营商相同,该第一电子设备的接入的蜂窝移动通信网络的运营商为该第一运营商,该第二电子设备接入的蜂窝移动通信网络的运营商为该第二运营商;该第一电子设备通过该第一连接向该第二电子设备发送第一数据,该第一数据用于被该第二电子设备转发至服务器。In a fourth aspect, embodiments of the present application provide a communication method applied to a first electronic device. The method includes: when the network status of the first electronic device is in the first state, the first electronic device establishes a third A connection, the first connection is used to connect to the second electronic device; in the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device Switching operators, wherein in the first case, the first operator is the same as the second operator, the operator of the cellular mobile communication network accessed by the first electronic device is the first operator, and the second operator The operator of the cellular mobile communication network accessed by the electronic device is the second operator; the first electronic device sends first data to the second electronic device through the first connection, and the first data is used by the second electronic device. The electronic device is forwarded to the server.
在上述实施例中,在第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变运营商,进而使得第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。其中,第一数据可以为应用发送的数据字段,即可以不包括协议规定的协议字段。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the operator, so that the first electronic device can always maintain a Better communication quality, thereby improving the online experience of users of the first electronic device. The first data may be a data field sent by the application, that is, it may not include a protocol field specified by the protocol.
结合第四方面的一些实施例,在一些实施例中,该方法还包括:在第二情况下,该第一电子设备向该第二电子设备发送第二指示,该第二指示用于指示该第二电子设备改变小区切换策略;其中,在该第二情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第二情况不同;其中,在该第二电子设备改变小区切换策略后,第二电子设备的小区切换策略与该第一电子设备的小区切换策略不同。In conjunction with some embodiments of the fourth aspect, in some embodiments, the method further includes: in the second situation, the first electronic device sends a second instruction to the second electronic device, the second instruction is used to instruct the The second electronic device changes the cell switching strategy; wherein, in the second case, the first operator is the same as the second operator, and the first case is different from the second case; wherein, in the second electronic device After the device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
在上述实施例中,在第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变小区切换策略,进而使得第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell switching strategy, so that the first electronic device can always maintain A better communication quality, thereby improving the online experience of users of the first electronic device.
结合第四方面的一些实施例,在一些实施例中,在第三情况下,该第一电子设备向该第二电子设备发送第三指示,该第三指示用于指示该第二电子设备改变小区重选策略;其中,在该第三情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第三情况不同;其中,在该第二电子设备改变小区重选策略后,该第二电子设备的小区重选策略与该第一电子设备的小区重选策略不同。In conjunction with some embodiments of the fourth aspect, in some embodiments, in the third situation, the first electronic device sends a third instruction to the second electronic device, the third instruction is used to instruct the second electronic device to change Cell reselection strategy; wherein, in the third situation, the first operator is the same as the second operator, and the first situation is different from the third situation; wherein, when the second electronic device changes the cell reselection After the strategy is selected, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
在上述实施例中,在第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变小区重选策略,进而使得第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the cell reselection strategy, so that the first electronic device can always Maintain a better communication quality, thereby improving the online experience of users of the first electronic device.
结合第四方面的一些实施例,在一些实施例中,在第四情况下,该第一电子设备向该第二电子设备发送第四指示,该第四指示用于指示该第二电子设备改变接入小区;其中,在该第四情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第四情况不同;其中,在该第二电子设备改变接入小区后,该第二电子设备的接入小区与该第一电子设备的接入小区不同。 In conjunction with some embodiments of the fourth aspect, in some embodiments, in the fourth situation, the first electronic device sends a fourth instruction to the second electronic device, the fourth instruction is used to instruct the second electronic device to change Access a cell; wherein, in the fourth case, the first operator is the same as the second operator, and the first case is different from the fourth case; wherein, when the second electronic device changes the access cell Finally, the access cell of the second electronic device is different from the access cell of the first electronic device.
在上述实施例中,第一电子设备已经确定由第二电子设备提供网络代理的情况下,第一电子设备可以指示第二电子设备改变接入小区,进而使得第一电子设备总是可以保持一个较好的通信质量,进而提升第一电子设备的用户的上网体验。In the above embodiment, when the first electronic device has determined that the second electronic device provides a network agent, the first electronic device can instruct the second electronic device to change the access cell, so that the first electronic device can always maintain a Better communication quality, thereby improving the online experience of users of the first electronic device.
结合第四方面的一些实施例,在一些实施例中,该第一状态包括该第一电子设备的蜂窝移动通信质量低于阈值、该第一电子设备在核心网注册失败、该第一电子设备位于预设区域、该第一电子设备的速度大于阈值、该第一电子设备的蜂窝移动通信网络欠费或该第一电子设备的移动通信网络为无服务中的一种或多种。With reference to some embodiments of the fourth aspect, in some embodiments, the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
结合第四方面的一些实施例,在一些实施例中,在该第一电子设备建立第一连接前,该方法还包括:该第一电子设备确定网络代理模式,该网络代理模式为该第一电子设备通过该第二电子设备访问互联网中的服务器的模式,该网络代理模式用于确定该第一连接的类型;在该网络代理模式为第一模式的情况下,该第一连接为2.4G WiFi连接;在该网络代理模式为第二模式的情况下,该第一连接为5G WiFi连接。With reference to some embodiments of the fourth aspect, in some embodiments, before the first electronic device establishes the first connection, the method further includes: the first electronic device determines a network proxy mode, and the network proxy mode is the first electronic device. A mode in which an electronic device accesses a server in the Internet through the second electronic device, and the network proxy mode is used to determine the type of the first connection; when the network proxy mode is the first mode, the first connection is 2.4G WiFi connection; when the network proxy mode is the second mode, the first connection is a 5G WiFi connection.
在上述实施例中,第一电子设备还可以确定网络代理的模式,进而选择更合适的第一连接的类型,一方面避免通信资源的浪费,另一方面保证第一电子设备和第二电子设备之间的数据传输速率满足第一电子设备的需求。In the above embodiment, the first electronic device can also determine the mode of the network proxy, and then select a more appropriate first connection type. On the one hand, it avoids the waste of communication resources, and on the other hand, it ensures that the first electronic device and the second electronic device The data transfer rate between them meets the needs of the first electronic device.
第五方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行:在该第一电子设备的网络状态在第一状态的情况下,该第一电子设备获取该第二电子设备的网络参数,该网络参数包括第二运营商的标识,该第一电子设备的接入的蜂窝移动通信网络的运营商为第一运营商,该第二电子设备的接入的蜂窝移动通信网络的运营商为该第二运营商;在该第一运营商与该第二运营商不同的情况下,该第一电子设备建立第一连接,该第一连接用于连接至该第二电子设备;该第一电子设备通过该第一连接向该第二电子设备发送第一数据,该第一数据用于被该第二电子设备转发至服务器。In a fifth aspect, embodiments of the present application provide an electronic device. The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, The computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the electronic device to execute: when the network status of the first electronic device is in the first state, the first electronic device obtains the Network parameters of the second electronic device. The network parameters include the identification of the second operator. The operator of the cellular mobile communication network accessed by the first electronic device is the first operator. The operator of the cellular mobile communication network accessed by the second electronic device is the first operator. The operator of the cellular mobile communication network is the second operator; when the first operator is different from the second operator, the first electronic device establishes a first connection, and the first connection is used to connect to the a second electronic device; the first electronic device sends first data to the second electronic device through the first connection, and the first data is used to be forwarded to the server by the second electronic device.
结合第五方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:在该第一运营商与该第二运营商相同并且第一接入小区和第二接入小区不同的情况下,该第一电子设备与该第二电子设备建立该第一连接,该网络参数包括该第一接入小区的标识和/或该第二接入小区的标识,该第一接入小区为该第一电子设备的接入小区,该第二接入小区为该第二电子设备的接入小区。In conjunction with some embodiments of the fifth aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: when the first operator and the second operator are the same And when the first access cell and the second access cell are different, the first electronic device establishes the first connection with the second electronic device, and the network parameters include the identification of the first access cell and/or the An identifier of the second access cell, the first access cell is the access cell for the first electronic device, and the second access cell is the access cell for the second electronic device.
结合第五方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:在该第一运营商与该第二运营商相同并且第一小区切换策略和第二小区切换策略不同的情况下,该网络参数包括该第一小区切换策略的标识和/或该第二小区切换策略的标识,该第一小区切换策略为该第一电子设备的小区切换策略,该第二小区切换策略为该第二电子设备的小区切换策略。In conjunction with some embodiments of the fifth aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: when the first operator and the second operator are the same And when the first cell switching strategy and the second cell switching strategy are different, the network parameters include the identification of the first cell switching strategy and/or the identification of the second cell switching strategy, and the first cell switching strategy is the third cell switching strategy. A cell switching strategy of an electronic device, and the second cell switching strategy is a cell switching strategy of the second electronic device.
结合第五方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:在该第一运营商与该第二运营商相同并且第一小区重选策略和第二小区重选策略不同的情况下,该网络参数包括该第一小区重选策略的标识和/或该第二小区重选策略的标识,该第一小区重选策略为该第一电子设备的小区重选策略,该第二小区重选策略为该第二电子设备的小区重选策略。In conjunction with some embodiments of the fifth aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: when the first operator and the second operator are the same And when the first cell reselection strategy and the second cell reselection strategy are different, the network parameters include the identifier of the first cell reselection strategy and/or the identifier of the second cell reselection strategy, and the first cell reselection strategy The selection strategy is a cell reselection strategy of the first electronic device, and the second cell reselection strategy is a cell reselection strategy of the second electronic device.
结合第五方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计 算机指令以使得该电子设备执行:在该第一账户和该第二账户相同的情况下,或者在该第一账户和该第二账户属于同一组的情况下,该第一电子设备与该第二电子设备建立第一连接,该第一账户为第一电子设备上登录的账户,该第二账户为第二电子设备上登录的账户。In conjunction with some embodiments of the fifth aspect, in some embodiments, the one or more processors are also used to call the computer Computer instructions are provided to cause the electronic device to execute: in the case where the first account and the second account are the same, or in the case where the first account and the second account belong to the same group, the first electronic device and the The second electronic device establishes a first connection, the first account is an account logged in on the first electronic device, and the second account is an account logged in on the second electronic device.
结合第五方面的一些实施例,在一些实施例中,该第一状态包括该第一电子设备的蜂窝移动通信质量低于阈值、该第一电子设备在核心网注册失败、该第一电子设备位于预设区域、该第一电子设备的速度大于阈值、该第一电子设备的蜂窝移动通信网络欠费或该第一电子设备的移动通信网络为无服务中的一种或多种。Combined with some embodiments of the fifth aspect, in some embodiments, the first state includes that the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device fails to register in the core network, the first electronic device Located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the mobile communication network of the first electronic device is out of service.
结合第五方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:该第一电子设备确定网络代理模式,该网络代理模式用于确定该第一连接的类型;在该网络代理模式为第一模式的情况下,该第一连接为2.4G WiF i连接;在该网络代理模式为第二模式的情况下,该第一连接为5G WiFi连接。In conjunction with some embodiments of the fifth aspect, in some embodiments, the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: the first electronic device determines the network agent mode, and the network agent The mode is used to determine the type of the first connection; when the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode, the third connection One connection is a 5G WiFi connection.
第六方面,本申请实施例提供了一种电子设备,该电子设备包括:一个或多个处理器和存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该电子设备执行:在该第一电子设备的网络状态在第一状态的情况下,该第一电子设备建立第一连接,该第一连接用于连接至该第二电子设备;在第一情况下,该第一电子设备向该第二电子设备发送第一指示,该第一指示用于指示第二电子设备切换运营商,其中,在该第一情况下,第一运营商与第二运营商相同,该第一电子设备的接入的蜂窝移动通信网络的运营商为该第一运营商,该第二电子设备接入的蜂窝移动通信网络的运营商为该第二运营商;该第一电子设备通过该第一连接向该第二电子设备发送第一数据,该第一数据用于被该第二电子设备转发至服务器。In a sixth aspect, embodiments of the present application provide an electronic device. The electronic device includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, The computer program code includes computer instructions, which are invoked by the one or more processors to cause the electronic device to execute: when the network status of the first electronic device is in the first state, the first electronic device establishes a third A connection, the first connection is used to connect to the second electronic device; in the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device Switching operators, wherein in the first case, the first operator is the same as the second operator, the operator of the cellular mobile communication network accessed by the first electronic device is the first operator, and the second operator The operator of the cellular mobile communication network accessed by the electronic device is the second operator; the first electronic device sends first data to the second electronic device through the first connection, and the first data is used by the second electronic device. The electronic device is forwarded to the server.
结合第六方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:在第二情况下,该第一电子设备向该第二电子设备发送第二指示,该第二指示用于指示该第二电子设备改变小区切换策略;其中,在该第二情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第二情况不同;其中,在该第二电子设备改变小区切换策略后,第二电子设备的小区切换策略与该第一电子设备的小区切换策略不同。In conjunction with some embodiments of the sixth aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: In the second case, the first electronic device sends a request to the The second electronic device sends a second instruction, the second instruction is used to instruct the second electronic device to change the cell switching strategy; wherein, in the second case, the first operator is the same as the second operator, and the The first situation is different from the second situation; wherein, after the second electronic device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
结合第六方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:在第三情况下,该第一电子设备向该第二电子设备发送第三指示,该第三指示用于指示该第二电子设备改变小区重选策略;其中,在该第三情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第三情况不同;其中,在该第二电子设备改变小区重选策略后,该第二电子设备的小区重选策略与该第一电子设备的小区重选策略不同。In conjunction with some embodiments of the sixth aspect, in some embodiments, the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: In the third case, the first electronic device sends a request to the The second electronic device sends a third instruction, the third instruction is used to instruct the second electronic device to change the cell reselection strategy; wherein, in the third case, the first operator is the same as the second operator, and The first situation is different from the third situation; wherein, after the second electronic device changes the cell reselection strategy, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
结合第六方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:在第四情况下,该第一电子设备向该第二电子设备发送第四指示,该第四指示用于指示该第二电子设备改变接入小区;其中,在该第四情况下,该第一运营商与该第二运营商相同,并且该第一情况与该第四情况不同;其中,在该第二电子设备改变接入小区后,该第二电子设备的接入小区与该第一电子设备的接入小区不同。In conjunction with some embodiments of the sixth aspect, in some embodiments, the one or more processors are also used to call the computer instructions to cause the electronic device to execute: In the fourth case, the first electronic device sends a request to the The second electronic device sends a fourth instruction, which is used to instruct the second electronic device to change the access cell; wherein, in the fourth case, the first operator is the same as the second operator, and the The first situation is different from the fourth situation; wherein, after the second electronic device changes the access cell, the access cell of the second electronic device is different from the access cell of the first electronic device.
结合第六方面的一些实施例,在一些实施例中,该第一状态包括该第一电子设备的蜂窝移动通信质量低于阈值、该第一电子设备在核心网注册失败、该第一电子设备位于预设区域、该第一电子设备的速度大于阈值、该第一电子设备的蜂窝移动通信网络欠费或该第一电子设 备的移动通信网络为无服务中的一种或多种。Combined with some embodiments of the sixth aspect, in some embodiments, the first state includes the cellular mobile communication quality of the first electronic device being lower than a threshold, the first electronic device failing to register in the core network, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears, or the first electronic device One or more of the mobile communication networks provided are unserviceable.
结合第六方面的一些实施例,在一些实施例中,该一个或多个处理器,还用于调用该计算机指令以使得该电子设备执行:该第一电子设备确定网络代理模式,该网络代理模式为该第一电子设备通过该第二电子设备访问互联网中的服务器的模式,该网络代理模式用于确定该第一连接的类型;在该网络代理模式为第一模式的情况下,该第一连接为2.4G WiFi连接;在该网络代理模式为第二模式的情况下,该第一连接为5G WiFi连接。In conjunction with some embodiments of the sixth aspect, in some embodiments, the one or more processors are also configured to call the computer instructions to cause the electronic device to execute: the first electronic device determines the network agent mode, and the network agent The mode is a mode in which the first electronic device accesses a server in the Internet through the second electronic device, and the network proxy mode is used to determine the type of the first connection; when the network proxy mode is the first mode, the third The first connection is a 2.4G WiFi connection; when the network proxy mode is the second mode, the first connection is a 5G WiFi connection.
第七方面,本申请实施例提供了一种芯片系统,该芯片系统应用于电子设备,该芯片系统包括一个或多个处理器,该处理器用于调用计算机指令以使得该电子设备执行如第五方面、第六方面、第五方面中任一可能的实现方式以及第六方面中任一可能的实现方式描述的方法。In a seventh aspect, embodiments of the present application provide a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the processor is used to call computer instructions to cause the electronic device to execute the fifth step. aspect, the sixth aspect, any possible implementation manner of the fifth aspect, and the method described in any possible implementation manner of the sixth aspect.
第八方面,本申请实施例提供一种包含指令的计算机程序产品,当上述计算机程序产品在电子设备上运行时,使得上述电子设备执行如第五方面、第六方面、第五方面中任一可能的实现方式以及第六方面中任一可能的实现方式描述的方法。In an eighth aspect, embodiments of the present application provide a computer program product containing instructions. When the computer program product is run on an electronic device, the electronic device causes the electronic device to execute any one of the fifth aspect, the sixth aspect, and the fifth aspect. Possible implementations and the method described in any possible implementation in the sixth aspect.
第九方面,本申请实施例提供一种计算机可读存储介质,包括指令,当上述指令在电子设备上运行时,使得上述电子设备执行如第五方面、第六方面、第五方面中任一可能的实现方式以及第六方面中任一可能的实现方式描述的方法。In a ninth aspect, embodiments of the present application provide a computer-readable storage medium, including instructions. When the instructions are run on an electronic device, the electronic device causes the electronic device to execute any one of the fifth aspect, the sixth aspect, and the fifth aspect. Possible implementations and the method described in any possible implementation in the sixth aspect.
可以理解地,上述第五方面提供的电子设备、第六方面提供的电子设备、第七方面提供的芯片系统、第八方面提供的计算机程序产品和第九方面提供的计算机存储介质均用于执行本申请实施例所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。It can be understood that the electronic device provided by the fifth aspect, the electronic device provided by the sixth aspect, the chip system provided by the seventh aspect, the computer program product provided by the eighth aspect and the computer storage medium provided by the ninth aspect are all used to execute The method provided by the embodiment of this application. Therefore, the beneficial effects it can achieve can be referred to the beneficial effects in the corresponding methods, and will not be described again here.
附图说明Description of the drawings
图1A和图1B为本申请实施例提供的通信方法使用场景的一个示例性示意图。FIG. 1A and FIG. 1B are an exemplary schematic diagram of a usage scenario of the communication method provided by the embodiment of the present application.
图2为本申请实施例提供的SIM卡切换方法的一个示例性示意图。Figure 2 is an exemplary schematic diagram of a SIM card switching method provided by an embodiment of the present application.
图3A和图3B为本申请实施例提供的通信方法的适用场景一个示例性示意图。FIG. 3A and FIG. 3B are exemplary schematic diagrams of applicable scenarios of the communication method provided by the embodiment of the present application.
图4为本申请实施例提供的通信方法的方法流程的一个示例性示意图。FIG. 4 is an exemplary schematic diagram of the method flow of the communication method provided by the embodiment of the present application.
图5A和图5B为本申请实施例提供的第一电子设备上两个数据通道的一个示例性示意图。FIG. 5A and FIG. 5B are an exemplary schematic diagram of two data channels on the first electronic device provided by the embodiment of the present application.
图6A、图6B、图6C为本申请提供的第一电子设备通过的数据通道2发送数据的一个示例性示意图。FIG. 6A, FIG. 6B, and FIG. 6C are an exemplary schematic diagram of the data channel 2 through which the first electronic device provided by this application transmits data.
图7A、图7B、图7C为本申请实施例提供的第一电子设备通过两个数据通道发送数据的一个示例性示意图。FIG. 7A, FIG. 7B, and FIG. 7C are an exemplary schematic diagram of the first electronic device sending data through two data channels according to the embodiment of the present application.
图8A和图8B为本申请实施例提供的第一电子设备通过两个数据通道接收数据的一个示例性示意图。8A and 8B are an exemplary schematic diagram of the first electronic device receiving data through two data channels according to the embodiment of the present application.
图9A为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 9A is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
图9B为本申请实施例提供的通信方法的流程的另一个示例性示意图。FIG. 9B is another exemplary schematic diagram of the flow of the communication method provided by the embodiment of the present application.
图10A为本申请实施例提供的传输方法中第一电子设备上显示的第一界面的一个示例性示意图。 FIG. 10A is an exemplary schematic diagram of the first interface displayed on the first electronic device in the transmission method provided by the embodiment of the present application.
图10B为本申请实施例提供的用户指示第一电子设备执行通信方法的一个示例性示意图。FIG. 10B is an exemplary schematic diagram in which the user instructs the first electronic device to perform a communication method according to an embodiment of the present application.
图11A、图11B为本申请实施例提供的通信方法中的第二电子设备显示第二界面的一个示例性示意图。11A and 11B are an exemplary schematic diagram of the second interface displayed by the second electronic device in the communication method provided by the embodiment of the present application.
图11C为本申请实施例提供的通信方法中第二电子设备确定数据流量上限的一个示例性示意图。FIG. 11C is an exemplary schematic diagram of the second electronic device determining the upper limit of data traffic in the communication method provided by the embodiment of the present application.
图11D为本申请实施例提供的通信方法中第二电子设备确定网络代理使用的SIM卡的一个示例性示意图。Figure 11D is an exemplary schematic diagram of the second electronic device determining the SIM card used by the network agent in the communication method provided by the embodiment of the present application.
图12A和图12B为本申请实施例提供的第一电子设备和/或第二电子设备的界面的一个示例性示意图。FIG. 12A and FIG. 12B are an exemplary schematic diagram of the interface of the first electronic device and/or the second electronic device provided by the embodiment of the present application.
图13为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 13 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
图14为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 14 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
图15为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 15 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
图16为本申请实施例提供的第一电子设备的界面的一个示例性示意图。Figure 16 is an exemplary schematic diagram of an interface of a first electronic device provided by an embodiment of the present application.
图17为本申请实施例提供的传输方法中第一电子设备和第二电子设备的小区驻留情况的一个示例性示意图。Figure 17 is an exemplary schematic diagram of the cell camping situation of the first electronic device and the second electronic device in the transmission method provided by the embodiment of the present application.
图18为本申请实施例提供的通信方法中第一电子设备指示第二电子设备切换建立连接的类型的一个示例性示意图。FIG. 18 is an exemplary schematic diagram in which the first electronic device instructs the second electronic device to switch the type of connection establishment in the communication method provided by the embodiment of the present application.
图19为本申请实施例提供的传输方法中第二电子设备修改第一电子设备发送的数据的优先级的一个示例性示意图。Figure 19 is an exemplary schematic diagram of a second electronic device modifying the priority of data sent by the first electronic device in the transmission method provided by the embodiment of the present application.
图20为本申请实施例提供的传输方法的流程的另一个示例性示意图。Figure 20 is another exemplary schematic diagram of the flow of a transmission method provided by an embodiment of the present application.
图21为本申请实施例提供的电子设备的硬件结构的一个示例性示意图。Figure 21 is an exemplary schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
图22为本申请实施例提供的电子设备的软件架构的一个示例性示意图。Figure 22 is an exemplary schematic diagram of the software architecture of the electronic device provided by the embodiment of the present application.
图23为本申请实施例提供的包括第一电子设备和第二电子设备的系统中的数据流动的一个示例性示意图。FIG. 23 is an exemplary schematic diagram of data flow in a system including a first electronic device and a second electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“该”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "the", "above", "the" and "the" are intended to also include Plural expressions unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used in this application refers to and includes any and all possible combinations of one or more of the listed items.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms “first” and “second” are used for descriptive purposes only and shall not be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, “plurality” The meaning is two or more.
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指 采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。The term "user interface (UI)" in the following embodiments of this application is a media interface for interaction and information exchange between an application or operating system and a user. It realizes the difference between the internal form of information and the form acceptable to the user. conversion between. The user interface is source code written in specific computer languages such as Java and extensible markup language (XML). The interface source code is parsed and rendered on the electronic device, and finally presented as content that the user can recognize. The commonly used form of user interface is graphical user interface (GUI), which refers to A graphical user interface related to computer operation. It can be text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements displayed on the display screen of an electronic device.
图1A和图1B为本申请实施例提供的通信方法使用场景的一个示例性示意图。FIG. 1A and FIG. 1B are an exemplary schematic diagram of a usage scenario of the communication method provided by the embodiment of the present application.
如图1A所示,SIM卡为运营商1的第一电子设备在移动过程中,依次分别经过三个小区的覆盖区域,分别小区1、小区2和小区3。其中,小区1的运营商为运营商1;小区2的运营商为运营商2;小区3的运营商为运营商1。其中,SIM卡为运营商1的第一电子设备是指第一电子设备接入的蜂窝移动通信网络的运营商为运营商1。As shown in Figure 1A, the SIM card is the first electronic device of operator 1. During the movement, it passes through the coverage areas of three cells, namely cell 1, cell 2 and cell 3 respectively. Among them, the operator of cell 1 is operator 1; the operator of cell 2 is operator 2; and the operator of cell 3 is operator 1. Wherein, the first electronic device whose SIM card is operator 1 means that the operator of the cellular mobile communication network accessed by the first electronic device is operator 1.
其中,小区1的覆盖范围与小区2的覆盖范围有重叠,小区2的覆盖范围与小区3的覆盖范围有重叠,小区1的覆盖范围与小区3的覆盖范围没有重叠。Among them, the coverage range of cell 1 overlaps with the coverage range of cell 2, the coverage range of cell 2 overlaps with the coverage range of cell 3, and the coverage range of cell 1 does not overlap with the coverage range of cell 3.
第一电子设备在小区1的覆盖范围内与接入小区1;在第一电子设备移动出小区1后,并且位于小区2的覆盖范围内的情况下,由于SIM卡对应的运营商与小区2对应的运营商2不匹配,第一电子设备没有接入小区2,此时第一电子设备断开网络,即不能连接到核心网;然后在第一电子设备移动出小区2并且位于小区3的覆盖范围内后,第一电子设备接入小区3,此时第一电子设备连接至网络。The first electronic device is within the coverage of Cell 1 and accesses Cell 1; after the first electronic device moves out of Cell 1 and is located within the coverage of Cell 2, since the operator corresponding to the SIM card is different from Cell 2 The corresponding operator 2 does not match, and the first electronic device does not access cell 2. At this time, the first electronic device disconnects from the network, that is, it cannot connect to the core network; then the first electronic device moves out of cell 2 and is located in cell 3. After being within the coverage range, the first electronic device accesses the cell 3. At this time, the first electronic device is connected to the network.
如图1B所示,小区1的覆盖范围、小区2的覆盖范围和小区3的覆盖范围有重叠。在第一电子设备位于小区1的边缘时,第一电子设备还位于小区2的中心区域以及小区3的边缘。在该情况下,不论第一电子设备接入小区1还是接入小区3,由于第一电子设备同时位于小区1的边缘和小区3的边缘,第一电子设备的通信质量均较差。此时,第一电子设备的上网速率不稳定。As shown in Figure 1B, the coverage area of cell 1, the coverage area of cell 2, and the coverage area of cell 3 overlap. When the first electronic device is located at the edge of Cell 1, the first electronic device is also located in the central area of Cell 2 and the edge of Cell 3. In this case, no matter whether the first electronic device accesses cell 1 or cell 3, since the first electronic device is located at the edge of cell 1 and cell 3 at the same time, the communication quality of the first electronic device is poor. At this time, the Internet access rate of the first electronic device is unstable.
可选地,在本申请一些实施例中,在图1A所示的场景中,当第一电子设备仅位于小区2的覆盖范围内,第一电子设备仍然可以通过紧急呼叫接入小区2。Optionally, in some embodiments of the present application, in the scenario shown in FIG. 1A , when the first electronic device is only located within the coverage of cell 2, the first electronic device can still access cell 2 through an emergency call.
值得说明的是,在本申请实施例中,第一电子设备是否有网络是指第一电子设备是否可以通过蜂窝移动通信功能连接至核心网,进而与互联网连通。It is worth noting that in the embodiment of the present application, whether the first electronic device has a network refers to whether the first electronic device can be connected to the core network through the cellular mobile communication function and thereby connected to the Internet.
如上文中图1A和图1B所示的场景示例性示意的,在很多场景下,由于基站的分布、或者是基站的繁忙都会导致第一电子设备的通信质量较差,进而影响到用户浏览网页,在线视频等,用户的体验不佳。As exemplified by the scenarios shown in Figure 1A and Figure 1B above, in many scenarios, the distribution of base stations or the busyness of the base stations will lead to poor communication quality of the first electronic device, thereby affecting the user's browsing of the web. Online videos, etc., the user experience is not good.
为了解决图1A和图1B所示的场景中第一电子设备出现的断网、网络不稳定的问题,本申请实施例提供了一种SIM卡切换方法。In order to solve the problems of disconnection and network instability of the first electronic device in the scenarios shown in Figures 1A and 1B, embodiments of the present application provide a SIM card switching method.
图2为本申请实施例提供的SIM卡切换方法的一个示例性示意图。Figure 2 is an exemplary schematic diagram of a SIM card switching method provided by an embodiment of the present application.
在第一电子设备位如图2所示,当第一电子设备为可支持双SIM卡的电子设备,并且SIM卡1为运营商1的卡、SIM卡二为运营商2的卡的情况下,在第一电子设备位于只有小区1或小区3的覆盖范围时,会将当前使用的SIM卡切换为SIM卡1;在第一电子设备位于只有小区2的覆盖范围时,会将当前使用的SIM卡切换为SIM卡2。In the case of the first electronic device as shown in Figure 2, when the first electronic device is an electronic device that can support dual SIM cards, and SIM card 1 is the card of operator 1, and SIM card 2 is the card of operator 2 , when the first electronic device is located in the coverage area of only cell 1 or cell 3, the currently used SIM card will be switched to SIM card 1; when the first electronic device is located in the coverage area of only cell 2, the currently used SIM card will be switched to SIM card 1. The SIM card is switched to SIM card 2.
于小区1和小区2的覆盖范围内时或者小区2和小区3的覆盖范围内,第一电子设备可以比较两个小区之间的多种参数,进而选择切换为SIM卡2或SIM卡1。When within the coverage area of Cell 1 and Cell 2 or within the coverage area of Cell 2 and Cell 3, the first electronic device can compare various parameters between the two cells, and then choose to switch to SIM card 2 or SIM card 1.
但是,如图2所示的SIM卡切换方法,在SIM卡切换过程中,第一电子设备处于断开网络状态,即,第一电子设备可能会从弱网状态变为断开网络状态;其次,在第一电子设备执行SIM卡切换后,第一电子设备还需要执行小区搜索的步骤,由于小区搜索需要第一电子设备扫频以发现周边的小区,然后才能接入对应的小区,导致SIM卡切换过程时间长且功耗高,不利于用户的体验。 However, in the SIM card switching method shown in Figure 2, during the SIM card switching process, the first electronic device is in a disconnected network state, that is, the first electronic device may change from a weak network state to a disconnected network state; secondly, , after the first electronic device performs SIM card switching, the first electronic device also needs to perform a cell search step. Since cell search requires the first electronic device to scan the frequency to discover surrounding cells, and then it can access the corresponding cell, resulting in SIM The card switching process takes a long time and consumes high power, which is not conducive to the user experience.
基于此,本申请实施例提供了一种通信方法,通过利用多个电子设备的蜂窝移动通信能力,可以提高多个电子设备中任意一个电子设备或特定一个电子设备在部分弱网、无网环境中的蜂窝移动通信的通信质量。Based on this, embodiments of the present application provide a communication method that can improve the performance of any one of the multiple electronic devices or a specific electronic device in some weak network or no network environments by utilizing the cellular mobile communication capabilities of multiple electronic devices. Communication quality of cellular mobile communications in .
图3A和图3B为本申请实施例提供的通信方法的适用场景一个示例性示意图。FIG. 3A and FIG. 3B are exemplary schematic diagrams of applicable scenarios of the communication method provided by the embodiment of the present application.
如图3A所示,阶段1:第一电子设备确定是否符合第一条件。As shown in Figure 3A, stage 1: the first electronic device determines whether the first condition is met.
第一电子设备可以确定实时的蜂窝移动通信的质量是否低于阈值,若第一电子设备的蜂窝移动通信的质量低于某一设定的质量阈值,则确定符合第一条件。或者,第一电子设备可以预测未来一段时间内的蜂窝移动通信出现波动的概率是大于概率阈值,则确定符合第一条件。The first electronic device may determine whether the quality of the real-time cellular mobile communication is lower than a threshold. If the quality of the cellular mobile communication of the first electronic device is lower than a certain set quality threshold, it is determined that the first condition is met. Alternatively, the first electronic device can predict that the probability of fluctuations in cellular mobile communications in the future is greater than the probability threshold, and then determines that the first condition is met.
下面示例性的介绍第一条件。The first condition is introduced below as an example.
在一些实施例中,实时的蜂窝移动通信的质量可以通过确定第一电子设备与当前接入小区之间的信号强度、误码率,以及当前接入小区的拥塞程度等参数确定。In some embodiments, the quality of real-time cellular mobile communication can be determined by determining parameters such as signal strength, bit error rate, and congestion level of the current access cell between the first electronic device and the current access cell.
在一些实施例中,第一电子设备可以通过定位确定第一电子设备的位置位于医院、机场等人流密集的区域,则第一电子设备可以认为蜂窝移动通信大概率会出现波动,则确定符合第一条件;或者,第一电子设备可以通过定位确定第一电子设备的位置位于车库、商业办公楼等较为封闭的建筑物内部区域,则第一电子设备可以认为蜂窝移动通信大概率会出现波动,则确定符合第一条件;或者,第一条件为第一电子设备通过速度传感器或者位置的变化确定第一电子设备的速度大于阈值速度如200km/h,则第一电子设备确定符合第一条件;或者,第一条件为第一电子设备确定接入的小区为高铁专用网络服务的小区(高速铁路专网小区),则第一电子设备确定符合第一条件;或者,第一条件为第一电子设备确定用户订阅了高铁、动车或长途汽车的车票,并且第一电子设备确定当前时间处于高铁、动车或长途汽车的车票的发车时间至下车时间内,则第一电子设备确定符合第一条件;或者,第一条件为第一电子设备确定用户订阅了高铁、动车或长途汽车的车票,并且第一电子设备确定第一电子设备的位置位于车票的起始站、路径上或终点站,则第一电子设备确定符合第一条件。In some embodiments, the first electronic device may determine through positioning that the location of the first electronic device is located in a densely populated area such as a hospital or an airport. The first electronic device may believe that there is a high probability that cellular mobile communications will fluctuate, and then determine that the first electronic device meets the requirements of the first electronic device. A condition; or, the first electronic device can determine through positioning that the location of the first electronic device is located in a relatively closed internal area of a building such as a garage or a commercial office building, then the first electronic device can believe that there is a high probability that cellular mobile communications will fluctuate. Then it is determined that the first condition is met; or, the first condition is that the first electronic device determines that the speed of the first electronic device is greater than a threshold speed such as 200km/h through a speed sensor or a change in position, then the first electronic device is determined to meet the first condition; Or, the first condition is that the first electronic device determines that the cell accessed is a cell served by the high-speed rail dedicated network (high-speed rail dedicated network cell), then the first electronic device determines that it meets the first condition; or, the first condition is that the first electronic device The device determines that the user has subscribed to a high-speed rail, high-speed train or long-distance bus ticket, and the first electronic device determines that the current time is between the departure time and the alighting time of the high-speed rail, high-speed train or long-distance bus ticket, then the first electronic device determines that the first condition is met ; Or, the first condition is that the first electronic device determines that the user has subscribed to a high-speed rail, high-speed train or long-distance bus ticket, and the first electronic device determines that the location of the first electronic device is located at the starting station, route or terminal station of the ticket, then The first electronic device determines that it meets the first condition.
在一些实施例中,第一电子设备确定SIM卡已经欠费或者第一电子设备在核心网注册失败后,则第一电子设备确定符合第一条件。In some embodiments, after the first electronic device determines that the SIM card is in arrears or the first electronic device fails to register with the core network, the first electronic device determines that it meets the first condition.
阶段2:第一电子设备通过广播发现周边的第二电子设备,并询问第二电子设备是否满足第二条件。其中,第二电子设备可以连接互联网。Stage 2: The first electronic device discovers the surrounding second electronic device through broadcasting, and asks the second electronic device whether it meets the second condition. Wherein, the second electronic device can be connected to the Internet.
在一些实施例中,第二条件可以与第一条件有关。In some embodiments, the second condition may be related to the first condition.
例如,当第一条件为第一电子设备确定实时的蜂窝移动通信的质量低于阈值,则第二条件为第二电子设备确定实时的蜂窝移动通信的质量低于阈值。For example, when the first condition is that the first electronic device determines that the quality of the real-time cellular mobile communication is lower than the threshold, then the second condition is that the second electronic device determines that the quality of the real-time cellular mobile communication is lower than the threshold.
例如,当第一条件为第一电子设备确定第一电子设备位置位于医院、机场等人流密集的区域,则第二条件为第二电子设备确定上网使用的运营商与第一电子设备上文使用的运营商不同。For example, when the first condition is that the first electronic device determines that the first electronic device is located in a densely populated area such as a hospital or an airport, the second condition is that the second electronic device determines that the operator used to access the Internet is the same as the one used by the first electronic device. different operators.
在一些实施例中,第二条件可以与第一条件无关。In some embodiments, the second condition may be independent of the first condition.
例如,第二条件为第二电子设备确定当前接入小区与第一电子设备当前接入小区不同,或者第二电子设备接入的蜂窝网络的运营商与第一电子设备接入的蜂窝网络的运营商不同。For example, the second condition is that the second electronic device determines that the current access cell is different from the current access cell of the first electronic device, or that the operator of the cellular network accessed by the second electronic device is different from the operator of the cellular network accessed by the first electronic device. Operators vary.
可选地,在本申请一些实施例中,第二电子设备可以是任意一个电子设备,或者是用户指定的电子设备,则第二电子设备可以不满足第二条件。Optionally, in some embodiments of the present application, the second electronic device may be any electronic device, or an electronic device specified by the user, and the second electronic device may not meet the second condition.
阶段3:第一电子设备和第二电子设备通过有线或无线的方式建立连接。其中,无线的方式可以包括WiFi、蓝牙、超宽带(ultra wide band,UWB)等,在此不做限定。 Stage 3: The first electronic device and the second electronic device establish a connection through wired or wireless means. Among them, the wireless method may include WiFi, Bluetooth, ultra wide band (UWB), etc., and is not limited here.
在建立连接后,第二电子设备为第一电子设备提供网络代理,即第一电子设备可以通过第二电子设备访问互联网。其中,第二电子设备为第一电子设备提供网络代理是指,第一电子设备和第二电子设备建立连接后,第一电子设备可以将访问网络的请求发送到第二电子设备,第二电子设备接收到该访问网络请求后代为转发到互联网中的服务器上。可以理解的是,服务器可以为应用服务器,例如提供视频的媒体服务器、提供游戏服务器的游戏服务器、提供身份验证信息的鉴权服务器。After the connection is established, the second electronic device provides a network proxy for the first electronic device, that is, the first electronic device can access the Internet through the second electronic device. Wherein, the second electronic device provides a network proxy for the first electronic device means that after the first electronic device and the second electronic device establish a connection, the first electronic device can send a request to access the network to the second electronic device, and the second electronic device After the device receives the request to access the network, it is forwarded to the server on the Internet. It can be understood that the server may be an application server, such as a media server that provides videos, a game server that provides game servers, and an authentication server that provides identity verification information.
阶段4:第一电子设备可以通过两条数据通道与互联网中的服务器交互,其中,一条数据通道由第二电子设备提供。Stage 4: The first electronic device can interact with the server in the Internet through two data channels, one of which is provided by the second electronic device.
本申请实施例中第一电子设备上的两条数据通道由不同的实际的物理链路构建,两条数据通道的通信质量更加独立,有利于提高第一电子设备的通信质量,且相比于传统的多径通信方法更稳健,进而更能够避免数据延时高、数据传输速率慢等情况,进而提高用户的体验。In the embodiment of the present application, the two data channels on the first electronic device are constructed by different actual physical links. The communication quality of the two data channels is more independent, which is beneficial to improving the communication quality of the first electronic device. Compared with Traditional multipath communication methods are more robust and can avoid situations such as high data delays and slow data transmission rates, thereby improving user experience.
可选地,在本申请一些实施例中,第一电子设备也可以为第二电子设备提供网络代理,进而同样可以提高第二电子设备的通信质量。Optionally, in some embodiments of the present application, the first electronic device can also provide a network proxy for the second electronic device, which can also improve the communication quality of the second electronic device.
如图3B所示,第一电子设备的SIM卡为运营商1,第二电子设备的SIM卡为运营商2;对于第一电子设备来说,当第一电子设备的位置上小区1的通信质量大于小区2的通信质量,第一电子设备接入小区1进而上网;对于第一电子设备来说,当第一电子设备的位置上小区1的通信质量小于等于小区2的通信质量,或者小区2的通信质量大于等于小区3的通信质量,第一电子设备通过第二电子设备提供的网络代理上网;对于第一电子设备来说,当第一电子设备的位置上小区3的通信质量大于小区2的通信质量,第一电子设备接入小区2进而上网。As shown in Figure 3B, the SIM card of the first electronic device is operator 1, and the SIM card of the second electronic device is operator 2; for the first electronic device, when the communication of cell 1 is at the location of the first electronic device, The quality is greater than the communication quality of cell 2, and the first electronic device accesses cell 1 and then accesses the Internet; for the first electronic device, when the communication quality of cell 1 is less than or equal to the communication quality of cell 2 at the location of the first electronic device, or the communication quality of cell 2 The communication quality of 2 is greater than or equal to the communication quality of cell 3, and the first electronic device accesses the Internet through the network agent provided by the second electronic device; for the first electronic device, when the communication quality of cell 3 is greater than that of cell 3 at the location of the first electronic device With the communication quality of 2, the first electronic device accesses the community 2 and then accesses the Internet.
对比图3B和图1B,或者对比图3B和图1A,可以理解的是,本申请实施例提供的通信方法,可以避免由于各种原因导致的第一电子设备无法接入小区,或者无法从小区得到稳定的通信保障时第一电子设备出现掉网、弱网等情况,进而提升用户的上网体验。Comparing Figure 3B and Figure 1B, or comparing Figure 3B and Figure 1A, it can be understood that the communication method provided by the embodiment of the present application can avoid the first electronic device being unable to access the cell due to various reasons, or being unable to access the cell from the cell. When stable communication is guaranteed, the first electronic device will experience network disconnection, weak network, etc., thereby improving the user's Internet experience.
下面首先从电子设备之间交互和人机交互的角度,结合图4所示的内容示例性的介绍本申请实施例提供的通信方法。The following first exemplarily introduces the communication method provided by the embodiment of the present application from the perspective of interaction between electronic devices and human-computer interaction, combined with the content shown in FIG. 4 .
其中,首先从电子设备之间交互的内容,介绍本申请实施例提供的通信方法。Among them, the communication method provided by the embodiment of the present application is first introduced from the perspective of the interaction between electronic devices.
图4为本申请实施例提供的通信方法的方法流程的一个示例性示意图。FIG. 4 is an exemplary schematic diagram of the method flow of the communication method provided by the embodiment of the present application.
S401:第一电子设备确定满足第一条件后,通过广播发现第二电子设备。S401: After determining that the first condition is met, the first electronic device discovers the second electronic device through broadcast.
其中,第一条件可以参考上文中图3A对应的文字描述,此处不再赘述。For the first condition, please refer to the text description corresponding to Figure 3A above, and will not be described again here.
第一电子设备可以通过广播发现第二电子设备。其中,广播可以是蓝牙、UWB、WiFi等协议规定的广播,在此不做限定。The first electronic device may discover the second electronic device through the broadcast. Among them, the broadcast can be a broadcast specified by Bluetooth, UWB, WiFi and other protocols, which is not limited here.
可选地,在本申请一些实施例中,在第一电子设备在与第二电子设备连接的情况下,可以直接发现第二电子设备,而不用通过广播发现第二电子设备。Optionally, in some embodiments of the present application, when the first electronic device is connected to the second electronic device, the second electronic device can be discovered directly without discovering the second electronic device through broadcasting.
可选地,在本申请一些实施例中,当第一电子设备和第二电子设备均登录有同一账号或账户的情况下,如账号或账户,第一电子设备可以通过端到端的方式发现第二电子设备,而非通过广播的方式发现第二电子设备。Optionally, in some embodiments of the present application, when both the first electronic device and the second electronic device are logged in with the same account or account, such as account or According to the account, the first electronic device can discover the second electronic device in an end-to-end manner instead of discovering the second electronic device in a broadcast manner.
S402:第一电子设备与第二电子设备交换网络参数,第一电子设备确定第二电子设备满足第二条件后,第一电子设备和第二电子设备建立连接。S402: The first electronic device and the second electronic device exchange network parameters. After the first electronic device determines that the second electronic device meets the second condition, the first electronic device and the second electronic device establish a connection.
其中,第二条件可以参考上文中图2对应的文字描述,此处不再赘述。 Among them, the second condition can refer to the text description corresponding to Figure 2 above, and will not be described again here.
可选地,在本申请一些实施例中,第一电子设备请求第二电子设备发送网络参数,第一电子设备基于接收到的网络参数确定第二电子设备是否满足第二条件。Optionally, in some embodiments of the present application, the first electronic device requests the second electronic device to send network parameters, and the first electronic device determines whether the second electronic device meets the second condition based on the received network parameters.
在第二电子设备为第一电子设备提供网络代理的情况下,网络参数可以包括第二电子设备接入的蜂窝网络的运营商。在第一电子设备和第二电子设备均为对端电子设备提供网络代理的情况下,网络参数可以包括第一电子设备接入的蜂窝网络的运营商和第二电子设备接入的蜂窝网络的运营商。In the case where the second electronic device provides a network proxy for the first electronic device, the network parameters may include an operator of a cellular network to which the second electronic device accesses. In the case where both the first electronic device and the second electronic device provide network proxies for the peer electronic device, the network parameters may include the operator of the cellular network accessed by the first electronic device and the operator of the cellular network accessed by the second electronic device. operator.
可选地,在本申请一些实施例中,在第二电子设备为第一电子设备提供网络代理的情况下,网络参数可以包括第二电子设备接入的小区标识。在第一电子设备和第二电子设备均为对端电子设备提供网络代理的情况下,网络参数可以包括第一电子设备接入的小区标识和第二电子设备接入小区的标识。Optionally, in some embodiments of the present application, when the second electronic device provides a network proxy for the first electronic device, the network parameters may include the identity of the cell to which the second electronic device accesses. In the case where both the first electronic device and the second electronic device provide network proxies for the peer electronic device, the network parameters may include the identity of the cell accessed by the first electronic device and the identity of the cell accessed by the second electronic device.
可选地,在本申请一些实施例中,在第二电子设备为第一电子设备提供网络代理的情况下,网络参数可以包括第二电子设备的小区切换(channel switch)策略和/或小区重选策略。Optionally, in some embodiments of the present application, in the case where the second electronic device provides a network agent for the first electronic device, the network parameters may include the cell switching (channel switch) strategy and/or cell reconfiguration of the second electronic device. Choose a strategy.
第一电子设备和第二电子设备建立的连接的类型可以由第二电子设备确定,也可以由第一电子设备确定。其中,连接的类型如下文中的表1所示。The type of connection established by the first electronic device and the second electronic device may be determined by the second electronic device or by the first electronic device. Among them, the types of connections are shown in Table 1 below.
其中,第一电子设备可以根据当前需要上网的业务的类型确定连接的类型。其中,连接可以包括蓝牙连接、UWB连接或WiFi 2.4G连接或者WiFi 5G连接。其中,WiFi 2.4G连接和WiFi 5G连接均属于WiFi直连。例如,当前需要上网的业务为在线视频播放,则第一电子设备可以确定连接为UWB连接或WiFi 5G连接;又例如,当前需要上网的业务为在线音频播放、浏览网页等,则第一电子设备可以确定连接为蓝牙连接或WiFi 2.4G连接。Wherein, the first electronic device may determine the type of connection according to the type of business currently requiring Internet access. Among them, the connection can include Bluetooth connection, UWB connection or WiFi 2.4G connection or WiFi 5G connection. Among them, WiFi 2.4G connection and WiFi 5G connection are both WiFi direct connections. For example, if the current business that requires Internet access is online video playback, the first electronic device can determine the connection to be a UWB connection or WiFi 5G connection; for another example, if the current business that requires Internet access is online audio playback, web browsing, etc., then the first electronic device You can determine whether the connection is a Bluetooth connection or a WiFi 2.4G connection.
可选地,在本申请一些实施例中,在第二电子设备的网络状态变化后,第二电子设备还可以向第一电子设备更新当前的第二电子设备的网络参数。Optionally, in some embodiments of the present application, after the network status of the second electronic device changes, the second electronic device can also update the current network parameters of the second electronic device to the first electronic device.
可选地,在本申请一些实施例中,当用户指定第二电子设备的情况下,第二电子设备可以不满足第二条件。Optionally, in some embodiments of the present application, when the user specifies a second electronic device, the second electronic device may not meet the second condition.
可选地,在本申请一些实施例中,第一电子设备可以向外广播自己的网络参数,由第二电子设备确定第一电子设备是否满足第二条件,例如,运营商不同。在有多个第二电子设备确定第一电子设备满足第二条件后,即有多个第二电子设备确定可以为第一电子设备提供网络代理后,可以由第一电子设备确定具体由哪个第二电子设备为第一电子设备提供网络代理。例如,第一电子设备广播网络参数,有多个第二电子设备响应,然后第一电子设备从多个响应的第二电子设备中进行选择,确定一个或多个第二电子设备。再然后,第一电子设备可以与该一个或多个第二电子设备建立连接。Optionally, in some embodiments of the present application, the first electronic device can broadcast its own network parameters to the outside, and the second electronic device determines whether the first electronic device meets the second condition, for example, the operator is different. After multiple second electronic devices determine that the first electronic device satisfies the second condition, that is, after multiple second electronic devices determine that they can provide a network proxy for the first electronic device, the first electronic device may determine which third electronic device to use. The second electronic device provides a network agent for the first electronic device. For example, a first electronic device broadcasts network parameters, multiple second electronic devices respond, and then the first electronic device selects from the multiple responding second electronic devices to determine one or more second electronic devices. Then, the first electronic device may establish a connection with the one or more second electronic devices.
可选地,在本申请一些实施例中,第一电子设备可以向外广播自己的网络参数,当第二电子设备接收到第一电子设备的网络参数后,第二电子设备可以广播自己的网络参数以使得第一电子设备可以接受到第二电子设备的网络参数,或者第二电子设备可以向第一电子设备发送第二电子设备的网络参数。Optionally, in some embodiments of the present application, the first electronic device can broadcast its own network parameters to the outside world. After the second electronic device receives the network parameters of the first electronic device, the second electronic device can broadcast its own network parameters. parameters so that the first electronic device can receive the network parameters of the second electronic device, or the second electronic device can send the network parameters of the second electronic device to the first electronic device.
值得说明的是,在不同的情况下,第一电子设备可以是发起连接的一方,第二电子设备也是发起连接的一方。It is worth noting that, in different situations, the first electronic device may be the party initiating the connection, and the second electronic device may also be the party initiating the connection.
可选的,在本申请一些实施例中,网络参数可以包括往返时延(Round-Trip Time,RTT)、丢包率等参数。例如,当第一电子设备正在访问网页如“www.huawei.com”,则第一电子设备会在广播时携带“www.huawei.com”,第一电子设备和第二电子设备交换网络参数后,第二电子设备可以获取第二电子设备访问“www.huawei.com”的丢包率和/或RTT。当第二电子设备的丢包率或RTT低于设定的阈值,则第一电子设备认为第二电子设备满足第二条件。则第一电 子设备可以和该第二电子设备建立连接。又例如,当用户通过第一电子设备浏览在线视频、则网络参数可以包括第二电子设备访问在线视频网站的丢包率或RTT,或者,又例如,当用户通过第一电子设备玩在线游戏时,则网络参数可以包括第二电子设备访问游戏应用程序对应的应用服务器的丢包率或RTT。Optionally, in some embodiments of the present application, network parameters may include round-trip time delay (Round-Trip Time, RTT), packet loss rate and other parameters. For example, when the first electronic device is accessing a webpage such as "www.huawei.com", the first electronic device will carry "www.huawei.com" when broadcasting. After the first electronic device and the second electronic device exchange network parameters , the second electronic device can obtain the packet loss rate and/or RTT of the second electronic device accessing "www.huawei.com". When the packet loss rate or RTT of the second electronic device is lower than the set threshold, the first electronic device determines that the second electronic device meets the second condition. The first call The sub-device can establish a connection with the second electronic device. For another example, when the user browses online videos through the first electronic device, the network parameters may include the packet loss rate or RTT when the second electronic device accesses the online video website, or, for another example, when the user plays online games through the first electronic device , then the network parameters may include the packet loss rate or RTT when the second electronic device accesses the application server corresponding to the game application.
S403:第二电子设备为第一电子设备提供网络代理。S403: The second electronic device provides a network proxy for the first electronic device.
在建立连接后,第二电子设备为第一电子设备提供网络代理。在第二电子设备与第一电子设备提供网络代理后,第一电子设备上有两条数据通道访问数据包。其中,一条数据通道为第一电子设备通过自己的蜂窝移动通信建立的,另一条是通过第二电子设备建立的。After the connection is established, the second electronic device provides a network proxy for the first electronic device. After the second electronic device and the first electronic device provide network proxies, there are two data channels on the first electronic device to access the data packet. Among them, one data channel is established by the first electronic device through its own cellular mobile communication, and the other is established by the second electronic device.
图5A和图5B为本申请实施例提供的第一电子设备上两个数据通道的一个示例性示意图。FIG. 5A and FIG. 5B are an exemplary schematic diagram of two data channels on the first electronic device provided by the embodiment of the present application.
如图5A所示,第二电子设备为第一电子设备提供网络代理后,第一电子设备上具有两条数据通道,分别为数据通道1和数据通道2。As shown in Figure 5A, after the second electronic device provides a network proxy for the first electronic device, the first electronic device has two data channels, namely data channel 1 and data channel 2.
其中,数据通道1包括第一电子设备接入基站2,并通过基站2连接至互联网中的服务器。其中,数据通道2包括第一电子设备与第二电子设备之间建立的连接,以及第二电子设备通过基站1连接至互联网中的服务器。Among them, the data channel 1 includes a first electronic device accessing a base station 2 and connecting to a server in the Internet through the base station 2 . The data channel 2 includes a connection established between a first electronic device and a second electronic device, and the second electronic device is connected to a server in the Internet through the base station 1 .
可选地,在本申请一些实施例中,基站1和基站2为同一个基站,即第一电子设备的接入小区与第二电子设备的接入小区相同。Optionally, in some embodiments of the present application, base station 1 and base station 2 are the same base station, that is, the access cell of the first electronic device and the access cell of the second electronic device are the same.
值得说明的是,对于传统的如MPTCP的多径通信方法,不同路径的源IP不同,但是,两条数据通道的源IP可以相同,均为第一电子设备的IP地址,即不需要第一电子设备为多网卡(多网络接口)设备,或者不要求第一电子设备的一个网络接口可以被配置多个IP地址;初次之外,对于传统的如MPTCP的多径通信方法,服务器可以确定来自不同路径的请求均为第一电子设备发送的,但是,可选地,在本申请一些实施例中,服务器并不能确定来自不同数据通道的请求均为第一电子设备发送的。It is worth noting that for traditional multipath communication methods such as MPTCP, the source IPs of different paths are different. However, the source IPs of the two data channels can be the same, which are both the IP addresses of the first electronic device, that is, there is no need for the first The electronic device is a multi-network card (multi-network interface) device, or one network interface of the first electronic device is not required to be configured with multiple IP addresses; except for the first time, for traditional multi-path communication methods such as MPTCP, the server can determine from The requests from different paths are all sent by the first electronic device. However, optionally, in some embodiments of the present application, the server cannot determine that the requests from different data channels are all sent by the first electronic device.
可选地,在本申请一些实施例中,第一电子设备可以和第二电子设备建立连接并且和第三电子设备建立连接,并且由第二电子设备和第三电子设备为第一电子设备提供网络代理,如图5B所示。Optionally, in some embodiments of the present application, the first electronic device may establish a connection with a second electronic device and a connection with a third electronic device, and the second electronic device and the third electronic device may provide the first electronic device with Network proxy, as shown in Figure 5B.
其中,第一电子设备具有三个数据通道,分别为数据通道1、数据通道2、数据通道3。Among them, the first electronic device has three data channels, namely data channel 1, data channel 2, and data channel 3.
S404:第一电子设备基于至少两个数据通道接收、发送数据。S404: The first electronic device receives and sends data based on at least two data channels.
由于第一电子设备可以通过两个数据通道访问互联网中的服务器,则可以冗余的发送数据,或者在第一电子设备在通信质量好的数据通道上发送数据。Since the first electronic device can access the server in the Internet through two data channels, the data can be sent redundantly, or the data can be sent by the first electronic device on a data channel with good communication quality.
当第一电子设备不是完全冗余的在两个数据通道上发送数据,则第一电子设备可以基于第二电子设备的网络参数和第一电子设备的网络参数,去调整数据在两个数据通道上的分配情况。其中,第一电子设备的网络参数和第二电子设备的网络参数可以是实时更新的,第一电子设备的网络参数和第二电子设备的网络参数可以包括RTT、丢包率中的一种或多种。When the first electronic device is not completely redundant in sending data on the two data channels, the first electronic device can adjust the data on the two data channels based on the network parameters of the second electronic device and the network parameters of the first electronic device. distribution situation. Wherein, the network parameters of the first electronic device and the network parameters of the second electronic device may be updated in real time, and the network parameters of the first electronic device and the network parameters of the second electronic device may include one of RTT, packet loss rate or Various.
当第一电子设备和第二电子设备各自收到服务器的响应数据后,第二电子设备将接收的数据通过之前建立的连接发送到第一电子设备,第一电子设备对两个数据通道接收到的数据进行比较和去重,然后将最新的数据递交给应用程序。When the first electronic device and the second electronic device each receive the response data from the server, the second electronic device sends the received data to the first electronic device through the previously established connection. The first electronic device receives the response data from the two data channels. The data is compared and deduplicated, and then the latest data is submitted to the application.
其中,对于以TCP/IP为代表的可靠传输协议,可以通过TCP序列号对不同数据通道上接收到的数据进行去重;对于以UDP为代表的非可靠传输协议,可以在数据字段内部配置序列号字段,由协议栈或者应用程序对不同数据通道上的接收到的数据进行去重。 Among them, for reliable transmission protocols represented by TCP/IP, the data received on different data channels can be deduplicated through TCP sequence numbers; for unreliable transmission protocols represented by UDP, the sequence can be configured inside the data field. Number field, the protocol stack or application program deduplicates the received data on different data channels.
下面结合图6A、图6B、图6C、图7A、图7B和图7C所示的内容示例性的介绍第一电子设备发送数据的具体实现。The following is an exemplary introduction to the specific implementation of data sent by the first electronic device in conjunction with the content shown in FIG. 6A, FIG. 6B, FIG. 6C, FIG. 7A, FIG. 7B and FIG. 7C.
图6A、图6B、图6C为本申请提供的第一电子设备通过的数据通道2发送数据的一个示例性示意图。FIG. 6A, FIG. 6B, and FIG. 6C are an exemplary schematic diagram of the data channel 2 through which the first electronic device provided by this application transmits data.
如图6A所示,第一电子设备通过第二电子设备提供的网络代理将数据字段1发送到互联网中的服务器,即第一电子设备通过数据通道2将数据字段1发送到互联网中的服务器。As shown in FIG. 6A, the first electronic device sends data field 1 to the server in the Internet through the network proxy provided by the second electronic device. That is, the first electronic device sends data field 1 to the server in the Internet through data channel 2.
其中,第一电子设备将需要发送的数据按照第一电子设备和第二电子设备之间连接的类型封装为特定格式的数据。例如,当第一电子设备与第二电子设备之间的连接为蓝牙连接时,第一电子设备会将数据字段1封装为蓝牙格式的报文;当第一电子设备与第二电子设备之间连接为UWB连接时,第一电子设备会将数据字段1封装为UWB格式的报文;当第一电子设备与第二电子设备之间的连接为WiFi直连,则第一电子设备会将数据字段1封装为WIFI直连格式的报文。The first electronic device encapsulates the data that needs to be sent into data in a specific format according to the type of connection between the first electronic device and the second electronic device. For example, when the connection between the first electronic device and the second electronic device is a Bluetooth connection, the first electronic device will encapsulate data field 1 into a Bluetooth format message; when the connection between the first electronic device and the second electronic device When the connection is a UWB connection, the first electronic device will encapsulate data field 1 into a UWB format message; when the connection between the first electronic device and the second electronic device is a WiFi direct connection, the first electronic device will encapsulate the data Field 1 is encapsulated into a message in WIFI direct connection format.
然后,第二电子设备接收到数据1后,解封装得到数据字段1。第二电子设备在确定数据字段1后,将数据字段1作为应用层报文进行封装,即添加传输层字段、网络层字段、链路层字段、物理层字段,得到网络报文(图6A中的数据2),然后发送出去。Then, after receiving data 1, the second electronic device decapsulates and obtains data field 1. After determining data field 1, the second electronic device encapsulates data field 1 as an application layer message, that is, adds a transport layer field, a network layer field, a link layer field, and a physical layer field to obtain a network message (in Figure 6A The data 2) is then sent out.
与图6A所示的不同的是,如图6B所示,第一电子设备可以将传输层报文发送给第二电子设备,即第一电子设备将传输层报文封装为蓝牙格式的报文、UWB格式的报文、WiFi直连格式的报文。并且,第二电子设备在接收到数据后,解封装得到第一电子设备发送的传输层报文,然后继续封装为网络报文(图6B中的数据2)后发送出去。What is different from what is shown in Figure 6A is that, as shown in Figure 6B, the first electronic device can send the transport layer message to the second electronic device, that is, the first electronic device encapsulates the transport layer message into a Bluetooth format message. , UWB format messages, WiFi direct format messages. Moreover, after receiving the data, the second electronic device decapsulates and obtains the transport layer message sent by the first electronic device, and then continues to encapsulate it into a network message (data 2 in Figure 6B) before sending it out.
按照图6B所示的内容,由于服务器通过数据通道2接收到的网络报文中包括与第一电子设备对应的传输层字段1,服务器可以确定该网络报文为第一电子设备发送的。According to the content shown in Figure 6B, since the network message received by the server through the data channel 2 includes the transport layer field 1 corresponding to the first electronic device, the server can determine that the network message is sent by the first electronic device.
或者,如图6C所示,第一电子设备可以将传输层报文发送给第二电子设备,即第一电子设备将传输层报文封装为蓝牙格式的报文、UWB格式的报文、WiFi直连格式的报文。并且,第二电子设备在接收到数据后,解封装得到第一电子设备发送的传输层报文,然后将该传输层报文当做数据字段2进行封装得到网络报文后发送出去。Or, as shown in Figure 6C, the first electronic device can send the transport layer message to the second electronic device, that is, the first electronic device encapsulates the transport layer message into a Bluetooth format message, a UWB format message, or a WiFi format message. Messages in direct connection format. Moreover, after receiving the data, the second electronic device decapsulates and obtains the transport layer message sent by the first electronic device, and then encapsulates the transport layer message as data field 2 to obtain a network message and sends it out.
按照图6C所示的内容,服务器通过数据通道2接收到的网络报文中包括与第一电子设备对应的传输层字段1和与第二电子设备对应的传输层字段2,进而可以确定该网络报文是由第二电子设备转发的第一电子设备的数据。According to the content shown in Figure 6C, the network message received by the server through the data channel 2 includes the transport layer field 1 corresponding to the first electronic device and the transport layer field 2 corresponding to the second electronic device, and then the network can be determined The message is data of the first electronic device forwarded by the second electronic device.
根据上文中图6B和图6C所示的内容,在一些情况下,服务器可以确定来自于数据通道1和数据通道2的相同的请求数据均为第一电子设备发送的,进而冗余或非冗余的发送响应数据。其中非冗余的发送响应数据为服务器可以选择两个数据通道中的任意一个的数据通道,在该数据通道上发送响应数据。According to the content shown in Figure 6B and Figure 6C above, in some cases, the server can determine that the same request data from data channel 1 and data channel 2 are both sent by the first electronic device, and thus redundant or non-redundant. Send the remaining response data. The non-redundant sending response data is a data channel in which the server can select any one of the two data channels and send the response data on this data channel.
图7A、图7B、图7C为本申请实施例提供的第一电子设备通过两个数据通道发送数据的一个示例性示意图。FIG. 7A, FIG. 7B, and FIG. 7C are an exemplary schematic diagram of the first electronic device sending data through two data channels according to the embodiment of the present application.
第一电子设备通过数据通道1和数据通道2将数据发送到服务端。其中,第一电子设备发送的数据包括报文1、报文2、报文3、报文4和报文5。The first electronic device sends data to the server through data channel 1 and data channel 2. Among them, the data sent by the first electronic device includes message 1, message 2, message 3, message 4 and message 5.
如图7A所示,第一电子设备可以分别在数据通道1和数据通道2上发送报文1、报文2、报文3、报文4和报文5,即第一电子设备在两个数据通道上冗余的发送数据。As shown in Figure 7A, the first electronic device can send message 1, message 2, message 3, message 4 and message 5 on data channel 1 and data channel 2 respectively, that is, the first electronic device can send message 1, message 2, message 3, message 4 and message 5 on two data channels. Send data redundantly on the data channel.
或者,如图7B所示,第一电子设备可以估计两条数据通道的RTT或其他用于衡量数据通道通信质量的参数,然后基于两条数据通道的RTT或其他用于衡量数据通道通信质量的参数将需要发送的数据平均分配到两条数据通道上。例如,在图7B所示的内容中,数据通道1 的RTT为数据通道2的RTT的1.5倍,故将报文1、报文2、报文3分配到数据通道2上,并将报文4、报文5分配到数据通道1上。其中,其他用于衡量数据通道通信质量的参数可以是传输速率、扰码率。Alternatively, as shown in FIG. 7B , the first electronic device may estimate the RTT of the two data channels or other parameters used to measure the communication quality of the data channel, and then based on the RTT of the two data channels or other parameters used to measure the communication quality of the data channel. The parameters evenly distribute the data that needs to be sent to the two data channels. For example, in the content shown in Figure 7B, data channel 1 The RTT is 1.5 times the RTT of data channel 2, so message 1, message 2, and message 3 are assigned to data channel 2, and message 4 and message 5 are assigned to data channel 1. Among them, other parameters used to measure the communication quality of the data channel can be the transmission rate and scrambling rate.
值得说明的是,对于数据通道2来说,第二电子设备确定第二电子设备与服务器之间的RTT后,第二电子设备将第二电子设备与服务器之间的RTT通知第一电子设备,进而可以让第一电子设备计算确定数据通道2的RTT。类似的第二电子设备确定第二电子设备与服务器之间的其他用于衡量数据通道通信质量的参数后,第二电子设备将第二电子设备与服务器之间的衡量通信质量的参数通知第一电子设备,进而由第一电子设备确定数据通道2的通信质量。It is worth noting that for data channel 2, after the second electronic device determines the RTT between the second electronic device and the server, the second electronic device notifies the first electronic device of the RTT between the second electronic device and the server. Then the first electronic device can be allowed to calculate and determine the RTT of the data channel 2 . After a similar second electronic device determines other parameters for measuring the communication quality of the data channel between the second electronic device and the server, the second electronic device notifies the first of the parameters for measuring the communication quality between the second electronic device and the server. The electronic device, and in turn the first electronic device, determines the communication quality of the data channel 2 .
可选地,在本申请一些实施例中,第一电子设备在接收到第二电子设备发送的用于衡量第二电子设备与服务器之间的通信质量的参数后,可以直接基于该参数确定数据通道2的通信质量,即,不考虑第一电子设备与第二电子设备之间连接对数据通道2带来的影响。Optionally, in some embodiments of the present application, after receiving the parameters sent by the second electronic device for measuring the communication quality between the second electronic device and the server, the first electronic device can directly determine the data based on the parameters. The communication quality of channel 2 does not take into account the impact of the connection between the first electronic device and the second electronic device on data channel 2.
可选地,在本申请一些实施例中,第一电子设备可以通过比较两条数据通道对应的小区的参考信号功率(reference signal receiving power,RSRP)、参考信号质量(reference signal receiving quality,RSRQ)、接收信号强度(received signal strength indicator,RSSI)或信干噪比(signal to interference plus noise ratio,SINR)或信道质量(channel quality indication)确定两条数据通道之间的通信质量的比值。例如,第一电子设备通过小区1接入互联网,第二电子设备通过小区2接入互联网,在第二电子设备确定小区2的RSRP后,第二电子设备将小区2的RSRP发送到第一电子设备,第一电子设备基于小区1的RSRP和小区2的RSRP确定两条数据通道通信质量的比值。可以理解的是,在忽略第一电子设备和第二电子设备之间的影响后,可以直接通过相同种类的参数确定两条数据通道通信质量的比值,无需进行参数的转换。Optionally, in some embodiments of the present application, the first electronic device can compare the reference signal power (reference signal receiving power, RSRP) and reference signal quality (reference signal receiving quality, RSRQ) of the cells corresponding to the two data channels. , received signal strength (received signal strength indicator, RSSI) or signal to interference plus noise ratio (signal to interference plus noise ratio, SINR) or channel quality (channel quality indicator) determines the ratio of communication quality between two data channels. For example, the first electronic device accesses the Internet through cell 1, and the second electronic device accesses the Internet through cell 2. After the second electronic device determines the RSRP of cell 2, the second electronic device sends the RSRP of cell 2 to the first electronic device. Device, the first electronic device determines a ratio of the communication quality of the two data channels based on the RSRP of cell 1 and the RSRP of cell 2. It can be understood that, after ignoring the influence between the first electronic device and the second electronic device, the ratio of the communication quality of the two data channels can be determined directly through the same type of parameters without the need for parameter conversion.
或者,如图7C所示,第一电子设备同样可以估计两条数据通道的往返时延(Round-Trip Time,RTT)或其他用于衡量数据通道通信质量的参数,然后选择两条数据通道中通信质量较好的数据通道。例如,在图7C所示的内容中,第一电子设备在确定数据通道2的通信质量优于数据通道1的通信质量后,将报文1、报文2、报文3、报文4和报文5分配到数据通道2上。Alternatively, as shown in Figure 7C, the first electronic device can also estimate the round-trip time delay (Round-Trip Time, RTT) of the two data channels or other parameters used to measure the communication quality of the data channels, and then select one of the two data channels. Data channel with good communication quality. For example, in the content shown in Figure 7C, after determining that the communication quality of data channel 2 is better than the communication quality of data channel 1, the first electronic device transfers message 1, message 2, message 3, message 4 and Telegram 5 is assigned to data channel 2.
值得说明的是,在第二电子设备通过多网并发的方式连接至互联网的情况下,第一电子设备与服务器之间存在至少三条数据通道,其中,第一电子设备在至少三条数据通道上分配数据的方式可以参考上文中图7A、图7B和图7C所示的内容,此处不再赘述。It is worth noting that when the second electronic device is connected to the Internet through multiple networks concurrently, there are at least three data channels between the first electronic device and the server, and the first electronic device distributes data on at least three data channels. For the data format, please refer to the content shown in Figure 7A, Figure 7B and Figure 7C above, and will not be described again here.
值得说明的是,在第一电子设备与第二电子设备和第三电子设备均建立连接的情况下,第一电子设备与服务器之间存在至少三条数据通道,其中,第一电子设备在至少三条数据通道上分配数据的方式可以参考上文中图7A、图7B和图7C所示的内容,此处不再赘述。It is worth noting that when the first electronic device establishes connections with both the second electronic device and the third electronic device, there are at least three data channels between the first electronic device and the server, wherein the first electronic device is connected to at least three data channels. For the method of allocating data on the data channel, please refer to the content shown in Figure 7A, Figure 7B and Figure 7C above, and will not be described again here.
可选地,在本申请一些实施例中,当第一电子设备确定数据通道2的通信质量优于数据通道1的通信质量的情况下,第一电子设备将发送给第二电子设备的数据暂存下来,在第二电子设备与服务器交互过程中,第二电子设备接收到重传消息或者错误消息后,第二电子设备通知第一电子设备。在第一电子设备接收到该通知后,第一电子设备确定在数据通道1重新发送该数据。第二电子设备可以重传也可以不重传。Optionally, in some embodiments of the present application, when the first electronic device determines that the communication quality of data channel 2 is better than the communication quality of data channel 1, the first electronic device temporarily transmits the data to the second electronic device. Save, during the interaction process between the second electronic device and the server, after the second electronic device receives the retransmission message or the error message, the second electronic device notifies the first electronic device. After the first electronic device receives the notification, the first electronic device determines to resend the data on data channel 1. The second electronic device may or may not retransmit.
第一电子设备作为接收端对不同数据通道上接收到的数据的比较和去重如图8A和图8B所示。The first electronic device serves as the receiving end to compare and deduplicate the data received on different data channels, as shown in Figure 8A and Figure 8B.
图8A和图8B为本申请实施例提供的第一电子设备通过两个数据通道接收数据的一个示 例性示意图。8A and 8B are an illustration of the first electronic device receiving data through two data channels according to the embodiment of the present application. Example diagram.
如图8A所示,第一电子设备从数据通道1上接收到报文1、报文2、报文3、报文4和报文5的时间分别为T1、T3、T7、T9、T10;第一电子设备从数据通道2上接收到报文1、报文2、报文3、报文4和报文5的时间分别为T2、T4、T5、T6、T8;则第一电子设备在执行比较和去重后,在T1时刻接收到报文1、在T3时刻接收到报文2、在T5时刻接收到报文3、在T6时刻接收到报文4、在T8时刻接收到报文5。As shown in Figure 8A, the times when the first electronic device receives message 1, message 2, message 3, message 4 and message 5 from data channel 1 are T1, T3, T7, T9 and T10 respectively; The times when the first electronic device receives message 1, message 2, message 3, message 4 and message 5 from data channel 2 are T2, T4, T5, T6 and T8 respectively; then the first electronic device is After performing comparison and deduplication, message 1 is received at time T1, message 2 is received at time T3, message 3 is received at time T5, message 4 is received at time T6, and message is received at time T8. 5.
或者,如图8B所示,与图8A所示的不同的是,数据通道1上的报文1丢失或误码,数据通道2上的报文3丢失或误码。在该情况下,第一电子设备在T2时刻接收到报文1,在T3时刻接收到报文2,在T7时刻接收到报文3,在T6时刻接收到报文4,在T8时刻接收到报文5。Or, as shown in Figure 8B, what is different from what is shown in Figure 8A is that message 1 on data channel 1 is lost or has errors, and message 3 on data channel 2 is lost or has errors. In this case, the first electronic device receives message 1 at time T2, message 2 at time T3, message 3 at time T7, message 4 at time T6, and message 4 at time T8. Message 5.
在图8B所示的内容中,当第一电子设备确定数据通道1上的报文1或数据通道2上的报文3丢失或误码,可以不向服务器发送重传请求。In the content shown in FIG. 8B , when the first electronic device determines that message 1 on data channel 1 or message 3 on data channel 2 is lost or has errors, it may not send a retransmission request to the server.
在图8B所示的内容中,当第一电子设备确定数据通道1上的报文1丢失或误码后,第一电子设备会继续接收数据通道1上的报文2、报文3、报文4和报文5。类似的,当第一电子设备确定数据通道2上的报文3丢失或误码后,第一电子设备会继续接收数据通道2上的报文4和报文5。In the content shown in Figure 8B, when the first electronic device determines that message 1 on data channel 1 is lost or has an error, the first electronic device will continue to receive message 2, message 3, and message on data channel 1. Text 4 and Text 5. Similarly, when the first electronic device determines that message 3 on data channel 2 is lost or has a bit error, the first electronic device will continue to receive message 4 and message 5 on data channel 2.
由于第一电子设备并不会在确定任意一个报文丢失或误码后停止接收后续的报文并要求重传,可以提高第一电子设备的数据传输速率。Since the first electronic device will not stop receiving subsequent messages and require retransmission after determining that any message is lost or has a bit error, the data transmission rate of the first electronic device can be increased.
进一步的,对于第二电子设备来说,由于第一电子并不会在确定任意一个报文丢失或误码后停止接收后续的报文并要求重传,所以第二电子设备在确定任意一个报文丢失或误码后停止接收后续的报文并要求服务器重传,其中,该报文为用于发送给第一电子设备的数据。Furthermore, for the second electronic device, since the first electronic device will not stop receiving subsequent messages and request retransmission after determining that any message is lost or error-coded, the second electronic device will not stop receiving subsequent messages and request retransmission after determining that any message is lost or miscoded. After the message is lost or miscoded, it stops receiving subsequent messages and requires the server to retransmit, where the message is data for sending to the first electronic device.
可以理解的是,结合图8A和图8B所示的内容,本申请实施例提供的通信方法可以降低第一电子设备的数据传输延时,并且可以提高第一电子设备的数据传输的稳健性。It can be understood that, combined with the content shown in FIG. 8A and FIG. 8B , the communication method provided by the embodiment of the present application can reduce the data transmission delay of the first electronic device and improve the robustness of the data transmission of the first electronic device.
可以理解的是,第一电子设备可以通过多条数据通道降低数据传输的时延以及提高数据传输的稳健性。It can be understood that the first electronic device can reduce the delay of data transmission and improve the robustness of data transmission through multiple data channels.
下面结合图9A至图12B所示的内容,从人机交互的角度介绍本申请实施例提供的通信方法。The communication method provided by the embodiment of the present application will be introduced from the perspective of human-computer interaction in conjunction with the content shown in Figures 9A to 12B.
图9A为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 9A is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
S9A01:第一电子设备确定满足第一条件后,显示第一界面,第一界面用于获取用户授权。S9A01: After determining that the first condition is met, the first electronic device displays the first interface, and the first interface is used to obtain user authorization.
其中,第一条件可以参考上文中图4对应的文字描述,此处不再赘述。Among them, the first condition can refer to the text description corresponding to Figure 4 above, and will not be described again here.
其中,第一界面可以如下文中图10A所示。The first interface may be as shown in Figure 10A below.
图10A为本申请实施例提供的传输方法中第一电子设备上显示的第一界面的一个示例性示意图。FIG. 10A is an exemplary schematic diagram of the first interface displayed on the first electronic device in the transmission method provided by the embodiment of the present application.
如图10A中的(A)和(B)所示,第一电子设备在确定满足第一条件后,显示窗口1001,窗口1001中包括文字“当前网络不佳,是否开启网络加速模式”,还包括控件1002和控件1003。As shown in (A) and (B) in Figure 10A, after determining that the first condition is met, the first electronic device displays window 1001. The window 1001 includes the text "The current network is not good, whether to enable network acceleration mode", and also Including control 1002 and control 1003.
其中,窗口1001中的文字还可以是其他用于提示用户授权的其他信息,在此不做限定。The text in window 1001 may also be other information used to prompt the user for authorization, which is not limited here.
其中,窗口1001也可以是其他形式的控件,如通知等。Among them, window 1001 can also be other forms of controls, such as notifications.
响应于接收到用户点击控件1003,第一电子设备确定获取用户授权,开始执行后续步骤;响应于接收到用户点击控件1002,第一电子设备确定没有获取到用户的授权,不执行后续步 骤。In response to receiving the user's click on the control 1003, the first electronic device determines to obtain the user's authorization and begins to perform subsequent steps; in response to receiving the user's click on the control 1002, the first electronic device determines that the user's authorization is not obtained and does not perform subsequent steps. steps.
可选地,在本申请一些实施例中,在第一电子设备还未确定是否满足第一条件的情况下,响应于接收到用户的操作,第一电子设备确定获取用户的授权,开始执行后续步骤,如图10B所示。Optionally, in some embodiments of the present application, when the first electronic device has not yet determined whether the first condition is met, in response to receiving the user's operation, the first electronic device determines to obtain the user's authorization and begins to perform subsequent operations. Steps, as shown in Figure 10B.
图10B为本申请实施例提供的用户指示第一电子设备执行通信方法的一个示例性示意图。FIG. 10B is an exemplary schematic diagram in which the user instructs the first electronic device to perform a communication method according to an embodiment of the present application.
如图10B所示,响应于用户的操作,第一电子设备显示的界面从主界面变为菜单栏。其中,操作可以是用户的下滑操作,其中下滑操作的起点为屏幕左上方。As shown in FIG. 10B , in response to the user's operation, the interface displayed by the first electronic device changes from the main interface to the menu bar. The operation may be a user's sliding operation, where the starting point of the sliding operation is the upper left corner of the screen.
其中,第一电子设备显示的主界面如图10B中的(A)所示,第一电子设备显示的菜单栏如图10B中的(B)所示。The main interface displayed by the first electronic device is as shown in (A) in Figure 10B, and the menu bar displayed by the first electronic device is as shown in (B) in Figure 10B.
其中,第一电子设备显示的菜单栏中包括控件1004。响应于接收到用户点击控件1004,第一电子设备确定获取到用户的授权,开始执行后续步骤。Wherein, the menu bar displayed by the first electronic device includes control 1004. In response to receiving the user's click on the control 1004, the first electronic device determines that the user's authorization is obtained and begins to perform subsequent steps.
为了方便说明,称用户点击控件1003或点击控件1004以及其他用于触发第一电子设备开始执行本申请实施例提供的通信方法的操作为第一操作。For convenience of explanation, the operation in which the user clicks on the control 1003 or the control 1004 and other operations for triggering the first electronic device to start executing the communication method provided by the embodiment of the present application is called the first operation.
值得说明的是,并不局限与图10B所示的操作和界面,用户还可以通过其他操作指示第一电子设备开始执行后续步骤。It is worth noting that the operation and interface shown in FIG. 10B are not limited to the operation. The user can also instruct the first electronic device to start performing subsequent steps through other operations.
S9A02:第一电子设备通过广播发现第二电子设备。S9A02: The first electronic device discovers the second electronic device through broadcast.
S9A03:第一电子设备与第二电子设备交换网络参数,第一电子设备确定第二电子设备满足第二条件。S9A03: The first electronic device and the second electronic device exchange network parameters, and the first electronic device determines that the second electronic device meets the second condition.
可以参考上文中图4对应的文字描述,此处不再赘述。You can refer to the text description corresponding to Figure 4 above, and will not go into details here.
S9A04:第一电子设备发送第一请求,第一请求用于建立连接并使第二电子设备为第一电子设备提供网络代理。S9A04: The first electronic device sends a first request, and the first request is used to establish a connection and enable the second electronic device to provide a network proxy for the first electronic device.
第一电子设备向第二电子设备发送第一请求。The first electronic device sends a first request to the second electronic device.
其中,网络代理可以参考上文中图3A和图3B对应的文字描述,此处不再赘述。Among them, the network agent can refer to the text description corresponding to Figure 3A and Figure 3B above, and will not be described again here.
可选地,在本申请一些实施例中,第一请求还包括第一电子设备的标识,该第一电子设备的标识可以用于后续步骤中建立连接。其中,标识可以为第一电子设备的MAC。Optionally, in some embodiments of the present application, the first request also includes the identification of the first electronic device, and the identification of the first electronic device can be used to establish the connection in subsequent steps. The identifier may be the MAC of the first electronic device.
可选地,在本申请一些实施例中,第一请求还包括第一电子设备上登录的账号,如华为账号。Optionally, in some embodiments of the present application, the first request also includes the account logged in on the first electronic device, such as a Huawei account.
可选地,在本申请一些实施例中,第一请求还可以包括网络代理模式。其中,网络代理模式可以参考下文中的文字描述,此处不再赘述。Optionally, in some embodiments of the present application, the first request may also include network proxy mode. Among them, the network proxy mode can refer to the text description below and will not be described again here.
S9A05:第二电子设备显示第二界面,获取用户的授权并确定网络代理模式。S9A05: The second electronic device displays the second interface, obtains the user's authorization and determines the network proxy mode.
第二电子设备在接收到第一请求后,显示第二界面。其中,第二界面如下文中的图11A和图11B所示。After receiving the first request, the second electronic device displays the second interface. The second interface is shown in Figure 11A and Figure 11B below.
图11A、图11B为本申请实施例提供的通信方法中的第二电子设备显示第二界面的一个示例性示意图。11A and 11B are an exemplary schematic diagram of the second interface displayed by the second electronic device in the communication method provided by the embodiment of the present application.
如图11A所示,第二电子设备在接收到第一请求后,显示第二界面中包括窗口1101。窗口1101包括对应网络代理的不同模式的控件,如对应极速模式的控件1102和对应均衡模式的控件1103,以及包括对应拒绝网络代理授权的控件1104。As shown in FIG. 11A , after receiving the first request, the second electronic device displays a window 1101 included in the second interface. The window 1101 includes controls corresponding to different modes of the network proxy, such as a control 1102 corresponding to the extreme speed mode and a control 1103 corresponding to the balanced mode, and a control 1104 corresponding to rejecting network proxy authorization.
其中,窗口1101中的文字为“数据网络共享模式”。 Among them, the text in window 1101 is "data network sharing mode".
响应于接收到用户点击控件1102或控件1103,第二电子设备确定获取用户的授权。In response to receiving the user clicking on the control 1102 or the control 1103, the second electronic device determines to obtain the user's authorization.
响应于接收到用户点击控件1102,第二电子设备确定网络代理模式为极速模式;响应于接收到用户点击控件1103,第二电子设备确定网络代理模式为均衡模式。In response to receiving the user clicking on the control 1102, the second electronic device determines that the network proxy mode is the extreme speed mode; in response to receiving the user clicking on the control 1103, the second electronic device determines that the network proxy mode is the balanced mode.
可选地,在本申请一些实施例中,不同的网络代理模式可以影响第一电子设备与第二电子设备之间的连接的类型。或者,可选地,在本申请一些实施例中,不同的网络代理模式还可以影响第一电子设备发送数据的方式。Optionally, in some embodiments of the present application, different network proxy modes may affect the type of connection between the first electronic device and the second electronic device. Or, optionally, in some embodiments of the present application, different network proxy modes may also affect the way the first electronic device sends data.
表1为本申请实施例提供的网络代理模式与连接的类型和第一电子设备发送数据的方式的对应关系的一个示例性示意表。Table 1 is an exemplary schematic table of the correspondence between the network proxy mode and the type of connection and the way in which the first electronic device sends data provided by the embodiment of the present application.
表1
Table 1
值得说明的是,表1所示的网络代理模式与连接的类型和第一电子设备发送数据的方式的对应关系仅仅是一个示例性说明,网络代理模式可以更多,连接的类型可以更多,第一电子设备发送数据的方式可以更多。It is worth noting that the correspondence between the network proxy mode and the type of connection and the way in which the first electronic device sends data shown in Table 1 is only an illustrative illustration. There can be more network proxy modes and there can be more types of connections. First electronic devices can send data in more ways.
或者,第二电子设备显示的界面还可以如图11B所示。Alternatively, the interface displayed by the second electronic device may also be as shown in Figure 11B.
如图11B所示,第二电子设备显示的界面包括窗口1105,其中,窗口1105包括控件1107和控件1106。窗口1105中的文字为:“是否将数据网络共享至第一电子设备”。As shown in FIG. 11B , the interface displayed by the second electronic device includes a window 1105 , where the window 1105 includes a control 1107 and a control 1106 . The text in the window 1105 is: "Whether to share the data network to the first electronic device".
响应于接收到用户点击控件1106,第二电子设备确定获取用户的授权,第二电子设备确定获取用户的授权。响应于接收到用户点击控件1107,第二电子设备确定用户未授权网络代理。In response to receiving the user click on the control 1106, the second electronic device determines to obtain the user's authorization. The second electronic device determines to obtain the user's authorization. In response to receiving the user click on control 1107, the second electronic device determines that the user is not authorized to network proxy.
在用户点击控件1106后,第二电子设备显示窗口1108,如图11B中(B)所示。其中,窗口1108包括对应网络代理的不同模式的控件,如对应极速模式的控件1109和对应均衡模式的控件1110。其中,窗口1108中包括的文字为:“数据网络共享模式”。 After the user clicks on the control 1106, the second electronic device displays a window 1108, as shown in (B) of Figure 11B. The window 1108 includes controls corresponding to different modes of the network agent, such as a control 1109 corresponding to the extreme speed mode and a control 1110 corresponding to the balanced mode. Among them, the text included in window 1108 is: "data network sharing mode".
响应于接收到用户点击控件1109,第二电子设备确定网络代理模式为极速模式;响应于接收到用户点击控件1110,第二电子设备确定网络代理模式为均衡模式。In response to receiving the user click on the control 1109, the second electronic device determines that the network proxy mode is the extreme speed mode; in response to receiving the user click on the control 1110, the second electronic device determines that the network proxy mode is the balanced mode.
可选地,在本申请一些实施例中,在第一请求还包括第一电子设备上登录的账号的情况下,并且在第一电子设备和第二电子设备为登录同一账号的电子设备的情况下,或者在第一电子设备上登录的账号与第二电子设备登录的账号为同一组(group)的用户,如家庭组,第二电子设备默认已经获得用户的授权。即,第二电子设备只需要向用户确认网络代理模式,或者,第二电子设备随机的选择网络代理模式,或者,第二电子设备选择默认的网络代理模式。Optionally, in some embodiments of the present application, when the first request also includes the account logged in on the first electronic device, and when the first electronic device and the second electronic device are electronic devices logged in with the same account or the account logged in on the first electronic device and the account logged in on the second electronic device belong to the same group (group) of users, such as a family group, the second electronic device has been authorized by the user by default. That is, the second electronic device only needs to confirm the network proxy mode to the user, or the second electronic device randomly selects the network proxy mode, or the second electronic device selects the default network proxy mode.
可选地,在本申请一些实施例中,在第一请求包括网络代理模式的情况下,第二电子设备只需要获取用户的授权。其中,第二电子设备获取用户的授权的方式如图11B中的(A)所示。Optionally, in some embodiments of the present application, when the first request includes network proxy mode, the second electronic device only needs to obtain the user's authorization. The way in which the second electronic device obtains the user's authorization is as shown in (A) in Figure 11B.
可选地,在本申请一些实施例中,在第一请求包括网络代理模式和第一电子设备上登录的账号的情况下,并且第一电子设备上登录的账号与第二电子设备上登录的账户相同或属于同一组的情况下,第二电子设备确定已经获取用户的授权并且第二电子设备确定网络代理模式。Optionally, in some embodiments of the present application, in the case where the first request includes the network proxy mode and the account logged in on the first electronic device, and the account logged on the first electronic device is the same as the account logged on the second electronic device. If the accounts are the same or belong to the same group, the second electronic device determines that the user's authorization has been obtained and the second electronic device determines the network proxy mode.
可选地,在本申请一些实施例中,第二电子设备还可以确定网络代理的数据流量上限如图11C所示。Optionally, in some embodiments of the present application, the second electronic device can also determine the upper limit of data traffic of the network proxy, as shown in Figure 11C.
图11C为本申请实施例提供的通信方法中第二电子设备确定数据流量上限的一个示例性示意图。FIG. 11C is an exemplary schematic diagram of the second electronic device determining the upper limit of data traffic in the communication method provided by the embodiment of the present application.
如图11C所示,第二电子设备显示的界面包括窗口1111,其中,窗口1111包括控件1112、控件1113,控件1114。窗口1111中包括的文字为:“网络代理的数据流量上限”。As shown in FIG. 11C , the interface displayed by the second electronic device includes a window 1111 , where the window 1111 includes controls 1112 , 1113 , and 1114 . The text included in window 1111 is: "Data traffic limit for network proxy".
其中,控件1112对应于网络代理的数据流量上限为1GB;控件1113对应于网络代理的数据流量上限为2GB;控件1114为输入栏,用于获取用户的输入。Among them, control 1112 corresponds to the upper limit of data traffic of the network proxy being 1GB; control 1113 corresponds to the upper limit of data traffic of the network proxy being 2GB; control 1114 is an input field used to obtain user input.
响应于接收到用户点击控件1112,第二电子设备确定网络代理的数据流量上限为1GB;或者,响应于接收到用户点击控件1113,第二电子设备确定网络代理的数据流量上限为2GB;或者,响应于接收到用户在控件1114中的输入,第二电子设备确定网络代理的数据流量上限为用户的输入值。In response to receiving the user clicking on the control 1112, the second electronic device determines that the upper limit of data traffic of the network proxy is 1GB; or, in response to receiving the user clicking on the control 1113, the second electronic device determines that the upper limit of data traffic of the network proxy is 2GB; or, In response to receiving the user's input in the control 1114, the second electronic device determines that the data traffic limit of the network proxy is the user's input value.
可选地,在本申请一些实施例中,在第一电子设备登录的账号与第二电子设备登录的账号相同或者属于同一组的情况下,第二电子设备可以直接确定网络代理的数据流量上限为一个固定值,该固定值可以为预设的值;或者,第二电子设备可以直接确定网络代理的数据流量上限为无穷大,即没有网络代理的数据流量上限。Optionally, in some embodiments of the present application, when the account logged in by the first electronic device and the account logged in by the second electronic device are the same or belong to the same group, the second electronic device can directly determine the upper limit of data traffic of the network proxy. is a fixed value, which can be a preset value; alternatively, the second electronic device can directly determine that the upper limit of data flow of the network agent is infinite, that is, there is no upper limit of data flow of the network agent.
可选地,在本申请一些实施例中,第二电子设备还可以确定网络代理使用的SIM卡,如图11D所示。Optionally, in some embodiments of the present application, the second electronic device can also determine the SIM card used by the network agent, as shown in Figure 11D.
图11D为本申请实施例提供的通信方法中第二电子设备确定网络代理使用的SIM卡的一个示例性示意图。Figure 11D is an exemplary schematic diagram of the second electronic device determining the SIM card used by the network agent in the communication method provided by the embodiment of the present application.
如图11D所示,第二电子设备显示的界面中包括窗口1115,其中,窗口1115包括控件1116和控件1117。窗口1115中包括的文字为:“网络代理使用的SIM卡”。As shown in FIG. 11D , the interface displayed by the second electronic device includes a window 1115 , where the window 1115 includes a control 1116 and a control 1117 . The text included in window 1115 is: "SIM Card Used by Network Agent".
其中,控件1116对应于SIM卡1,SIM卡1与运营商1对应;控件1117对应于SIM卡2,SIM卡2对应于运营商2。Among them, control 1116 corresponds to SIM card 1, and SIM card 1 corresponds to operator 1; control 1117 corresponds to SIM card 2, and SIM card 2 corresponds to operator 2.
响应于接收到用户点击控件1116,第二电子设备确定网络代理的SIM卡为SIM卡1;响应于接收到用户点击控件1117,第二电子设备确定网络代理的SIM卡为SIM卡2。In response to receiving the user clicking on the control 1116, the second electronic device determines that the SIM card of the network agent is SIM card 1; in response to receiving the user clicking on the control 1117, the second electronic device determines that the SIM card of the network agent is SIM card 2.
当第二电子设备确定网络代理的SIM卡和第二电子设备当前使用的SIM卡不同,则第二 电子设备可以切换SIM卡,或者,第二电子设备通过时分复用或者其他方式同时使用SIM卡1和SIM卡2。When the second electronic device determines that the SIM card of the network agent is different from the SIM card currently used by the second electronic device, the second electronic device The electronic device can switch SIM cards, or the second electronic device can use SIM card 1 and SIM card 2 at the same time through time division multiplexing or other methods.
S9A06:基于网络代理模式确定连接的类型,并建立连接。S9A06: Determine the type of connection based on the network proxy mode and establish the connection.
第一电子设备或第二电子设备基于网络代理模式确定连接的类型,其中,网络代理模式与连接的类型的对应关系可以参考上文中表1对应的文字描述,此处不再赘述。The first electronic device or the second electronic device determines the type of connection based on the network proxy mode. For the corresponding relationship between the network proxy mode and the type of connection, please refer to the corresponding text description in Table 1 above, which will not be described again here.
在第一电子设备和第二电子设备建立连接后,第一电子设备和第二电子设备可以在状态栏(status bar)或通知栏中显示对应的图标,如图12A和图12B所示。After the first electronic device and the second electronic device establish a connection, the first electronic device and the second electronic device may display corresponding icons in the status bar (status bar) or notification bar, as shown in Figures 12A and 12B.
图12A和图12B为本申请实施例提供的第一电子设备和/或第二电子设备的界面的一个示例性示意图。FIG. 12A and FIG. 12B are an exemplary schematic diagram of the interface of the first electronic device and/or the second electronic device provided by the embodiment of the present application.
如图12A所示,第一电子设备和/或第二电子设备的状态栏包括图标1201,其中图标1201用于标识第一电子设备和/或第二电子设备建立连接,并且第二电子设备为第一电子设备提供网络代理。As shown in Figure 12A, the status bar of the first electronic device and/or the second electronic device includes an icon 1201, where the icon 1201 is used to identify that the first electronic device and/or the second electronic device establishes a connection, and the second electronic device is First Electronic Devices provides a network proxy.
或者,如图12B所示,第一电子设备和/或第二电子设备的通知栏包括通知1203,其中通知1203用于标识第一电子设备和/或第二电子设备建立连接,并且第二电子设备为第一电子设备提供网络代理。其中,用户可以通过下滑操作呼出通知栏,其中,下滑操作的起点为屏幕左上方。通知栏包括通知1202和通知1203。Alternatively, as shown in FIG. 12B, the notification bar of the first electronic device and/or the second electronic device includes notification 1203, where the notification 1203 is used to identify the first electronic device and/or the second electronic device to establish a connection, and the second electronic device The device provides a network proxy for the first electronic device. Among them, the user can call out the notification bar by sliding down, and the starting point of the sliding operation is the upper left corner of the screen. The notification bar includes notification 1202 and notification 1203.
图9B为本申请实施例提供的通信方法的流程的另一个示例性示意图。FIG. 9B is another exemplary schematic diagram of the flow of the communication method provided by the embodiment of the present application.
S9B01:在第二电子设备为第一电子设备提供网络代理的过程中,第二电子设备满足第三条件后,切换SIM卡。S9B01: In the process of the second electronic device providing a network agent for the first electronic device, after the second electronic device meets the third condition, the SIM card is switched.
其中,若第二电子设备的蜂窝移动通信的质量低于质量阈值,则确定符合第三条件。其中,实时的蜂窝移动通信的质量的衡量方法可以参考上文中图3A对应的文字描述,此处不再赘述。Wherein, if the quality of the cellular mobile communication of the second electronic device is lower than the quality threshold, it is determined that the third condition is met. For the method of measuring the quality of real-time cellular mobile communication, please refer to the text description corresponding to Figure 3A above, and will not be described again here.
可选地,在本申请一些实施例中,第三条件还可以是:第一电子设备当前的SIM卡的流量已经使用完。Optionally, in some embodiments of the present application, the third condition may also be: the traffic of the current SIM card of the first electronic device has been used up.
S9B02:第二电子设备暂停网络代理,向第一电子设备发送更新后的网络参数。S9B02: The second electronic device suspends the network agent and sends updated network parameters to the first electronic device.
由于第二电子设备切换SIM卡,在第二电子设备暂停网络代理后,需要向第一电子设备发送更新后的网络参数。Since the second electronic device switches the SIM card, after the second electronic device suspends the network agent, it needs to send updated network parameters to the first electronic device.
可选地,在本申请一些实施例中,第一电子设备可以基于更新后的网络参数确定是否由该第二电子设备继续提供网络代理。Optionally, in some embodiments of the present application, the first electronic device may determine whether the second electronic device continues to provide a network agent based on the updated network parameters.
S9B03:在运营商不同的情况下,第二电子设备继续为第一电子设备提供网络代理;在运营商相同的情况下,在第二电子设备的小区切换策略和/或接入小区与第一电子设备不同的情况下,第二电子设备继续为第一电子设备提供网络代理。S9B03: In the case of different operators, the second electronic device continues to provide a network agent for the first electronic device; in the case of the same operator, the cell switching strategy and/or access cell of the second electronic device is the same as that of the first electronic device. When the electronic devices are different, the second electronic device continues to provide a network proxy for the first electronic device.
在运营商不同的情况下,第二电子设备可以继续为第一电子设备提供网络代理。In the case of different operators, the second electronic device can continue to provide a network proxy for the first electronic device.
在运营商相同的情况下,在第二电子设备的小区切换策略和/或接入小区与第一电子设备不同的情况下,第二电子设备可以继续为第一电子设备提供网络代理。In the case where the operator is the same and the cell switching policy and/or the access cell of the second electronic device is different from that of the first electronic device, the second electronic device may continue to provide a network agent for the first electronic device.
可选地,在本申请一些实施例中,在运营商相同和小区切换策略相同的情况下,第一电子设备可以向第二电子设备发送指示,以指示第二电子设备改变小区切换策略。然后,第二 电子设备可以继续为第一电子设备提供网络代理。Optionally, in some embodiments of the present application, when the operator is the same and the cell switching strategy is the same, the first electronic device can send an instruction to the second electronic device to instruct the second electronic device to change the cell switching strategy. Then, second The electronic device may continue to provide a network proxy to the first electronic device.
可选地,在本申请一些实施例中,在运营商相同和接入小区相同的情况下,第一电子设备可以向第二电子设备发送指示,以指示第二电子设备改变接入小区。然后,第二电子设备可以继续为第一电子设备提供网络代理。Optionally, in some embodiments of the present application, when the operator is the same and the access cell is the same, the first electronic device can send an instruction to the second electronic device to instruct the second electronic device to change the access cell. The second electronic device can then continue to provide the network proxy for the first electronic device.
可选地,在本申请一些实施例中,在运营商相同和小区重选策略相同的情况下,第一电子设备可以向第二电子设备发送指示,以指示第二电子设备改变小区重选策略。然后,第二电子设备可以继续为第一电子设备提供网络代理。Optionally, in some embodiments of the present application, when the operator is the same and the cell reselection strategy is the same, the first electronic device can send an instruction to the second electronic device to instruct the second electronic device to change the cell reselection strategy. . The second electronic device can then continue to provide the network proxy for the first electronic device.
在从电子设备交互的角度和人机交互的角度介绍了本申请提供的传输方法,下面分别从第一电子设备侧和第二电子设备侧介绍本申请实施例提供的传输方法。The transmission method provided by this application is introduced from the perspective of electronic device interaction and human-computer interaction. The transmission method provided by the embodiment of this application is introduced from the first electronic device side and the second electronic device side respectively.
首先,从第一电子设备侧介绍本申请实施例提供的通信方法。First, the communication method provided by the embodiment of the present application is introduced from the side of the first electronic device.
图13为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 13 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
S1301:第一电子设备判断是否满足第一条件或者是否接收到用户的第一操作。S1301: The first electronic device determines whether the first condition is met or whether the user's first operation is received.
其中,第一条件可以参考上文中图3A和图3B中对应的文字描述,此处不再赘述。For the first condition, please refer to the corresponding text descriptions in FIG. 3A and FIG. 3B above, and will not be described again here.
其中,第一操作可以参考上文中图10A和图10B中对应的文字描述,此处不再赘述。For the first operation, please refer to the corresponding text descriptions in FIG. 10A and FIG. 10B above, and will not be described again here.
当第一电子判断满足第一条件或者确定接收到用户的第一操作后,第一电子设备执行步骤S1302。After the first electronic device determines that the first condition is met or the first operation of the user is received, the first electronic device executes step S1302.
S1302:通过广播发现第二电子设备,获取第二电子设备的网络参数。S1302: Discover the second electronic device through broadcast, and obtain the network parameters of the second electronic device.
网络参数、网络参数的获取方式可以参考上文中图4对应的文字描述,此处不再赘述。For network parameters and how to obtain network parameters, please refer to the text description corresponding to Figure 4 above, and will not be described again here.
S1303:第一电子设备基于获取的网络参数判断第二电子设备是否满足第二条件。S1303: The first electronic device determines whether the second electronic device meets the second condition based on the obtained network parameters.
当第一电子设备确定第二电子设备满足第二条件后,执行步骤S1304。After the first electronic device determines that the second electronic device meets the second condition, step S1304 is executed.
其中,第二条件的内容可以参考上文中图4对应的文字描述,此处不再赘述。For the content of the second condition, please refer to the text description corresponding to Figure 4 above, and will not be described again here.
S1304:向第二电子设备发送第一请求,并与第二电子设备建立连接。S1304: Send the first request to the second electronic device and establish a connection with the second electronic device.
第一请求、连接的类型可以参考上文中图4和图9A对应的文字描述,此处不再赘述。For the type of the first request and connection, please refer to the text description corresponding to Figure 4 and Figure 9A above, and will not be described again here.
S1305:第一电子设备基于至少两条数据通道发送、接收数据。S1305: The first electronic device sends and receives data based on at least two data channels.
第一电子设备基于至少两条数据通道发送、接收数据的内容可以参考上文中图7A、图7B和图7C对应的文字描述,此处不再赘述。For the content of data sent and received by the first electronic device based on at least two data channels, please refer to the text descriptions corresponding to FIG. 7A, FIG. 7B and FIG. 7C above, and will not be described again here.
可选地,在本申请一些实施例中,第一电子设备将部分应用程序的数据通过至少两条数据通道发送。例如,第一电子设备上存有一个白名单,白名单记录的应用程序的数据可以通过至少两条数据通道发送,即该白名单记录的应用程序的数据可以通过第二电子设备提供的网络代理转发;或者,又例如,第一电子设备上存有一个黑名单,不在黑名单记录的应用程序的数据可以通过至少两条数据通道发送,即黑名单记录的应用程序的数据不可以通过第二电子设备提供的网络代理转发。Optionally, in some embodiments of the present application, the first electronic device sends data of part of the application program through at least two data channels. For example, there is a whitelist on the first electronic device, and the data of the applications recorded in the whitelist can be sent through at least two data channels, that is, the data of the applications recorded in the whitelist can be sent through the network proxy provided by the second electronic device. Forwarding; or, for another example, there is a blacklist on the first electronic device, and data of applications not recorded in the blacklist can be sent through at least two data channels, that is, data of applications recorded in the blacklist cannot be sent through the second Network proxy forwarding provided by electronic devices.
其中,白名单可以包括浏览器、音乐类应用如视频类应用如其中,黑名单可以包括支付应用如语音通讯应用如等。Among them, the whitelist can include browsers, music applications such as and Video applications such as and Among them, the blacklist can include payment applications such as and Voice communication applications such as wait.
可以理解的是,由于第二电子设备为第一电子设备提供网络代理,并且第二电子设备并 非网络设备,为了充分保护第一电子设备的用户的隐私和财产安全,第一电子设备禁止将黑名单内或者除白名单之外的应用程序的数据发送到第二电子设备上。It can be understood that since the second electronic device provides a network proxy for the first electronic device, and the second electronic device does not For non-network devices, in order to fully protect the privacy and property security of the user of the first electronic device, the first electronic device prohibits sending data of applications in the blacklist or other than the whitelist to the second electronic device.
其次,从第二电子设备侧介绍本申请实施例提供的通信方法。Next, the communication method provided by the embodiment of the present application is introduced from the side of the second electronic device.
图14为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 14 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
S1401:接收到第一电子设备发送的广播后,第二电子设备发送网络参数。S1401: After receiving the broadcast sent by the first electronic device, the second electronic device sends network parameters.
第二电子设备在接收到第一电子设备发送的广播后,该广播用于请求第二电子设备的网络参数,第二电子设备发送网络参数。After the second electronic device receives the broadcast sent by the first electronic device, the broadcast is used to request the network parameters of the second electronic device, and the second electronic device sends the network parameters.
可选地,在本申请一些实施例中,当第二电子设备确定自己处于弱网状态或无网状态的情况下,可以不响应该广播。Optionally, in some embodiments of the present application, when the second electronic device determines that it is in a weak network state or no network state, it may not respond to the broadcast.
其中,网络参数可以参考上文中图4对应的文字描述,此处不再赘述。Among them, the network parameters can refer to the text description corresponding to Figure 4 above, and will not be described again here.
S1402:第二电子设备接收到第一请求,判断第一请求中是否包括账号和网络代理模式。S1402: The second electronic device receives the first request and determines whether the first request includes an account number and network proxy mode.
第二电子设备接收到第一请求后,若第一请求中包括账号和网络代理模式,则执行步骤S1403;若第一请求中不包括账号和网络代理模式,则执行步骤S1404。After receiving the first request, the second electronic device executes step S1403 if the first request includes the account number and the network proxy mode; if the first request does not include the account number and the network proxy mode, executes step S1404.
S1403:第二电子设备判断第二电子设备上登录的账户和第一请求中的账户是否相同或者属于同一组。S1403: The second electronic device determines whether the account logged in on the second electronic device and the account in the first request are the same or belong to the same group.
若第二电子设备上登录的账户和第一请求中的账户相同或者属于同一组,则执行步骤S1405;若第二电子设备上登录的账户和第一请求中的账户不相同并且不属于同一组,则执行步骤S1404。If the account logged in on the second electronic device is the same as the account in the first request or belongs to the same group, then step S1405 is executed; if the account logged on the second electronic device is different from the account in the first request and does not belong to the same group. , then execute step S1404.
S1404:响应于接收到用户的操作,第二电子设备确定获取用户的授权并确定网络代理模式。S1404: In response to receiving the user's operation, the second electronic device determines to obtain the user's authorization and determines the network proxy mode.
第二电子设备确定获取用户的授权和确定网络代理模式可以参考上文中图11A、图11B和图11C对应的文字描述,此处不再赘述。The second electronic device determines to obtain the user's authorization and determines the network proxy mode by referring to the text descriptions corresponding to FIG. 11A, FIG. 11B and FIG. 11C above, which will not be described again here.
S1405:第二电子设备直接确定网络代理模式。S1405: The second electronic device directly determines the network proxy mode.
由于第一请求中包括网络代理模式,所以第一电子设备可以直接确定网络代理模式。Since the first request includes the network proxy mode, the first electronic device can directly determine the network proxy mode.
S1406:第二电子设备基于网络代理模式确定连接的类型,并且第二电子设备与第一电子设备建立连接,并在建立连接后为第一电子设备提供网络代理。S1406: The second electronic device determines the type of connection based on the network proxy mode, establishes a connection with the first electronic device, and provides a network proxy for the first electronic device after the connection is established.
其中,基于网络代理模式确定连接的类型可以参考上文中表1对应的文字描述,此处不再赘述。To determine the type of connection based on the network proxy mode, please refer to the text description corresponding to Table 1 above, which will not be described again here.
上文主要从电子设备的角度、人机交互的角度、第一电子设备侧、第二电子设备侧介绍了本申请实施例提供的通信方法。下面结合具体的场景介绍本申请实施例提供的通信方法。The above mainly introduces the communication method provided by the embodiment of the present application from the perspective of electronic equipment, the perspective of human-computer interaction, the first electronic device side, and the second electronic device side. The communication method provided by the embodiment of the present application is introduced below with reference to specific scenarios.
首先,介绍第一电子设备和第二电子设备接入的蜂窝移动网络的运营商相同的情况。First, a situation is introduced where the operators of the cellular mobile networks accessed by the first electronic device and the second electronic device are the same.
图15为本申请实施例提供的通信方法的流程的另一个示例性示意图。Figure 15 is another exemplary schematic diagram of the flow of a communication method provided by an embodiment of the present application.
S1501:第一电子设备确定满足第一条件后,通过广播发现第二电子设备,获取网络参数。S1501: After determining that the first condition is met, the first electronic device discovers the second electronic device through broadcast and obtains network parameters.
第一条件、网络参数可以参考上文中图4对应的文字描述,此处不再赘述。 For the first condition and network parameters, please refer to the text description corresponding to Figure 4 above, and will not be repeated here.
其中,第一电子设备可以通过以广播的形式发送请求,第二电子设备接收到请求后,向第一电子设备发送网络参数。The first electronic device may send the request in the form of a broadcast, and after receiving the request, the second electronic device sends the network parameters to the first electronic device.
可选地,在本申请一些实施例中,第二电子设备接收到请求后,向第一电子设备发送剩余流量、电量等参数。Optionally, in some embodiments of the present application, after receiving the request, the second electronic device sends parameters such as remaining traffic and power to the first electronic device.
S1502:响应于用户的操作,确定第二电子设备。S1502: In response to the user's operation, determine the second electronic device.
第一电子设备发现多个电子设备后,可以显示界面以向用户展示发现的电子设备如图16所示。After discovering multiple electronic devices, the first electronic device may display an interface to display the discovered electronic devices to the user, as shown in FIG. 16 .
图16为本申请实施例提供的第一电子设备的界面的一个示例性示意图。Figure 16 is an exemplary schematic diagram of an interface of a first electronic device provided by an embodiment of the present application.
如图16所示,第一电子设备上显示的界面包括对应于不同的电子设备的控件。例如,对应于第四电子设备的控件1601、对应于第三电子设备的控件1602、对应第二电子设备的控件1603。As shown in FIG. 16 , the interface displayed on the first electronic device includes controls corresponding to different electronic devices. For example, the control 1601 corresponding to the fourth electronic device, the control 1602 corresponding to the third electronic device, and the control 1603 corresponding to the second electronic device.
当用户点击第二电子设备后,第一电子设备确定第二电子设备。When the user clicks on the second electronic device, the first electronic device determines the second electronic device.
可选地,在本申请一些实施例中,每个与电子设备对应的控件上还可以显示不同电子设备的对应的控件上还可以显示该电子设备的电量、运营商等信息。例如,如图16所示,控件1603上显示有控件1604和控件1605。其中,控件1604显示第二电子设备接入的蜂窝移动网络的运营商,控件1605显示第二电子设备的剩余流量。例如,第二电子设备接入的蜂窝移动网络的运营商为运营商B、第二电子设备的剩余流量为115GB。Optionally, in some embodiments of the present application, each control corresponding to an electronic device may also display information on a different electronic device. The corresponding control of the electronic device may also display information such as the power of the electronic device and the operator. For example, as shown in FIG. 16 , a control 1604 and a control 1605 are displayed on the control 1603 . The control 1604 displays the operator of the cellular mobile network connected to the second electronic device, and the control 1605 displays the remaining traffic of the second electronic device. For example, the operator of the cellular mobile network accessed by the second electronic device is operator B, and the remaining traffic of the second electronic device is 115GB.
可选地,在本申请一些实施例中,在发现多个电子设备后,在显示界面前,第一电子设备可以发送询问请求以获取多个电子设备的网络参数,并按照网络参数排列不同的电子设备在界面上的排列顺序。其中,网络参数排列的优先级由高到低可以为接入的蜂窝网络的运营商不同、接入的蜂窝网络的运营商相同但是接入小区不同、接入的蜂窝网络的运营商相同并且接入小区相同。Optionally, in some embodiments of the present application, after discovering multiple electronic devices, in front of the display interface, the first electronic device can send a query request to obtain the network parameters of the multiple electronic devices, and arrange different electronic devices according to the network parameters. The order in which electronic devices are arranged on an interface. Among them, the priority of the network parameter arrangement from high to low can be: the operators of the accessed cellular networks are different, the operators of the accessed cellular networks are the same but the access cells are different, the operators of the accessed cellular networks are the same and the access cells are different, the operators of the accessed cellular networks are the same and the access cells are different. Entering the community is the same.
可选地,在本申请一些实施例中,在发现多个电子设备后,在显示界面前,第一电子设备可以发送询问请求以获取多个电子设备的网络参数、剩余流量、电量、其他电子设备与第一电子设备之间的距离等更多参数,并按照网络参数、剩余流量、电量、其他电子设备与第一电子设备之间的距离等更多参数排列不同的电子设备对应的控件在界面上的排列顺序。其中,在显示界面上显示在上或者显示在前的电子设备为更适合提高第一电子设备的通信质量的电子设备。Optionally, in some embodiments of the present application, after discovering multiple electronic devices, in front of the display interface, the first electronic device can send an inquiry request to obtain the network parameters, remaining traffic, power, and other electronic devices of the multiple electronic devices. The distance between the device and the first electronic device and other more parameters, and the controls corresponding to different electronic devices are arranged according to more parameters such as network parameters, remaining traffic, power, the distance between other electronic devices and the first electronic device, etc. The sort order on the interface. Among them, the electronic device displayed above or in front on the display interface is an electronic device more suitable for improving the communication quality of the first electronic device.
S1503:第一电子设备与第二电子设备建立连接。S1503: The first electronic device establishes a connection with the second electronic device.
可选地,在本申请一些实施例中,第一电子设备与第二电子设备建立连接后,第一电子设备才会基于该连接获取第二电子设备的网络参数。在该情况下,图16所示的界面中不会显示其他电子设备的网络参数。Optionally, in some embodiments of the present application, after the first electronic device establishes a connection with the second electronic device, the first electronic device obtains the network parameters of the second electronic device based on the connection. In this case, the network parameters of other electronic devices will not be displayed in the interface shown in FIG. 16 .
可选地,如上文中图4所示的内容,第一电子设备或第二电子设备还可以确定网络代理模式,进而确定连接的类型。Optionally, as shown in Figure 4 above, the first electronic device or the second electronic device can also determine the network proxy mode, and then determine the type of connection.
S1504:第二电子设备为第一电子设备提供网络代理。S1504: The second electronic device provides a network proxy for the first electronic device.
网络代理可以参考上文中图3A和图3B对应的文字描述,此处不再赘述。The network agent may refer to the text description corresponding to Figure 3A and Figure 3B above, and will not be described again here.
S1505:可选地,第一电子设备确定第一电子设备和第二电子设备接入的蜂窝移动通信网 络的运营商相同。S1505: Optionally, the first electronic device determines the cellular mobile communication network accessed by the first electronic device and the second electronic device. The network operator is the same.
可选地,第一电子设备在接收到第二电子设备的网络参数后,第一电子设备可以确定第一电子设备和第二电子设备接入的蜂窝移动通信网络的运营商相同。Optionally, after the first electronic device receives the network parameters of the second electronic device, the first electronic device may determine that the operator of the cellular mobile communication network accessed by the first electronic device and the second electronic device is the same.
S1506:可选地,发送第二请求,第二请求用于改变小区切换策略和/或小区重选策略或者,第二请求用于指示第二电子设备接入与第一电子设备接入小区不同的小区。S1506: Optionally, send a second request, the second request is used to change the cell switching strategy and/or the cell reselection strategy, or the second request is used to indicate that the second electronic device accesses a cell different from the first electronic device accessing the cell. community.
值得说明的是,当第一电子设备和第二电子设备的小区切换策略和/或小区重选策略相同的情况下,第一电子设备可以不发送第二请求。It is worth noting that when the cell switching strategies and/or cell reselection strategies of the first electronic device and the second electronic device are the same, the first electronic device may not send the second request.
可选的,在本申请一些实施例中,第一电子设备可以基于连接确定第二电子设备的小区切换策略和第一电子设备的小区切换策略相同;或者,第一电子设备可以基于连接确定第二电子设备的小区重选策略和第一电子设备的小区重选策略相同。Optionally, in some embodiments of the present application, the first electronic device may determine based on the connection that the cell switching strategy of the second electronic device is the same as the cell switching strategy of the first electronic device; or, the first electronic device may determine based on the connection that the cell switching strategy of the second electronic device is the same. The cell reselection strategy of the second electronic device is the same as the cell reselection strategy of the first electronic device.
可选地,在第一电子设备可以确定第一电子设备和第二电子设备接入的蜂窝移动通信网络的运营商相同后,第一电子设备可以向第二电子设备发送第二请求。其中,第二请求用于改变小区切换策略和/或小区重选策略,或者,第二请求用于指示第二电子设备接入与第一电子设备接入小区不同的小区。Optionally, after the first electronic device may determine that the operators of the cellular mobile communication networks accessed by the first electronic device and the second electronic device are the same, the first electronic device may send a second request to the second electronic device. The second request is used to change the cell switching strategy and/or the cell reselection strategy, or the second request is used to instruct the second electronic device to access a cell that is different from the first electronic device's access cell.
可选地,在第一电子设备和第二电子设备建立连接后,第二电子设备和第一电子设备会实时的交换更新后的网络参数。Optionally, after the first electronic device and the second electronic device establish a connection, the second electronic device and the first electronic device may exchange updated network parameters in real time.
可选地,在第一电子设备和第二电子设备建立连接后,第二电子设备在网络参数变化后,会实时的通知第一电子设备。Optionally, after the first electronic device and the second electronic device establish a connection, the second electronic device notifies the first electronic device in real time after the network parameters change.
当第二请求为用于改变小区切换策略和/或小区重选策略的请求后,第二电子设备的小区切换策略和/或小区重选策略不同。在该情况下,第一电子设备和第二电子设备的小区驻留情况如图17所示。When the second request is a request for changing the cell switching strategy and/or the cell reselection strategy, the cell switching strategy and/or the cell reselection strategy of the second electronic device are different. In this case, the cell camping status of the first electronic device and the second electronic device is as shown in FIG. 17 .
图17为本申请实施例提供的传输方法中第一电子设备和第二电子设备的小区驻留情况的一个示例性示意图。Figure 17 is an exemplary schematic diagram of the cell camping situation of the first electronic device and the second electronic device in the transmission method provided by the embodiment of the present application.
设第一电子设备和第二电子设备接入蜂窝移动通信网络的运营商均为运营商1,且第一电子设备和第二电子设备均在新的小区的信号强度高于旧小区的信号强度的情况下重选至信号强度高的小区,且第一电子设备和第二电子设备的位置可以认为相近(第一电子设备和第二电子设备的空间距离小于第一电子设备和第二电子设备与基站或者其他类型的无线接入点的距离至少一个数量级)。Assume that the operators of the first electronic device and the second electronic device accessing the cellular mobile communication network are both operator 1, and the signal strength of the first electronic device and the second electronic device in the new cell is higher than the signal strength of the old cell. In this case, reselect to a cell with high signal strength, and the locations of the first electronic device and the second electronic device can be considered to be similar (the spatial distance between the first electronic device and the second electronic device is smaller than that of the first electronic device and the second electronic device at least an order of magnitude away from a base station or other type of wireless access point).
设第二电子设备在接收到第二请求后,小区重选策略变为新的小区的信号强度高于旧小区的信号强度Xdb后,第二电子设备才切换到新小区。例如,X可以取0.5。It is assumed that after the second electronic device receives the second request, the cell reselection policy changes to the signal strength of the new cell being higher than the signal strength of the old cell Xdb, and then the second electronic device switches to the new cell. For example, X can take 0.5.
在该情况下,第一电子设备和第二电子设备的小区驻留的情况如图17所示。In this case, the cell camping situation of the first electronic device and the second electronic device is as shown in FIG. 17 .
其中,在T0时刻至T1时刻,第一电子设备和第二电子设备可以确定小区1的信号强度高于小区2的信号强度;在T1时刻至T2时刻,第一电子设备和第二电子设备可以确定小区2的信号强度高于小区1的信号强度,但是小区2的信号强度不高与小区1的信号强度0.5db;在T2时刻至T3时刻,第一电子设备和第二电子设备可以确定小区2的信号强度高于小区1的信号强度0.5db;在T3时刻至T4时刻,第一电子设备和第二电子设备可以确定小区3的信号强度高于小区2的信号强度,小区3的信号强度不高于小区2的信号强度0.5db;在T4时刻后,第一电子设备和第二电子设备可以确定小区3的信号强度高于小区2的信号强度0.5db。Among them, from time T0 to time T1, the first electronic device and the second electronic device can determine that the signal strength of cell 1 is higher than the signal strength of cell 2; from time T1 to time T2, the first electronic device and the second electronic device can determine It is determined that the signal strength of cell 2 is higher than the signal strength of cell 1, but the signal strength of cell 2 is not higher than the signal strength of cell 1 by 0.5db; from time T2 to time T3, the first electronic device and the second electronic device can determine the cell The signal strength of 2 is 0.5db higher than the signal strength of cell 1; from time T3 to time T4, the first electronic device and the second electronic device can determine that the signal strength of cell 3 is higher than the signal strength of cell 2, and the signal strength of cell 3 Not higher than the signal strength of Cell 2 by 0.5db; after time T4, the first electronic device and the second electronic device can determine that the signal strength of Cell 3 is higher than the signal strength of Cell 2 by 0.5db.
在T0时刻至T1时刻,第一电子设备和第二电子设备均驻留在小区1;在T1时刻至T2 时刻,第一电子设备驻留在小区2,第二电子设备驻留在小区1;在T2时刻至T3时刻,第一电子设备和第二电子设备驻留在小区2;在T3时刻至T4时刻,第一电子设备驻留在小区3,第二电子设备驻留在小区2;在T4时刻后,第一电子设备和第二电子设备驻留在小区3。From time T0 to time T1, both the first electronic device and the second electronic device reside in cell 1; from time T1 to time T2 At time, the first electronic device resides in cell 2, and the second electronic device resides in cell 1; from time T2 to time T3, the first electronic device and the second electronic device reside in cell 2; from time T3 to time T4 , the first electronic device is camped in cell 3, and the second electronic device is camped in cell 2; after time T4, the first electronic device and the second electronic device are camped in cell 3.
类似的,第二电子设备接收到第二请求后,也可以改变上报给基站或其他类型的无线接入点的影响小区切换策略的参数的值。其中,影响小区切换策略的参数如邻区的RSRP、或者小区选择接收电平值Srxlev等,在此不做限定。Similarly, after receiving the second request, the second electronic device can also change the value of the parameter that affects the cell switching strategy reported to the base station or other types of wireless access points. Among them, the parameters that affect the cell handover strategy, such as the RSRP of the neighboring cell or the cell selection reception level value S rxlev , etc., are not limited here.
可以理解的是,通过改变第二电子设备的小区切换策略和/或小区重选策略,可以使得第一电子设备不会和第二电子设备同时处于小区重选或小区切换的过程中,进而使得第一电子设备在大部分时间内总有一条数据通道和互联网联通,进而保证了第一电子设备的通信质量,提升第一电子设备通信的稳健性;除此之外,在第一电子设备为第二电子设备提供网络代理的情况下,也保证了第二电子设备的通信质量,提升了第二电子设备通信的稳健性。It can be understood that by changing the cell switching strategy and/or cell reselection strategy of the second electronic device, the first electronic device and the second electronic device will not be in the process of cell reselection or cell switching at the same time, thereby making The first electronic device always has a data channel connected to the Internet most of the time, thereby ensuring the communication quality of the first electronic device and improving the robustness of the communication of the first electronic device; in addition, when the first electronic device is When the second electronic device provides a network agent, the communication quality of the second electronic device is also ensured and the robustness of the communication of the second electronic device is improved.
S1507:可选地,发送第三请求,第三请求用于指示第二电子设备切换SIM卡。S1507: Optionally, send a third request. The third request is used to instruct the second electronic device to switch SIM cards.
可选地,在本申请一些实施例中,第一电子设备也可以发送第三请求以指示第二电子设备切换SIM卡进而切换第二电子设备接入蜂窝移动通信网络的运营商。其中,切换后的第二电子设备接入蜂窝移动通信网络的运营商与第一电子设备接入蜂窝移动通信网络的运营商不同。Optionally, in some embodiments of the present application, the first electronic device may also send a third request to instruct the second electronic device to switch the SIM card and then switch the operator of the cellular mobile communication network for the second electronic device to access. Wherein, the operator through which the second electronic device accesses the cellular mobile communication network after switching is different from the operator through which the first electronic device accesses the cellular mobile communication network.
S1508:第一电子设备基于至少两个数据通道发送、接收数据。S1508: The first electronic device sends and receives data based on at least two data channels.
第一电子设备基于至少两个数据通道发送、接收数据的内容可以参考上文中图7A、图7B和图7C所示的内容,此处不再赘述。For the content of data sent and received by the first electronic device based on at least two data channels, reference can be made to the content shown in FIG. 7A, FIG. 7B and FIG. 7C above, which will not be described again here.
其次,下面介绍本申请实施例提供的通信方法中,第一电子设备和第二电子设备更换连接的类型的情况。Secondly, the following describes the situation in which the first electronic device and the second electronic device change the connection type in the communication method provided by the embodiment of the present application.
可选地,在本申请一些实施例中,第一电子设备和第二电子设备在建立连接后,第一电子设备基于在数据通道2上发送数据的速率及其他参数,第一电子设备以指示对端电子设备更换连接的类型,然后重新连接。Optionally, in some embodiments of the present application, after the first electronic device and the second electronic device establish a connection, the first electronic device indicates based on the rate of sending data on the data channel 2 and other parameters. The peer electronic device changes the type of connection and reconnects.
或者,可选地,在本申请一些实施例中,第二电子设备根据在数据通道2上接收数据的速率及其他参数,第二电子设备可以指示第一电子设备更换连接的类型,然后重新建立连接。Or, optionally, in some embodiments of the present application, the second electronic device can instruct the first electronic device to change the type of connection according to the rate of receiving data on data channel 2 and other parameters, and then re-establish connect.
图18为本申请实施例提供的通信方法中第一电子设备指示第二电子设备切换建立连接的类型的一个示例性示意图。FIG. 18 is an exemplary schematic diagram in which the first electronic device instructs the second electronic device to switch the type of connection establishment in the communication method provided by the embodiment of the present application.
S1801:第一电子设备确定数据通道2的通信质量低于阈值。S1801: The first electronic device determines that the communication quality of data channel 2 is lower than the threshold.
其中,第一电子设备可以通过多种参数确定数据通道2的通信质量。多种参数可以包括信号强度、时延、误码率等中的一种或多种,在此不做限定。Wherein, the first electronic device can determine the communication quality of the data channel 2 through various parameters. The various parameters may include one or more of signal strength, delay, bit error rate, etc., which are not limited here.
或者,第一电子设备可以确定第一电子设备上应用程序产生数据的速率大于第一电子设备在数据通道2上发送数据的速率,则第一电子设备确定数据通道2的通信质量低于阈值;或者,第一电子设备可以确定网卡缓冲中存在积压的用于在数据通道2上发出的数据,则第一电子设备确定数据通道2的通信质量低于阈值。Alternatively, the first electronic device may determine that the rate at which the application program on the first electronic device generates data is greater than the rate at which the first electronic device sends data on data channel 2, then the first electronic device determines that the communication quality of data channel 2 is lower than the threshold; Alternatively, the first electronic device may determine that there is backlog of data for sending on the data channel 2 in the network card buffer, and then the first electronic device determines that the communication quality of the data channel 2 is lower than the threshold.
S1802:第一电子设备向第二电子设备发送第四请求,第四请求用于指示第二电子设备更换连接的类型。 S1802: The first electronic device sends a fourth request to the second electronic device. The fourth request is used to instruct the second electronic device to change the connection type.
其中,不同类型的连接可以有不同的优先级。例如,5G WiFi连接的优先级大于UWB连接的优先级,UWB连接的优先级大于2.4G WiFi连接的优先级,2.4G WiFi连接的优先级大于蓝牙连接的优先级。Among them, different types of connections can have different priorities. For example, the priority of 5G WiFi connection is greater than the priority of UWB connection, the priority of UWB connection is greater than the priority of 2.4G WiFi connection, and the priority of 2.4G WiFi connection is greater than the priority of Bluetooth connection.
其中,更换连接的类型后,更换后的连接的类型的优先级高于更换前的连接的类型的优先级。Wherein, after the connection type is changed, the priority of the connection type after the change is higher than the priority of the connection type before the change.
S1803:第二电子设备向第一电子设备发送确认消息。S1803: The second electronic device sends a confirmation message to the first electronic device.
第二电子设备在接收到第四请求后,第二电子设备可以向第一电子设备发送确认消息,进而通知第一电子设备,第二电子设备已经做好切换连接的准备。After the second electronic device receives the fourth request, the second electronic device may send a confirmation message to the first electronic device, thereby notifying the first electronic device that the second electronic device is ready to switch the connection.
可选地,在本申请一些实施例中,确认消息还可以包括用于重新建立连接的参数。Optionally, in some embodiments of the present application, the confirmation message may also include parameters for re-establishing the connection.
S1804:第一电子设备和第二电子设备重新建立连接。S1804: The first electronic device and the second electronic device re-establish a connection.
再次,示例性的介绍本申请实施例提供的传输方法中,第二电子设备对数据的处理过程。Again, the data processing process of the second electronic device in the transmission method provided by the embodiment of the present application is introduced as an example.
在上文中,介绍了第二电子设备可以将来自于第一电子设备的传输数据当做传输层报文或应用层报文进行封装,进而得到物理层报文(网络报文),通过蜂窝移动通信网络发送出去。In the above, it is introduced that the second electronic device can encapsulate the transmission data from the first electronic device as a transport layer message or an application layer message, and then obtain a physical layer message (network message), through cellular mobile communication sent by the network.
除此之外,可选地,在本申请一些实施例中,第二电子设备在接收到第一电子设备通过数据通道2发送的数据后,可以修改该数据的处理优先级,进而使得第二电子设备优先处理该数据或者延后处理该数据。其中,该优先级由业务或应用程序指定,也可以称为业务优先级。In addition, optionally, in some embodiments of the present application, after receiving the data sent by the first electronic device through data channel 2, the second electronic device can modify the processing priority of the data, thereby allowing the second electronic device to modify the processing priority of the data. The electronic device prioritizes processing of the data or delays processing of the data. Among them, the priority is specified by the business or application program, and can also be called business priority.
其中,第二电子设备可以根据网络代理模式修改接收到的来自第一电子设备的数据的优先级。例如,网络代理模式为极速模式的情况下,第二电子设备会提高来自第一电子设备的数据的优先级。又例如,网络代理模式为均衡模式的情况下,第二电子设备可以不改变第一电子设备的数据的优先级,或者降低来自第一电子设备的数据的优先级。Wherein, the second electronic device may modify the priority of the data received from the first electronic device according to the network proxy mode. For example, when the network proxy mode is the extreme speed mode, the second electronic device will increase the priority of data from the first electronic device. For another example, when the network proxy mode is the balancing mode, the second electronic device may not change the priority of the data from the first electronic device, or lower the priority of the data from the first electronic device.
图19为本申请实施例提供的传输方法中第二电子设备修改第一电子设备发送的数据的优先级的一个示例性示意图。Figure 19 is an exemplary schematic diagram of a second electronic device modifying the priority of data sent by the first electronic device in the transmission method provided by the embodiment of the present application.
如图19所示,音乐应用程序向协议栈发送业务数据,协议栈在封装该数据的过程中按照标准协议添加优先级标识的数据,然后协议栈将携带有优先级标识的数据发送到无线通信模块。As shown in Figure 19, the music application sends business data to the protocol stack. In the process of encapsulating the data, the protocol stack adds data with priority identification according to the standard protocol. Then the protocol stack sends the data with the priority identification to the wireless communication module.
第一电子设备通过无线通信模块将该数据发送到第二电子设备,第二电子设备通过无线通信模块接收该数据,并将接收到的数据发送到协议栈。网络代理模块可以根据网络代理模式确定是否修改数据的优先级。协议栈在解封装和封装该数据的过程中,可以修改该数据的优先级,进而使得该数据进入优先级更高的发包队列。The first electronic device sends the data to the second electronic device through the wireless communication module, and the second electronic device receives the data through the wireless communication module and sends the received data to the protocol stack. The network proxy module can determine whether to modify the priority of data according to the network proxy mode. During the process of decapsulating and encapsulating the data, the protocol stack can modify the priority of the data, thereby causing the data to enter the packet sending queue with a higher priority.
其中,无线通信模块和移动通信模块可以参考后文中图21对应的文字描述,此处不再赘述。Among them, the wireless communication module and the mobile communication module can be referred to the text description corresponding to Figure 21 in the following text, and will not be described again here.
例如,第一电子设备和第二电子设备均按照RFC791协议,划分了8个优先级。例如,第一电子设备和第二电子设备上的音乐应用程序的业务数据的优先级为0。则第一电子设备将音乐应用程序的业务数据发送到第二电子设备上后,第二电子设备会在封装过程中将第一电子设备发送的音乐应用程序的业务数据的优先级改变为1。For example, the first electronic device and the second electronic device are divided into eight priorities according to the RFC791 protocol. For example, the priority of the service data of the music application on the first electronic device and the second electronic device is 0. Then, after the first electronic device sends the service data of the music application program to the second electronic device, the second electronic device will change the priority of the service data of the music application program sent by the first electronic device to 1 during the packaging process.
可选地,在本申请一些实施例中,第二电子设备并不会真正改变该数据的路由优先级如IP Precedence或DSCP的字段值,而是按照修改后的优先级执行封装、分配发包队列和/或发 送。Optionally, in some embodiments of the present application, the second electronic device does not actually change the routing priority of the data, such as the field value of IP Precedence or DSCP, but performs encapsulation and allocates packet sending queues according to the modified priority. and/or send deliver.
可选地,在本申请一些实施例中,第一电子设备和第二电子设备可以在应用层或其他层的字段上约定一个低延时业务标识字段,该字段用于标识该数据是否是低时延业务的数据。当第二电子设备接收到该数据后,会判断数据低延时业务标识字段的值是否为约定值,若第二电子设备确定该数据为低时延业务的数据,则会优先处理,如解封装、封装、发送,进而保障第一电子设备的通信质量。Optionally, in some embodiments of the present application, the first electronic device and the second electronic device can agree on a low-latency service identification field on the application layer or other layers. This field is used to identify whether the data is low-latency service identification. Delay service data. After receiving the data, the second electronic device will determine whether the value of the low-latency service identification field of the data is the agreed value. If the second electronic device determines that the data is data for the low-latency service, it will process it with priority. Encapsulate, encapsulate, and send, thereby ensuring the communication quality of the first electronic device.
再次,示例性的介绍本申请实施例提供的传输方法中,第一电子设备在特定场景中,第一电子设备执行的步骤。Again, in the transmission method provided by the embodiment of the present application, the steps performed by the first electronic device in a specific scenario are exemplarily introduced.
图20为本申请实施例提供的传输方法的流程的另一个示例性示意图。Figure 20 is another exemplary schematic diagram of the flow of a transmission method provided by an embodiment of the present application.
S2001:第一电子设备执行小区搜索/初始小区搜索,获取覆盖范围内所有小区的SIB1。S2001: The first electronic device performs cell search/initial cell search and obtains SIB1 of all cells within the coverage range.
在第一电子设备开机后,或者第一电子设备从无小区覆盖区域进入小区覆盖区域后,或者第一电子设备确定当前接入的小区或者其他类型的无线接入点的通信质量低于阈值后,第一电子设备执行小区搜索或初始小区搜索。After the first electronic device is powered on, or after the first electronic device enters the cell coverage area from an area without cell coverage, or after the first electronic device determines that the communication quality of the currently accessed cell or other types of wireless access points is lower than a threshold. , the first electronic device performs cell search or initial cell search.
其中,第一电子设备获取覆盖范围内所有小区的系统信息块(system information block,SIB),如SIB1,其中SIB1为电子设备提供是否允许接入这个小区的信息,即公共陆地移动网(public land mobile network,PLMN)。Among them, the first electronic device obtains the system information block (SIB) of all cells within the coverage area, such as SIB1, where SIB1 provides the electronic device with information about whether to allow access to this cell, that is, the public land mobile network (public land mobile network) mobile network (PLMN).
可选地,在本申请一些实施例中,取决于运营商的频段分配,第一电子设备只会选择SIM对应的运营商的频段执行小区搜索或初始小区搜索。Optionally, in some embodiments of the present application, depending on the operator's frequency band allocation, the first electronic device will only select the operator's frequency band corresponding to the SIM to perform cell search or initial cell search.
其中,第一电子设备在核心网注册失败不包括紧急注册,第一电子设备在核心网注册失败可以是初始注册或移动性注册(周期性注册)失败。或者,第一电子设备在核心网注册失败还可以是PDU会话建立失败。The failure to register the first electronic device in the core network does not include emergency registration. The failure to register the first electronic device in the core network may be a failure in initial registration or mobility registration (periodic registration). Alternatively, the failure to register the first electronic device in the core network may also be a failure to establish the PDU session.
S2002:第一电子设备确定基于PLMN选择第一小区并且第一小区的通信质量低于阈值;或者,基于PLMN无法选择小区;或者,基于PLMN选择第一小区,但是在核心网注册失败的情况下,第一电子设备发送广播发现第二电子设备。S2002: The first electronic device determines that the first cell is selected based on the PLMN and the communication quality of the first cell is lower than the threshold; or the cell cannot be selected based on the PLMN; or the first cell is selected based on the PLMN, but the core network registration fails. , the first electronic device sends a broadcast to discover the second electronic device.
其中,第一电子设备的SIM卡或者内存中存有可接入的PLMN列表,第一电子设备可以基于该可接入的PLMN列表以及第一电子设备发现的小区的PLMN,确定是否可以选择该小区。There is a list of accessible PLMNs stored in the SIM card or memory of the first electronic device, and the first electronic device can determine whether the accessible PLMN list can be selected based on the list of accessible PLMNs and the PLMN of the cell discovered by the first electronic device. community.
S2003:第一电子设备和第二电子设备建立连接,并且第二电子设备为第一电子设备提供网络代理。S2003: The first electronic device and the second electronic device establish a connection, and the second electronic device provides a network proxy for the first electronic device.
具体的内容可以参考上文中图15和图4对应的文字描述,此处不再赘述。For specific content, please refer to the text description corresponding to Figure 15 and Figure 4 above, and will not be repeated here.
S2004:第一电子设备基于至少两条数据通道发送、接收数据。S2004: The first electronic device sends and receives data based on at least two data channels.
具体的内容可以参考上文中图4对应的文字描述,此处不再赘述。For specific content, please refer to the text description corresponding to Figure 4 above, and will not be repeated here.
最后介绍本申请实施例提供的第一电子设备和第二电子设备的硬件结构和软件架构。Finally, the hardware structure and software architecture of the first electronic device and the second electronic device provided by the embodiments of the present application are introduced.
由于第一电子设备的硬件结构和第二电子设备的硬件结构可以相同,为了方便说明,后文中以电子设备指代第一电子设备和的第二电子设备,方便示例性的介绍硬件结构。Since the hardware structure of the first electronic device and the second electronic device may be the same, for convenience of explanation, the first electronic device and the second electronic device are referred to as electronic devices in the following text to facilitate an exemplary introduction of the hardware structures.
图21为本申请实施例提供的电子设备的硬件结构的一个示例性示意图。 Figure 21 is an exemplary schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
电子设备可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备,本申请实施例对该电子设备的具体类型不作特殊限制。The electronic device may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (personal digital assistant) assistant (PDA), augmented reality (AR) devices, virtual reality (VR) devices, artificial intelligence (AI) devices, wearable devices, vehicle-mounted devices, smart home devices and/or smart devices City equipment, the embodiment of this application does not place special restrictions on the specific type of electronic equipment.
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 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, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro 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, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present invention do not constitute specific limitations on the electronic equipment. In other embodiments of the present application, the electronic device may include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, etc. through different I2C bus interfaces. For example, the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to implement the touch function of the electronic device.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。 在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备充电,也可以用于电子设备与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transmit data between the electronic device and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only schematic illustrations and do not constitute structural limitations on the electronic equipment. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters. In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为 无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device 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 multiplexed as Diversity antennas for wireless LANs. In other embodiments, antennas may be used in conjunction with tuning switches.
移动通信模块150可以提供应用在电子设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied to electronic devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110 and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), and global navigation satellite systems for use in electronic devices. (global navigation satellite system, GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates 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 through the antenna 2 for radiation.
在一些实施例中,电子设备的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi) -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device implements display functions through the GPU, display screen 194, and application processor. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed, 量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, Quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
电子设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera sensor through the lens, the optical signal is converted into an electrical signal, and the camera sensor passes the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise and brightness. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object passes through the lens to produce an optical image that is projected onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。电子设备可以支持一种或多种视频编解码器。这样,电子设备可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. Electronic devices may support one or more video codecs. In this way, electronic devices can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG)1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can continuously learn by itself. Intelligent cognitive applications of electronic devices can be realized through NPU, such as image recognition, face recognition, speech recognition, text understanding, etc.
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
随机存取存储器可以包括静态随机存储器(static random-access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)、同步动态随机存储器(synchronous dynamic random access memory,SDRAM)、双倍资料率同步动态随机存取存储器(double data rate synchronous dynamic random access memory,DDR SDRAM,例如第五代DDR SDRAM一般称为DDR5SDRAM)等;Random access memory can include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous Dynamic random access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as the fifth generation DDR SDRAM is generally called DDR5SDRAM), etc.;
非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。Non-volatile memory can include disk storage devices and flash memory.
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包括通用闪存存储(英文:universal flash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。Flash memory can be divided according to the operating principle to include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. According to the storage unit potential level, it can include single-level storage cells (single-level cell, SLC), multi-level storage cells (multi-level cell, MLC), third-level storage unit (triple-level cell, TLC), fourth-level storage unit (quad-level cell, QLC), etc., which can include universal flash storage (English: universal flash storage, UFS) according to storage specifications. , embedded multi media card (embedded multi media Card, eMMC), etc.
随机存取存储器可以由处理器110直接进行读写,可以用于存储操作系统或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用程序的数据等。The random access memory can be directly read and written by the processor 110, 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, etc.
非易失性存储器也可以存储可执行程序和存储用户及应用程序的数据等,可以提前加载到随机存取存储器中,用于处理器110直接进行读写。The non-volatile memory can also store executable programs and user and application program data, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processor 110.
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展电子设备的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。 例如将音乐,视频等文件保存在外部的非易失性存储器中。The external memory interface 120 can be used to connect an external non-volatile memory to expand the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, save music, video and other files in external non-volatile memory.
电子设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The electronic device can listen to music through speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device answers a call or a voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备可以设置至少一个麦克风170C。在另一些实施例中,电子设备可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak close to the microphone 170C with the human mouth and input the sound signal to the microphone 170C. The electronic device may be provided with at least one microphone 170C. In other embodiments, the electronic device may be provided with two microphones 170C, which in addition to collecting sound signals, may also implement a noise reduction function. In other embodiments, the electronic device can also be equipped with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions, etc.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The headphone interface 170D is used to connect wired headphones. The headphone interface 170D may be a USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备根据压力传感器180A检测所述触摸操作强度。电子设备也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronics determine the intensity of the pressure based on changes in capacitance. When a touch operation is performed on the display screen 194, the electronic device detects the strength of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device shakes, and calculates the distance that the lens module needs to compensate based on the angle, so that the lens can offset the shake of the electronic device through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。Air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备是翻盖机时,电子设备可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。Magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the electronic device is a flip machine, the electronic device may detect opening and closing of the flip according to the magnetic sensor 180D. Then, based on the detected opening and closing status of the leather case or the opening and closing status of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备在各个方向上(一般为三轴)加速度的大小。当电子设 备静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device in various directions (generally three axes). When electronic equipment The magnitude and direction of gravity can be detected when the device is stationary. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
距离传感器180F,用于测量距离。电子设备可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. Electronic devices can measure distance via infrared or laser. In some embodiments, when shooting a scene, the electronic device can utilize the distance sensor 180F to measure distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备通过发光二极管向外发射红外光。电子设备使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备附近有物体。当检测到不充分的反射光时,电子设备可以确定电子设备附近没有物体。电子设备可以利用接近光传感器180G检测用户手持电子设备贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. Electronic devices emit infrared light through light-emitting diodes. Electronic devices use photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device. Electronic devices can use the proximity light sensor 180G to detect when the user holds the electronic device close to the ear and talk, so that the screen can be automatically turned off to save power. The proximity light sensor 180G can also be used in holster mode, and pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。电子设备可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 based on perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touching.
指纹传感器180H用于采集指纹。电子设备可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。Fingerprint sensor 180H is used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to unlock fingerprints, access application locks, take photos with fingerprints, answer incoming calls with fingerprints, etc.
温度传感器180J用于检测温度。在一些实施例中,电子设备利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备对电池142加热,以避免低温导致电子设备异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备对电池142的输出电压执行升压,以避免低温导致的异常关机。Temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device reduces the performance of a processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery 142 to prevent the low temperature from causing abnormal shutdown of the electronic device. In some other embodiments, when the temperature is lower than another threshold, the electronic device performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch device". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device at a location different from that of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。Bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part. The bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals. In some embodiments, the bone conduction sensor 180M can also be provided in an earphone and combined into a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibrating bone obtained by the bone conduction sensor 180M to implement the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M to implement the heart rate detection function.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备可以接收按键输入,产生与电子设备的用户设置以及功能控制有关的键信号输入。The buttons 190 include a power button, a volume button, etc. Key 190 may be a mechanical key. It can also be a touch button. The electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate vibration prompts. The motor 191 can be used for vibration prompts for incoming calls and can also be used for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. The motor 191 can also respond to different vibration feedback effects for touch operations in different areas of the display screen 194 . Different application scenarios (such as time reminders, receiving information, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。 The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备的接触和分离。电子设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备中,不能和电子设备分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to realize contact and separation from the electronic device. The electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. Electronic devices interact with the network through SIM cards to implement functions such as calls and data communications. In some embodiments, the electronic device uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
电子设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备的软件结构。Software systems of electronic devices can adopt layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. The embodiment of the present invention takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device.
图22为本申请实施例提供的电子设备的软件架构的一个示例性示意图。Figure 22 is an exemplary schematic diagram of the software architecture of the electronic device provided by the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has clear roles and division of labor. The layers communicate through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system libraries, and kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图22所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 22, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图22所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 22, the application framework layer can include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A 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, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make this data accessible to applications. Said data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls that display text, controls that display pictures, etc. A view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。Telephone managers are used to provide communication functions of electronic devices. For example, call status management (including connected, hung up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources to applications, such as localized strings, icons, pictures, layout files, video files, etc.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager allows applications to display notification information in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be notifications that appear in the status bar at the top of the system in the form of charts or scroll bar text, such as notifications for applications running in the background, or notifications that appear on the screen in the form of conversation windows. For example, text information is prompted in the status bar, a beep sounds, the electronic device vibrates, the indicator light flashes, etc.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library contains two parts: one is the functional functions that need to be called by the Java language, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。 The application layer and application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and application framework layer into binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection and other functions.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。System libraries can include multiple functional modules. For example: surface manager (surface manager), media libraries (Media Libraries), 3D graphics processing libraries (for example: OpenGL ES), 2D graphics engines (for example: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, composition, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D Graphics Engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
图23为本申请实施例提供的包括第一电子设备和第二电子设备的系统中的数据流动的一个示例性示意图。FIG. 23 is an exemplary schematic diagram of data flow in a system including a first electronic device and a second electronic device provided by an embodiment of the present application.
第一电子设备在和第二电子设备建立连接后,并且第二电子设备为第一电子设备提供网络代理后,第一电子设备发送数据时第一电子设备和第二电子设备组成的系统中的数据流动如图23所示。After the first electronic device establishes a connection with the second electronic device, and after the second electronic device provides a network proxy for the first electronic device, when the first electronic device sends data, the system composed of the first electronic device and the second electronic device The data flow is shown in Figure 23.
其中,第一电子设备上的数据通道1为:第一电子设备上的应用程序的数据可以通过网络代理模块将数据发送到移动通信模块,进而移动通信模块将数据发送到基站,再进而由基站转发到服务器。Among them, the data channel 1 on the first electronic device is: the data of the application program on the first electronic device can send the data to the mobile communication module through the network proxy module, and then the mobile communication module sends the data to the base station, and then the base station Forwarded to server.
其中,第一电子设备上的数据通道2为:第一电子设备上的应用程序的数据可以通过网络代理模块将数据发送到无线通信模块,进而将数据发送到第二电子设备;第二电子设备的无线通信模块在接收到数据后,可以将数据发送到移动通信模块,进而发送到基站,由基站转发到服务器。Among them, the data channel 2 on the first electronic device is: the data of the application program on the first electronic device can send the data to the wireless communication module through the network proxy module, and then send the data to the second electronic device; the second electronic device After receiving the data, the wireless communication module can send the data to the mobile communication module and then to the base station, which then forwards it to the server.
其中,网络代理模块可以用于确定数据是在数据通道1上发送还是在数据通道2上发送,如图7A至图7C所示。Among them, the network proxy module can be used to determine whether the data is sent on data channel 1 or data channel 2, as shown in Figures 7A to 7C.
可选地,在本申请一些实施例中,网络代理模块还可以用于指示协议栈如何对要发送的数据进行封装,如图6A至图6C所示。Optionally, in some embodiments of the present application, the network proxy module can also be used to instruct the protocol stack how to encapsulate the data to be sent, as shown in Figures 6A to 6C.
可选地,在本申请一些实施例中,网络代理模块还可以用于确定网络代理模式,进而指示无线通信模块与对端电子设备的无线通信模块建立什么类型的连接。Optionally, in some embodiments of the present application, the network proxy module can also be used to determine the network proxy mode, and then instruct the wireless communication module what type of connection to establish with the wireless communication module of the peer electronic device.
可选地,在本申请一些实施例中,网络代理模块还可以用于修改第一电子设备发送的数据的优先级,进而指示协议栈优先封装或解封装该数据。Optionally, in some embodiments of the present application, the network proxy module can also be used to modify the priority of the data sent by the first electronic device, thereby instructing the protocol stack to preferentially encapsulate or decapsulate the data.
可选地,在本申请一些实施例中,网络代理模块还可以用于对接收到的数据执行去重和合并。Optionally, in some embodiments of the present application, the network proxy module can also be used to perform deduplication and merging on the received data.
可选地,在本申请一些实施例中,网络代理模块还可以用于确定使用的流量,以及在流量使用达到流量上限后,禁止使用数据通道2发送数据。Optionally, in some embodiments of the present application, the network proxy module can also be used to determine the traffic used, and prohibit the use of data channel 2 to send data after the traffic usage reaches the traffic upper limit.
其中,第一电子设备和第二电子设备的无线通信模块和移动通信模块可以参考上文中图21对应的文字描述,此处不再赘述。For the wireless communication module and mobile communication module of the first electronic device and the second electronic device, please refer to the text description corresponding to Figure 21 above, and will not be described again here.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。 As used in the above embodiments, the term "when" may be interpreted to mean "if..." or "after" or "in response to determining..." or "in response to detecting..." depending on the context. Similarly, depending on the context, the phrase "when determining..." or "if (stated condition or event) is detected" may be interpreted to mean "if it is determined..." or "in response to determining..." or "on detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例该的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part 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 the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. 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 or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted over a wired connection from a website, computer, server, or data center (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。 Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are implemented. This process can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, , may include the processes of the above method embodiments. The aforementioned storage media include: ROM, random access memory (RAM), magnetic disks, optical disks and other media that can store program codes.

Claims (34)

  1. 一种通信方法,其特征在于,应用于包括第一电子设备和第二电子设备的系统,所述方法包括:A communication method, characterized in that it is applied to a system including a first electronic device and a second electronic device, and the method includes:
    在所述第一电子设备的网络状态在第一状态的情况下,所述第一电子设备与所述第二电子设备交换网络参数,所述网络参数包括第一运营商的标识和/或第二运营商的标识,所述第一电子设备的接入的蜂窝移动通信网络的运营商为所述第一运营商,所述第二电子设备的接入的蜂窝移动通信网络的运营商为所述第二运营商;When the network status of the first electronic device is in the first state, the first electronic device exchanges network parameters with the second electronic device, and the network parameters include the identification of the first operator and/or the first operator. Identities of two operators, the operator of the cellular mobile communication network to which the first electronic device is connected is the first operator, and the operator to the cellular mobile communication network to which the second electronic device is connected is the operator. the second operator;
    在所述第一运营商与所述第二运营商不同的情况下,所述第一电子设备与所述第二电子设备建立第一连接;When the first operator and the second operator are different, the first electronic device establishes a first connection with the second electronic device;
    所述第一电子设备通过所述第一连接向所述第二电子设备发送第一数据;The first electronic device sends first data to the second electronic device through the first connection;
    所述第二电子设备转发所述第一数据至服务器。The second electronic device forwards the first data to the server.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    在所述第一运营商与所述第二运营商相同并且第一接入小区和第二接入小区不同的情况下,所述第一电子设备与所述第二电子设备建立所述第一连接,所述网络参数包括所述第一接入小区的标识和/或所述第二接入小区的标识,所述第一接入小区为所述第一电子设备的接入小区,所述第二接入小区为所述第二电子设备的接入小区。When the first operator and the second operator are the same and the first access cell and the second access cell are different, the first electronic device and the second electronic device establish the first connection, the network parameters include the identifier of the first access cell and/or the identifier of the second access cell, the first access cell is the access cell of the first electronic device, and the The second access cell is the access cell of the second electronic device.
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    在所述第一运营商与所述第二运营商相同并且第一小区切换策略和第二小区切换策略不同的情况下,所述网络参数包括所述第一小区切换策略的标识和/或所述第二小区切换策略的标识,所述第一小区切换策略为所述第一电子设备的小区切换策略,所述第二小区切换策略为所述第二电子设备的小区切换策略。In the case where the first operator and the second operator are the same and the first cell switching strategy and the second cell switching strategy are different, the network parameters include the identification of the first cell switching strategy and/or the The identifier of the second cell switching strategy, the first cell switching strategy is the cell switching strategy of the first electronic device, and the second cell switching strategy is the cell switching strategy of the second electronic device.
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    在所述第一运营商与所述第二运营商相同并且第一小区重选策略和第二小区重选策略不同的情况下,所述网络参数包括所述第一小区重选策略的标识和/或所述第二小区重选策略的标识,所述第一小区重选策略为所述第一电子设备的小区重选策略,所述第二小区重选策略为所述第二电子设备的小区重选策略。In the case where the first operator and the second operator are the same and the first cell reselection strategy and the second cell reselection strategy are different, the network parameters include an identifier of the first cell reselection strategy and /or the identifier of the second cell reselection strategy, the first cell reselection strategy is the cell reselection strategy of the first electronic device, and the second cell reselection strategy is the cell reselection strategy of the second electronic device Neighborhood reselection strategy.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    在第一账户和第二账户相同的情况下,或者,在所述第一账户和所述第二账户属于同一组的情况下,所述第一电子设备与所述第二电子设备建立第一连接,所述第一账户为第一电子设备上登录的账户,所述第二账户为第二电子设备上登录的账户。When the first account and the second account are the same, or when the first account and the second account belong to the same group, the first electronic device and the second electronic device establish a first Connection, the first account is an account logged in on the first electronic device, and the second account is an account logged on the second electronic device.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述第一状态包括所述第一电子设备的蜂窝移动通信质量低于阈值、所述第一电子设备在核心网注册失败、所述第一电子设备位于预设区域、所述第一电子设备的速度大于阈值、所述第一电子设备的蜂窝移动通信网络欠费或所述第一电子设备的移动通信网络为无服务中的一种或多种。The method according to any one of claims 1 to 5, characterized in that the first state includes: the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device is registered in the core network Failure, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears or the mobile communication network of the first electronic device is unavailable. One or more of the Services.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,在所述第一电子设备与所述第二 电子设备建立第一连接前,所述方法还包括:The method according to any one of claims 1-6, characterized in that, between the first electronic device and the second Before the electronic device establishes the first connection, the method further includes:
    所述第一电子设备和/或所述第二电子设备确定网络代理模式,所述网络代理模式用于确定所述第一连接的类型。The first electronic device and/or the second electronic device determines a network proxy mode, and the network proxy mode is used to determine the type of the first connection.
  8. 根据权利要求7所述的方法,其特征在于,The method according to claim 7, characterized in that:
    在所述网络代理模式为第一模式的情况下,所述第一连接为2.4G WiFi连接;When the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection;
    在所述网络代理模式为第二模式的情况下,所述第一连接为5G WiFi连接。When the network proxy mode is the second mode, the first connection is a 5G WiFi connection.
  9. 根据权利要求8所述的方法,其特征在于,The method according to claim 8, characterized in that:
    在所述网络代理模式从所述第一模式变为所述第二模式后,所述第一连接从2.4G WiFi连接变为5G WiFi连接。After the network proxy mode changes from the first mode to the second mode, the first connection changes from a 2.4G WiFi connection to a 5G WiFi connection.
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-9, characterized in that the method further includes:
    所述第一电子设备在第二数据通道上接收到所述服务器发送的第二数据,所述第一数据通道为所述第一电子设备的蜂窝移动通信功能提供的;The first electronic device receives the second data sent by the server on a second data channel, the first data channel being provided by the cellular mobile communication function of the first electronic device;
    所述第一电子设备接收所述第二数据后,向所述第二电子设备发送所述第一指示,所述第一指示用于指示所述第一电子设备已经接收到所述第二数据,所述第一指示中包括第一序号,所述第一序号为所述第二数据的TCP序号或所述第二数据的数据段中的序号;After receiving the second data, the first electronic device sends the first indication to the second electronic device, where the first indication is used to indicate that the first electronic device has received the second data. , the first indication includes a first sequence number, and the first sequence number is the TCP sequence number of the second data or the sequence number in the data segment of the second data;
    所述第二电子设备在接收到所述第二数据后不向所述第一电子设备发送所述第二数据。The second electronic device does not send the second data to the first electronic device after receiving the second data.
  11. 一种通信方法,其特征在于,应用于包括第一电子设备和第二电子设备的系统,所述方法包括:A communication method, characterized in that it is applied to a system including a first electronic device and a second electronic device, and the method includes:
    在所述第一电子设备的网络状态在第一状态的情况下,所述第一电子设备与所述第二电子设备建立第一连接;When the network status of the first electronic device is in the first state, the first electronic device establishes a first connection with the second electronic device;
    在第一情况下,所述第一电子设备向所述第二电子设备发送第一指示,所述第一指示用于指示第二电子设备切换运营商,其中,在所述第一情况下,第一运营商与第二运营商相同,所述第一电子设备的接入的蜂窝移动通信网络的运营商为所述第一运营商,所述第二电子设备接入的蜂窝移动通信网络的运营商为所述第二运营商;In the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device to switch operators, wherein, in the first case, The first operator is the same as the second operator, the operator of the cellular mobile communication network to which the first electronic device is connected is the first operator, and the operator to the cellular mobile communication network to which the second electronic device is connected is The operator is the second operator;
    所述第二电子设备接收到所述第一指示后切换运营商;The second electronic device switches the operator after receiving the first instruction;
    所述第一电子设备通过所述第一连接向所述第二电子设备发送第一数据;The first electronic device sends first data to the second electronic device through the first connection;
    所述第二电子设备转发所述第一数据至服务器。The second electronic device forwards the first data to the server.
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:The method according to claim 11, characterized in that, the method further includes:
    在第二情况下,所述第一电子设备向所述第二电子设备发送第二指示,所述第二指示用于指示所述第二电子设备改变小区切换策略;In the second case, the first electronic device sends a second instruction to the second electronic device, where the second instruction is used to instruct the second electronic device to change the cell switching strategy;
    所述第二电子设备接收到所述第二指示后改变小区切换策略,其中,在所述第二情况下,所述第一运营商与所述第二运营商相同,并且所述第一情况与所述第二情况不同;The second electronic device changes the cell switching strategy after receiving the second indication, wherein in the second case, the first operator is the same as the second operator, and the first case Unlike the second situation described;
    其中,在所述第二电子设备改变小区切换策略后,第二电子设备的小区切换策略与所述第一电子设备的小区切换策略不同。Wherein, after the second electronic device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
  13. 根据权利要求11所述的方法,其特征在于,所述方法还包括: The method according to claim 11, characterized in that, the method further includes:
    在第三情况下,所述第一电子设备向所述第二电子设备发送第三指示,所述第三指示用于指示所述第二电子设备改变小区重选策略;In the third case, the first electronic device sends a third instruction to the second electronic device, where the third instruction is used to instruct the second electronic device to change the cell reselection strategy;
    所述第二电子设备接收到所述第三指示后改变小区重选策略,其中,在所述第三情况下,所述第一运营商与所述第二运营商相同,并且所述第一情况与所述第三情况不同;The second electronic device changes the cell reselection strategy after receiving the third indication, wherein in the third case, the first operator is the same as the second operator, and the first operator The situation is different from the third situation described;
    其中,在所述第二电子设备改变小区重选策略后,所述第二电子设备的小区重选策略与所述第一电子设备的小区重选策略不同。Wherein, after the second electronic device changes the cell reselection strategy, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
  14. 根据权利要求11所述的方法,其特征在于,所述方法还包括:The method according to claim 11, characterized in that, the method further includes:
    在第四情况下,所述第一电子设备向所述第二电子设备发送第四指示,所述第四指示用于指示所述第二电子设备改变接入小区;In the fourth case, the first electronic device sends a fourth instruction to the second electronic device, where the fourth instruction is used to instruct the second electronic device to change the access cell;
    所述第二电子设备接收到所述第三指示后改变接入小区,其中,在所述第四情况下,所述第一运营商与所述第二运营商相同,并且所述第一情况与所述第四情况不同;The second electronic device changes the access cell after receiving the third indication, wherein in the fourth case, the first operator is the same as the second operator, and the first case Unlike the fourth situation described;
    其中,在所述第二电子设备改变接入小区后,所述第二电子设备的接入小区与所述第一电子设备的接入小区不同。Wherein, after the second electronic device changes the access cell, the access cell of the second electronic device is different from the access cell of the first electronic device.
  15. 根据权利要求11-14中任一项所述的方法,其特征在于,所述第一状态包括所述第一电子设备的蜂窝移动通信质量低于阈值、所述第一电子设备在核心网注册失败、所述第一电子设备位于预设区域、所述第一电子设备的速度大于阈值、所述第一电子设备的蜂窝移动通信网络欠费或所述第一电子设备的移动通信网络为无服务中的一种或多种。The method according to any one of claims 11 to 14, characterized in that the first state includes: the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device is registered in the core network Failure, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears or the mobile communication network of the first electronic device is unavailable. One or more of the Services.
  16. 根据权利要求11-15中任一项所述的方法,其特征在于,所述第一电子设备与所述第二电子设备建立第一连接前,所述方法还包括:The method according to any one of claims 11-15, characterized in that before the first electronic device establishes a first connection with the second electronic device, the method further includes:
    所述第一电子设备和/或所述第二电子设备确定网络代理模式,所述网络代理模式为所述第一电子设备通过所述第二电子设备访问互联网中的服务器的模式,所述网络代理模式用于确定所述第一连接的类型;The first electronic device and/or the second electronic device determine a network proxy mode. The network proxy mode is a mode in which the first electronic device accesses a server in the Internet through the second electronic device. The network The proxy mode is used to determine the type of the first connection;
    在所述网络代理模式为第一模式的情况下,所述第一连接为2.4G WiFi连接;When the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection;
    在所述网络代理模式为第二模式的情况下,所述第一连接为5G WiFi连接。When the network proxy mode is the second mode, the first connection is a 5G WiFi connection.
  17. 根据权利要求16所述的方法,其特征在于,The method according to claim 16, characterized in that:
    在所述网络代理模式从所述第一模式变为所述第二模式后,所述第一连接的类型从2.4G WiFi变为5G WiFi。After the network proxy mode changes from the first mode to the second mode, the type of the first connection changes from 2.4G WiFi to 5G WiFi.
  18. 根据权利要求11-17中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 11-17, characterized in that the method further includes:
    所述第一电子设备在第二数据通道上接收到所述服务器发送的第二数据,所述第一数据通道为所述第一电子设备的蜂窝移动通信功能提供的;The first electronic device receives the second data sent by the server on a second data channel, the first data channel being provided by the cellular mobile communication function of the first electronic device;
    所述第一电子设备接收所述第二数据后,向所述第二电子设备发送所述第一指示,所述第一指示用于指示所述第一电子设备已经接收到所述第二数据,所述第一指示中包括第一序号,所述第一序号为所述第二数据的TCP序号或所述第二数据的数据段中的序号;After receiving the second data, the first electronic device sends the first indication to the second electronic device, where the first indication is used to indicate that the first electronic device has received the second data. , the first indication includes a first sequence number, and the first sequence number is the TCP sequence number of the second data or the sequence number in the data segment of the second data;
    所述第二电子设备在接收到所述第二数据后不向所述第一电子设备发送所述第二数据。The second electronic device does not send the second data to the first electronic device after receiving the second data.
  19. 一种通信方法,其特征在于,应用于第一电子设备,所述方法包括: A communication method, characterized in that it is applied to a first electronic device, and the method includes:
    在所述第一电子设备的网络状态在第一状态的情况下,所述第一电子设备获取所述第二电子设备的网络参数,所述网络参数包括第二运营商的标识,所述第一电子设备的接入的蜂窝移动通信网络的运营商为第一运营商,所述第二电子设备的接入的蜂窝移动通信网络的运营商为所述第二运营商;When the network status of the first electronic device is in the first state, the first electronic device obtains the network parameters of the second electronic device, where the network parameters include the identification of the second operator, and the first electronic device obtains the network parameters of the second electronic device. The operator of the cellular mobile communication network that an electronic device accesses is the first operator, and the operator of the cellular mobile communication network that the second electronic device accesses is the second operator;
    在所述第一运营商与所述第二运营商不同的情况下,所述第一电子设备建立第一连接,所述第一连接用于连接至所述第二电子设备;In the case where the first operator is different from the second operator, the first electronic device establishes a first connection, and the first connection is used to connect to the second electronic device;
    所述第一电子设备通过所述第一连接向所述第二电子设备发送第一数据,所述第一数据用于被所述第二电子设备转发至服务器。The first electronic device sends first data to the second electronic device through the first connection, and the first data is used to be forwarded to a server by the second electronic device.
  20. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method of claim 19, further comprising:
    在所述第一运营商与所述第二运营商相同并且第一接入小区和第二接入小区不同的情况下,所述第一电子设备与所述第二电子设备建立所述第一连接,所述网络参数包括所述第一接入小区的标识和/或所述第二接入小区的标识,所述第一接入小区为所述第一电子设备的接入小区,所述第二接入小区为所述第二电子设备的接入小区。When the first operator and the second operator are the same and the first access cell and the second access cell are different, the first electronic device and the second electronic device establish the first connection, the network parameters include the identifier of the first access cell and/or the identifier of the second access cell, the first access cell is the access cell of the first electronic device, and the The second access cell is the access cell of the second electronic device.
  21. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method of claim 19, further comprising:
    在所述第一运营商与所述第二运营商相同并且第一小区切换策略和第二小区切换策略不同的情况下,所述网络参数包括所述第一小区切换策略的标识和/或所述第二小区切换策略的标识,所述第一小区切换策略为所述第一电子设备的小区切换策略,所述第二小区切换策略为所述第二电子设备的小区切换策略。In the case where the first operator and the second operator are the same and the first cell switching strategy and the second cell switching strategy are different, the network parameters include the identification of the first cell switching strategy and/or the The identifier of the second cell switching strategy, the first cell switching strategy is the cell switching strategy of the first electronic device, and the second cell switching strategy is the cell switching strategy of the second electronic device.
  22. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method of claim 19, further comprising:
    在所述第一运营商与所述第二运营商相同并且第一小区重选策略和第二小区重选策略不同的情况下,所述网络参数包括所述第一小区重选策略的标识和/或所述第二小区重选策略的标识,所述第一小区重选策略为所述第一电子设备的小区重选策略,所述第二小区重选策略为所述第二电子设备的小区重选策略。In the case where the first operator and the second operator are the same and the first cell reselection strategy and the second cell reselection strategy are different, the network parameters include an identifier of the first cell reselection strategy and /or the identifier of the second cell reselection strategy, the first cell reselection strategy is the cell reselection strategy of the first electronic device, and the second cell reselection strategy is the cell reselection strategy of the second electronic device Neighborhood reselection strategy.
  23. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method of claim 19, further comprising:
    在所述第一账户和所述第二账户相同的情况下,或者在所述第一账户和所述第二账户属于同一组的情况下,所述第一电子设备与所述第二电子设备建立第一连接,所述第一账户为第一电子设备上登录的账户,所述第二账户为第二电子设备上登录的账户。In the case that the first account and the second account are the same, or in the case that the first account and the second account belong to the same group, the first electronic device and the second electronic device A first connection is established, the first account is an account logged in on the first electronic device, and the second account is an account logged in on the second electronic device.
  24. 根据权利要求19-23中任一项所述的方法,其特征在于,所述第一状态包括所述第一电子设备的蜂窝移动通信质量低于阈值、所述第一电子设备在核心网注册失败、所述第一电子设备位于预设区域、所述第一电子设备的速度大于阈值、所述第一电子设备的蜂窝移动通信网络欠费或所述第一电子设备的移动通信网络为无服务中的一种或多种。The method according to any one of claims 19 to 23, characterized in that the first state includes: the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device is registered in the core network Failure, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears or the mobile communication network of the first electronic device is unavailable. One or more of the Services.
  25. 根据权利要求19-24中任一项所述的方法,其特征在于,在所述第一电子设备建立第一连接前,所述方法还包括:The method according to any one of claims 19-24, characterized in that, before the first electronic device establishes the first connection, the method further includes:
    所述第一电子设备确定网络代理模式,所述网络代理模式用于确定所述第一连接的类型;The first electronic device determines a network proxy mode, the network proxy mode is used to determine the type of the first connection;
    在所述网络代理模式为第一模式的情况下,所述第一连接为2.4G WiFi连接; When the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection;
    在所述网络代理模式为第二模式的情况下,所述第一连接为5G WiFi连接。When the network proxy mode is the second mode, the first connection is a 5G WiFi connection.
  26. 一种通信方法,其特征在于,应用于第一电子设备,所述方法包括:A communication method, characterized in that it is applied to a first electronic device, and the method includes:
    在所述第一电子设备的网络状态在第一状态的情况下,所述第一电子设备建立第一连接,所述第一连接用于连接至所述第二电子设备;When the network status of the first electronic device is in the first state, the first electronic device establishes a first connection, and the first connection is used to connect to the second electronic device;
    在第一情况下,所述第一电子设备向所述第二电子设备发送第一指示,所述第一指示用于指示第二电子设备切换运营商,其中,在所述第一情况下,第一运营商与第二运营商相同,所述第一电子设备的接入的蜂窝移动通信网络的运营商为所述第一运营商,所述第二电子设备接入的蜂窝移动通信网络的运营商为所述第二运营商;In the first case, the first electronic device sends a first instruction to the second electronic device, the first instruction is used to instruct the second electronic device to switch operators, wherein, in the first case, The first operator is the same as the second operator, the operator of the cellular mobile communication network to which the first electronic device is connected is the first operator, and the operator to the cellular mobile communication network to which the second electronic device is connected is The operator is the second operator;
    所述第一电子设备通过所述第一连接向所述第二电子设备发送第一数据,所述第一数据用于被所述第二电子设备转发至服务器。The first electronic device sends first data to the second electronic device through the first connection, and the first data is used to be forwarded to a server by the second electronic device.
  27. 根据权利要求26所述的方法,其特征在于,所述方法还包括:The method of claim 26, further comprising:
    在第二情况下,所述第一电子设备向所述第二电子设备发送第二指示,所述第二指示用于指示所述第二电子设备改变小区切换策略;In the second case, the first electronic device sends a second instruction to the second electronic device, where the second instruction is used to instruct the second electronic device to change the cell switching strategy;
    其中,在所述第二情况下,所述第一运营商与所述第二运营商相同,并且所述第一情况与所述第二情况不同;Wherein, in the second situation, the first operator is the same as the second operator, and the first situation is different from the second situation;
    其中,在所述第二电子设备改变小区切换策略后,第二电子设备的小区切换策略与所述第一电子设备的小区切换策略不同。Wherein, after the second electronic device changes the cell switching strategy, the cell switching strategy of the second electronic device is different from the cell switching strategy of the first electronic device.
  28. 根据权利要求26所述的方法,其特征在于,所述方法还包括:The method of claim 26, further comprising:
    在第三情况下,所述第一电子设备向所述第二电子设备发送第三指示,所述第三指示用于指示所述第二电子设备改变小区重选策略;In the third case, the first electronic device sends a third instruction to the second electronic device, where the third instruction is used to instruct the second electronic device to change the cell reselection strategy;
    其中,在所述第三情况下,所述第一运营商与所述第二运营商相同,并且所述第一情况与所述第三情况不同;Wherein, in the third situation, the first operator is the same as the second operator, and the first situation is different from the third situation;
    其中,在所述第二电子设备改变小区重选策略后,所述第二电子设备的小区重选策略与所述第一电子设备的小区重选策略不同。Wherein, after the second electronic device changes the cell reselection strategy, the cell reselection strategy of the second electronic device is different from the cell reselection strategy of the first electronic device.
  29. 根据权利要求26所述的方法,其特征在于,所述方法还包括:The method of claim 26, further comprising:
    在第四情况下,所述第一电子设备向所述第二电子设备发送第四指示,所述第四指示用于指示所述第二电子设备改变接入小区;In the fourth case, the first electronic device sends a fourth instruction to the second electronic device, where the fourth instruction is used to instruct the second electronic device to change the access cell;
    其中,在所述第四情况下,所述第一运营商与所述第二运营商相同,并且所述第一情况与所述第四情况不同;Wherein, in the fourth situation, the first operator is the same as the second operator, and the first situation is different from the fourth situation;
    其中,在所述第二电子设备改变接入小区后,所述第二电子设备的接入小区与所述第一电子设备的接入小区不同。Wherein, after the second electronic device changes the access cell, the access cell of the second electronic device is different from the access cell of the first electronic device.
  30. 根据权利要求26-29中任一项所述的方法,其特征在于,所述第一状态包括所述第一电子设备的蜂窝移动通信质量低于阈值、所述第一电子设备在核心网注册失败、所述第一电子设备位于预设区域、所述第一电子设备的速度大于阈值、所述第一电子设备的蜂窝移动通信网络欠费或所述第一电子设备的移动通信网络为无服务中的一种或多种。 The method according to any one of claims 26 to 29, characterized in that the first state includes: the cellular mobile communication quality of the first electronic device is lower than a threshold, the first electronic device is registered in the core network Failure, the first electronic device is located in a preset area, the speed of the first electronic device is greater than a threshold, the cellular mobile communication network of the first electronic device is in arrears or the mobile communication network of the first electronic device is unavailable. One or more of the Services.
  31. 根据权利要求26-30中任一项所述的方法,其特征在于,在所述第一电子设备建立第一连接前,所述方法还包括:The method according to any one of claims 26-30, characterized in that, before the first electronic device establishes the first connection, the method further includes:
    所述第一电子设备确定网络代理模式,所述网络代理模式为所述第一电子设备通过所述第二电子设备访问互联网中的服务器的模式,所述网络代理模式用于确定所述第一连接的类型;The first electronic device determines a network proxy mode. The network proxy mode is a mode in which the first electronic device accesses a server in the Internet through the second electronic device. The network proxy mode is used to determine the first electronic device. Type of connection;
    在所述网络代理模式为第一模式的情况下,所述第一连接为2.4G WiFi连接;When the network proxy mode is the first mode, the first connection is a 2.4G WiFi connection;
    在所述网络代理模式为第二模式的情况下,所述第一连接为5G WiFi连接。When the network proxy mode is the second mode, the first connection is a 5G WiFi connection.
  32. 一种电子设备,其特征在于,所述电子设备包括:一个或多个处理器和存储器;An electronic device, characterized in that the electronic device includes: one or more processors and memories;
    所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得所述电子设备执行如权利要求19-31中任一项所述的方法。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 invoke the computer instructions to cause the The electronic device performs the method according to any one of claims 19-31.
  33. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在电子设备上运行时,使得所述电子设备执行如权利要求19-31中任一项所述的方法。A computer-readable storage medium comprising instructions, characterized in that when the instructions are run on an electronic device, the electronic device is caused to perform the method according to any one of claims 19-31.
  34. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行如权利要求19-31中任一项所述的方法。 A computer program product containing instructions, characterized in that, when the computer program product is run on an electronic device, it causes the electronic device to execute the method according to any one of claims 19-31.
PCT/CN2023/088711 2022-04-21 2023-04-17 Communication method, electronic device, and system WO2023202533A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210425390.1 2022-04-21
CN202210425390 2022-04-21
CN202210827794.3 2022-07-14
CN202210827794.3A CN116980864A (en) 2022-04-21 2022-07-14 Communication method, electronic equipment and system

Publications (1)

Publication Number Publication Date
WO2023202533A1 true WO2023202533A1 (en) 2023-10-26

Family

ID=88419219

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/088711 WO2023202533A1 (en) 2022-04-21 2023-04-17 Communication method, electronic device, and system

Country Status (1)

Country Link
WO (1) WO2023202533A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021135815A1 (en) * 2019-12-30 2021-07-08 荣耀终端有限公司 Communication method and related device and communication system
CN113747527A (en) * 2021-07-30 2021-12-03 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment
CN113747347A (en) * 2021-07-26 2021-12-03 荣耀终端有限公司 Electronic equipment, internet card switching method thereof and readable medium
CN113840346A (en) * 2021-11-23 2021-12-24 荣耀终端有限公司 Operator switching method and related equipment
CN115150812A (en) * 2021-03-31 2022-10-04 华为技术有限公司 Communication system, first electronic equipment and second electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021135815A1 (en) * 2019-12-30 2021-07-08 荣耀终端有限公司 Communication method and related device and communication system
CN115150812A (en) * 2021-03-31 2022-10-04 华为技术有限公司 Communication system, first electronic equipment and second electronic equipment
CN113747347A (en) * 2021-07-26 2021-12-03 荣耀终端有限公司 Electronic equipment, internet card switching method thereof and readable medium
CN113747527A (en) * 2021-07-30 2021-12-03 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment
CN113840346A (en) * 2021-11-23 2021-12-24 荣耀终端有限公司 Operator switching method and related equipment

Similar Documents

Publication Publication Date Title
EP3917210A1 (en) Network card switching method and electronic device
CN111866950B (en) Method and communication device for data transmission in MEC
WO2020233538A1 (en) Method for accessing wireless local area network and terminal
CN114390337B (en) Screen projection method and system and electronic equipment
WO2021175300A1 (en) Data transmission method and apparatus, electronic device, and readable storage medium
CN113630910B (en) Method for using cellular communication function, related device and system
CN113840346B (en) Operator switching method and related equipment
WO2023143300A1 (en) Slice selection method and system, and related apparatus
WO2021169698A1 (en) Connection management method and related device
EP4199562A1 (en) Method for transmitting data and electronic device
WO2022068513A1 (en) Wireless communication method and terminal device
CN113133089B (en) Method and related device for manually searching network
WO2021197071A1 (en) Wireless communication system and method
JP2021532653A (en) Data transmission methods and electronic devices
WO2020134868A1 (en) Connection establishment method, and terminal apparatus
WO2022042264A1 (en) Method, apparatus and system for switching access point
CN114928898B (en) Method and device for establishing session based on WiFi direct connection
WO2020124447A1 (en) Multi-sim facing network management
WO2020155013A1 (en) Emergency calling method and user terminal
US20230087282A1 (en) Dual wi-fi connection method and electronic device
WO2023202533A1 (en) Communication method, electronic device, and system
WO2021218544A1 (en) Wireless connection providing system, method, and electronic apparatus
CN113141637B (en) Multipath transmission control method and control device
CN116980864A (en) Communication method, electronic equipment and system
WO2022205254A1 (en) Method and device for determining edge configuration server

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23791188

Country of ref document: EP

Kind code of ref document: A1