CN115604773A - Channel switching method and device - Google Patents

Channel switching method and device Download PDF

Info

Publication number
CN115604773A
CN115604773A CN202110769317.1A CN202110769317A CN115604773A CN 115604773 A CN115604773 A CN 115604773A CN 202110769317 A CN202110769317 A CN 202110769317A CN 115604773 A CN115604773 A CN 115604773A
Authority
CN
China
Prior art keywords
channel
receiving end
data
sending end
receiving
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110769317.1A
Other languages
Chinese (zh)
Inventor
周蓉
邱泽令
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110769317.1A priority Critical patent/CN115604773A/en
Priority to PCT/CN2022/103922 priority patent/WO2023280160A1/en
Publication of CN115604773A publication Critical patent/CN115604773A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • H04W36/302Reselection being triggered by specific parameters by measured or perceived connection quality data due to low signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/00837Determination of triggering parameters for hand-off
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections

Abstract

The embodiment of the application discloses a channel switching method and device. In the method, a sending end transmits data to a receiving end through a first channel; the method comprises the steps that a sending end sends a breakpoint position to a receiving end when the quality parameter of a first channel is lower than a first threshold, the breakpoint position is used for determining first data, and the first data are data which are not sent by the sending end when the quality parameter of the first channel is lower than the first threshold; under the condition of keeping the first channel, the sending end negotiates with the receiving end to establish a second channel; the sending end sends first data to the receiving end through the second channel, the first data are used for splicing the first data and second data by the receiving end based on the breakpoint position, and the second data are data which are received by the receiving end through the first channel and located before the breakpoint position. By implementing the technical scheme, the channels can be switched smoothly, and the user experience is improved.

Description

Channel switching method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a channel switching method and apparatus.
Background
With the rapid development of communication technology, the demand of people for communication quality is higher and higher. However, many current communication connections are prone to instability. For example, when a user is in a video, the user may encounter the situations of jamming, blurring, fast forwarding, and popping up a prompt of "home network is not good" or "peer network is not good" caused by network instability, and the user has to opt out of reestablishing the connection to try to improve the situation; for another example, in the screen projection process, due to the fact that the channel quality is poor, the user has to project the screen again to find the position played last time under the conditions of interface stagnation or screen blackness and the like; for another example, when a user downloads or shares a large file, a transmission failure due to poor network quality is often encountered.
At present, the electronic device can solve the problem of poor quality of the current channel by switching to another channel. However, in the switching process, a long time of channel searching and connection reestablishment is required, and therefore, situations such as transmission jamming and even failure often occur, and the user experience is poor. How to solve the problem of smoothly switching channels in the transmission process is an urgent need to solve at present.
Disclosure of Invention
The embodiment of the application provides a channel switching method and a device, wherein in the method, a sending end transmits data to a receiving end through a first channel; the method comprises the steps that a sending end sends a breakpoint position to a receiving end when the quality parameter of a first channel is lower than a first threshold, the breakpoint position is used for determining first data, and the first data are data which are not sent by the sending end when the quality parameter of the first channel is lower than the first threshold; under the condition of keeping the first channel, the sending end negotiates with the receiving end to establish a second channel; the sending end sends first data to the receiving end through the second channel, the first data are used for the receiving end to splice the first data and second data based on the breakpoint position, and the second data are data which are received by the receiving end through the first channel and located before the breakpoint position. By implementing the technical scheme, the channels can be switched smoothly, and the user experience is improved.
In the channel switching method, the channel is not switched immediately when the channel is abnormal by the sending end and the receiving end, but the preparation time is provided between the breakpoint position determination and the switching to ensure that the switched channel is available and optimal and is not good after switching, and the data of the receiving end is directly spliced and received from the breakpoint position determined by negotiation, so that comparison calculation is not needed, the splicing time can be reduced, and the smooth switching is ensured and the user does not feel.
In a first aspect, an embodiment of the present application provides a channel switching method, where the method is applied to a sending end, and the method includes:
the sending end transmits data to the receiving end through a first channel;
the sending end sends a breakpoint position to the receiving end when the quality parameter of the first channel is lower than a first threshold, the breakpoint position is used for determining first data, and the first data is data which is not sent by the sending end when the quality parameter of the first channel is lower than the first threshold;
the sending end negotiates with the receiving end to establish a second channel under the condition of keeping the first channel;
the sending end sends the first data to the receiving end through the second channel, the first data are used for splicing the first data and second data by the receiving end based on the breakpoint position, and the second data are data which are received by the receiving end through the first channel and located before the breakpoint position.
The first threshold value is set in the embodiment of the application, the sending end can negotiate breakpoint information with the receiving end in time when the first channel is abnormal, therefore, when the sending end and the receiving end switch channels, the receiving end can splice data from the breakpoint position in time, the data splicing speed of the receiving end is improved, and therefore in the channel switching process, the experience of a user is high.
In some embodiments, the sending end and the receiving end may detect the quality of the first channel at the same time, so as to improve the success rate.
With reference to the first aspect, in a possible implementation manner, the sending end may negotiate with the receiving end at preset intervals to update the breakpoint position and negotiate with the receiving end to determine the second channel, and then switch the first channel to the second channel. It will be appreciated that since the network quality is constantly changing, the second channel determined within one to two seconds immediately prior to the handover is more likely to be guaranteed to be available and optimal.
With reference to the first aspect, in a possible implementation manner, the quality parameter of the first channel is any one of a signal strength, a channel throughput rate, a channel rate, and a heartbeat packet, or a weighted sum of at least two of the signal strength, the channel throughput rate, the channel rate, and the heartbeat packet.
In this embodiment, the method for detecting the channel quality at the sending end and the receiving end may be implemented by using a quality parameter of the first channel, where the quality parameter of the first channel may be any one of a signal strength, a channel throughput rate, a channel rate, and a heartbeat packet, or a weighted sum of at least two parameters of the signal strength, the channel throughput rate, the channel rate, and the heartbeat packet.
In some embodiments, the sending end may select different quality parameters according to the application scenario, or perform multiple processing methods such as classification and weighted summation on the quality parameters, so as to reasonably evaluate the channel quality according to different application scenarios. For example, in the data transmission process, the evaluation of the channel quality is focused on the channel speed, and the sending end may increase the weight of the channel speed; for another example, in the screen projection process, the evaluation of the channel quality focuses on the stability of the service, and the sending end may increase the weight of the channel throughput rate.
With reference to the first aspect, in a possible implementation manner, negotiating with the receiving end to establish a second channel by the sending end while maintaining the first channel includes:
the sending end obtains a channel available for the receiving end;
the sending end determines a channel available to both the sending end and the receiving end as an available channel;
the sending end determines the second channel from the available channels;
the sending end sends the second channel to the receiving end;
and after receiving the reply message from the receiving end, the sending end establishes connection of a second channel with the receiving end.
According to the embodiment of the application, the second channel is established in the process of keeping the first channel to transmit continuously, so that data can not stop transmitting for a long time in the process that the sending end and the receiving end can be switched from the first channel to the second channel. In the prior art, the second channel is often searched after the first channel is abnormal, but the second channel is already established in advance in the embodiment of the application, and smooth switching between the first channel and the second channel is already ensured.
With reference to the first aspect, in a possible implementation manner, the determining, by the sender, the second channel from the available channels includes:
the sending end obtains the quality parameter of each channel in the available channels;
and the transmitting end determines the channel with the highest quality parameter in the available channels as the second channel.
It is to be understood that the sending end and/or the receiving end may select a channel with the highest channel quality from the available channels as the second channel.
With reference to the first aspect, in a possible implementation manner, the determining, by the sender, the second channel from the available channels by using the sender, where the communicating is performed by the sender, the receiving, and the node through the same network includes:
the sending end obtains the channel type used when the node transmits the data of the same type as the first data in the target time;
and the sending end determines the channel belonging to the channel type in the available channels as the second channel.
With reference to the first aspect, in a possible implementation manner, the determining, by the sender, the second channel from the available channels includes:
the sending end obtains the quality parameter of each channel in the available channels;
and the sending end determines an available channel with a quality parameter higher than that of the first channel as the second channel.
With reference to the first aspect, in a possible implementation manner, the sending, by the sending end, the first data to the receiving end through the second channel includes:
and the sending end sends the first data to the receiving end through the second channel under the condition that a preset condition is met, wherein the preset condition comprises at least one of the condition that the quality parameter of the first channel is lower than a second threshold value, the condition that the quality parameter of the first channel is lower than the quality parameter of the available channel and the condition that the quality parameter of the available channel is higher than a third threshold value.
With reference to the first aspect, in a possible implementation manner, the sending end includes at least two chips, and the available channel includes a channel between any one of the two chips and the receiving end.
With reference to the first aspect, in a possible implementation manner, the sending, by the sending end, a breakpoint position to the receiving end when the quality parameter of the first channel is lower than a first threshold includes:
and the sending end broadcasts the breakpoint position to the receiving end.
With reference to the first aspect, in a possible implementation manner, the sending, by the sending end, a breakpoint position to the receiving end when the quality parameter of the first channel is lower than a first threshold includes:
and the sending end sends the breakpoint position to the receiving end through a control channel.
In the embodiment of the application, the sending end sends the first breakpoint information to the receiving end through other channels when the channel quality of the first channel is not good, so that the failure of sending the first breakpoint information can be avoided.
In a second aspect, an embodiment of the present application provides a channel switching method, where the method is applied to a receiving end, and the method includes:
the receiving end receives data from the transmitting end through a first channel;
the receiving end negotiates a breakpoint position with the transmitting end, wherein the breakpoint position is used for determining first data, and the first data is data which is transmitted by the transmitting end through the first channel and is positioned behind the breakpoint position;
the receiving end negotiates with the sending end to establish a second channel under the condition of keeping the first channel;
the receiving end receives the first data from the transmitting end through the second channel;
and the receiving terminal splices the first data and second data based on the breakpoint position, wherein the second data is the data which is received by the receiving terminal through the first channel and is positioned before the breakpoint position.
With reference to the second aspect, in a possible implementation manner, the breakpoint position is a breakpoint position from the sending end received by the receiving end, and the first data is data that is not sent by the sending end when the quality parameter of the first channel is lower than a first threshold; or, the breakpoint position is determined by the receiving end when the quality parameter of the first channel is lower than a fourth threshold, and the first data is data that is not received by the receiving end when the quality parameter of the first channel is lower than the fourth threshold.
With reference to the second aspect, in a possible implementation manner, negotiating with the sending end to establish a second channel by the receiving end while maintaining the first channel, includes:
the receiving end acquires a channel available for the sending end;
the receiving end determines the channel available to both the receiving end and the sending end as an available channel;
the receiving end determines the second channel from the available channels;
the receiving end sends the second channel to the sending end;
and the receiving end establishes connection of a second channel with the sending end after receiving the reply message from the sending end.
In the embodiment of the application, the sending end and the receiving end simultaneously detect the first channel, so that the detection effect of the detection result can be improved, and the success rate of channel switching is favorably improved.
With reference to the second aspect, in a possible implementation manner, the determining, by the receiving end, the second channel from the available channels includes:
the receiving end acquires the quality parameters of each channel in the available channels;
and the receiving end determines the channel with the highest quality parameter in the available channels as the second channel.
With reference to the second aspect, in a possible implementation manner, the receiving end, and the node communicate through a same network, and the receiving end determines the second channel from the available channels, including:
the receiving end acquires the channel type used when the node transmits the data of the same type as the first data in the target time;
and the receiving end determines the channel belonging to the channel type in the available channels as the second channel.
With reference to the second aspect, in a possible implementation manner, the determining, by the receiving end, the second channel from the available channels includes:
the receiving end acquires the quality parameters of each channel in the available channels;
and the receiving end determines an available channel with a quality parameter higher than that of the first channel as the second channel.
With reference to the second aspect, in a possible implementation manner, the receiving end includes at least two chips, and the available channel includes a channel of any one of the two chips and the transmitting end.
With reference to the second aspect, in a possible implementation manner, the negotiating a breakpoint position between the receiving end and the sending end by the receiving end includes:
and the receiving end broadcasts the breakpoint position to the transmitting end.
With reference to the second aspect, in a possible implementation manner, the negotiating a breakpoint position between the receiving end and the sending end by the receiving end includes:
and the receiving end sends the breakpoint position to the sending end through a control path.
With reference to the second aspect, in a possible implementation manner, the negotiating with the sender to establish the second channel by the receiver while maintaining the first channel includes:
and the receiving end establishes the connection of the second channel with the transmitting end when receiving the second channel from the transmitting end.
In a third aspect, an electronic device is characterized by comprising: one or more processors, memory, and a display screen; the memory is coupled with the one or more processors and is configured to store computer program code comprising computer instructions which are configured to be invoked by the one or more processors to cause the electronic device to perform the method as described in the first aspect and any possible implementation of the first aspect.
In a fourth aspect, an electronic device, comprising: one or more processors, memory, and a display screen; the memory is coupled to the one or more processors and is configured to store computer program code comprising computer instructions which are configured to be invoked by the one or more processors to cause the electronic device to perform the method as described in the second aspect and any possible implementation manner of the second aspect.
In a fifth aspect, the present application provides a chip applied to an electronic device, where the chip includes one or more processors, and the processor is configured to invoke computer instructions to cause the electronic device to execute the method described in the first aspect and any possible implementation manner of the first aspect.
In a sixth aspect, the present application provides a chip applied to an electronic device, where the chip includes one or more processors, and the processor is configured to invoke computer instructions to cause the electronic device to execute the method described in the second aspect and any possible implementation manner of the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer program product including instructions, which, when run on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation manner of the first aspect.
In an eighth aspect, embodiments of the present application provide a computer program product including instructions, which, when run on an electronic device, cause the electronic device to perform the method described in the second aspect and any possible implementation manner of the second aspect.
In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions that, when executed on an electronic device, cause the electronic device to perform the method described in the first aspect and any possible implementation manner of the first aspect.
In a tenth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions that, when executed on an electronic device, cause the electronic device to perform a method as described in the second aspect and any possible implementation manner of the second aspect.
It is to be understood that the electronic device provided in the third and fourth aspects, the chip provided in the fifth and sixth aspects, the computer program product provided in the seventh and eighth aspects, and the computer storage medium provided in the ninth and tenth aspects are all configured to perform the method provided in the embodiments of the present application.
Drawings
The drawings used in the embodiments of the present application are described below.
Fig. 1A is a schematic diagram of a channel switching network architecture according to an embodiment of the present application;
fig. 1B is a schematic diagram of another channel switching network architecture according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a channel switching method according to an embodiment of the present application;
fig. 5 is a schematic diagram of breakpoint information provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a method for scoring an available channel according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the description of the embodiments of the present application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in the embodiments of this application refers to and encompasses any and all possible combinations of one or more of the listed items.
In order to better understand the channel switching method and apparatus provided in the embodiment of the present application, a network architecture used in the embodiment of the present application is described first below.
Referring to fig. 1A, fig. 1A is a schematic diagram of a channel switching network architecture according to an embodiment of the present disclosure. As shown in fig. 1A, the network architecture includes a transmitting end 10 and a receiving end 20, and the transmitting end 10 and the receiving end 20 can communicate through a plurality of channels. Wherein:
specifically, the sending end 10 transmits data to the receiving end 20 through a first channel; when the quality parameter of the first channel is lower than the first threshold, the sending end 10 sends a breakpoint position to the receiving end 20, where the breakpoint position is used to determine first data, where the first data is data that is not sent by the sending end 10 when the quality parameter of the first channel is lower than the first threshold, and correspondingly, the receiving end 20 receives breakpoint information from the sending end 10; under the condition of keeping the first channel, the sending end 10 negotiates with the receiving end 20 to establish a second channel; the transmitting end 10 transmits the first data to the receiving end 20 through the second channel; the receiving end 20 splices the first data and the second data based on the breakpoint position, where the second data is data before the breakpoint position and received by the receiving end 20 through the first channel.
Referring to fig. 1B, fig. 1B is a schematic diagram of another channel switching network architecture according to an embodiment of the present disclosure. As shown in fig. 1B, the network architecture includes a sender 10, a receiver 20, and a node 30, where the sender 10, the receiver 20, and the node 30 are in the same network environment or communicate via the same network. Specifically, when the sending end 10 and the receiving end 20 transmit the first data, the channel type used by the node 30 to transmit the data of the same type as the first data in the target time may be obtained from the node 30, and further, the channel for transmitting the first data is determined, and specific content may be referred to as related content below.
The transmitting end 10, the receiving end 20, and the node 30 may be electronic devices, which include, but are not limited to, smart phones, tablet computers, personal Digital Assistants (PDAs), wearable electronic devices with wireless communication functions (e.g., smart watches and smart glasses), augmented Reality (AR) devices, virtual Reality (VR) devices, and the like. Exemplary embodiments of the electronic device include, but are not limited to, a mount
Figure BDA0003152133490000061
Figure BDA0003152133490000062
Linux, or other operating system. The electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be understood that in other embodiments, the electronic device may not be a portable electronic device, but may be a desktop computer, etc.
The communication connection between the transmitting end 10 and the receiving end 20 may be a wired connection, a wireless connection. The wireless connection can be a high fidelity (Wi-Fi) connection, a Bluetooth connection, an infrared connection, an NFC connection, a ZigBee connection and other short-distance connections. The channel refers to a logical channel through which information can be transmitted, and is based on a communication medium and a relay device, wherein the medium can be a wired Universal Serial Bus (USB) interface line, a cable and an optical fiber, and can also be a wireless electromagnetic wave channel. The channel is not limited to a wireless application layer transport Protocol, and may be wired, and may be at other layers of the Protocol stack, for example, a Logical Link Control and Adaptation Protocol (L2 CAP) layer and a Link Management Protocol (LMP) layer of the bluetooth Protocol stack. The channel establishment includes channel negotiation selection, not only switching on the channel, but also switching between wireless application layer protocols and wired application layer protocols.
It is understood that the channel switching network architectures in fig. 1A and 1B are only exemplary implementations of the embodiments of the present application, and the channel switching network architecture in the embodiments of the present application includes, but is not limited to, the above channel switching network architecture.
Fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure.
The following describes an embodiment specifically by taking the electronic device 100 as an example. It should be understood that electronic device 100 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device 100 may include: the mobile terminal includes a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
Wherein the controller may be a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a universal serial bus interface, etc.
The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, a charger, a flash, a camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of receiving a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may 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 a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, and the like.
The SIM interface may be used to communicate with the SIM card interface 195, implementing functions to transfer data to or read data from the SIM card.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules illustrated in the embodiment of the present application is only an exemplary illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger.
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 charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. 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, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves via the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), time division code division multiple access (time-division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The 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, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor, which processes input information quickly by referring to a biological neural network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in the external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application (such as a face recognition function, a fingerprint recognition function, a mobile payment function, and the like) required by at least one function, and the like. The storage data area may store data (such as face information template data, fingerprint information template, etc.) created during the use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking near the microphone 170C through the mouth. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but have different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C to assist in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device 100 may utilize the distance sensor 180F to range to achieve fast focus.
The 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. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and 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 acting thereon or nearby. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards 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 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication.
In this embodiment, both the sending end 10 and the receiving end 20 may be the electronic device 100, and the electronic device 100 may execute the channel switching method through the processor 110.
Fig. 3 is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present disclosure.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the system is divided into four layers, an application layer, an application framework layer, a Runtime (Runtime) and system library, and a kernel layer, from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications (also referred to as applications) such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
Content providers are used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog interface. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Runtime (Runtime) includes a core library and a virtual machine. Runtime is responsible for scheduling and management of the system.
The core library comprises two parts: one part is the function that the programming language (e.g. java language) needs to call, and the other part is the core library of the system.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes programming files (e.g., jave files) of the application layer and the application framework layer as binary files. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), two-dimensional graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provides a fusion of two-Dimensional (2-Dimensional, 2D) and three-Dimensional (3-Dimensional, 3D) layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing 3D graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver and a virtual card driver.
The following describes exemplary workflow of the software and hardware of the electronic device 100 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
Based on the system architecture, the channel switching method provided in the embodiment of the present application is specifically introduced.
The method may be implemented by the system shown in fig. 1A or fig. 1B, and the transmitting end and the receiving end may be the electronic device 100 shown in fig. 2 and fig. 3. Referring to fig. 4, fig. 4 is a flowchart of a channel switching method according to an embodiment of the present application, and as shown in fig. 4, the channel switching method includes the following steps:
s101, the sending end transmits data to the receiving end through the first channel.
The data transmitted from the sending end to the receiving end may be a message, may also be display data, may also be a control instruction, and the like.
For example, the sending end may be a mobile phone, the receiving end may be a large screen device, and the first channel may be a bluetooth channel. Specifically, the mobile phone may send display data to the large-screen device based on the bluetooth connection, and correspondingly, the large-screen device renders and displays the display data after receiving the display data sent by the mobile phone.
In some embodiments, when the sending end establishes the connection of the first channel with the receiving end, the connection of the control channel is also established.
S102, the sending end and/or the receiving end detect the channel quality of the first channel.
Specifically, the sending end and/or the receiving end may detect the quality parameter of the first channel in real time or at intervals of the target time, and further determine the channel quality of the first channel according to the quality parameter of the first channel. The quality parameter of the first channel may be a Signal Strength indicator (RSSI), a channel throughput rate, a channel rate, a heartbeat packet, and the like.
In one implementation, taking the sending end as an example, the sending end may classify parameters of the first channel, further multiply different types of parameters by different weights, and finally sum to obtain channel parameters of the first channel. For example, the sending end divides the channel delay and the channel rate into a first group, and divides the signal strength, the heartbeat packet and the channel throughput rate into a second group; a sending end respectively obtains channel time delay, channel rate, signal strength, heartbeat packets and channel throughput rate of a first channel, then sums the channel time delay and the channel rate to obtain a first group of values, and sums the signal strength, the heartbeat packets and the channel throughput rate to obtain a second group of values; and adding the product of the value of the first group multiplied by the weight of the first group and the product of the value of the second group multiplied by the weight of the second group to obtain the channel quality of the first channel.
In another implementation, taking the sending end as an example, the sending end may also use a quality parameter as a standard for the channel quality of the first channel. For example, the transmitting end takes the rate of the first channel as the channel quality of the first channel.
It should be noted that the sending end and/or the receiving end may also detect the channel quality of the first channel in other manners, which is not limited herein.
S103, when the channel quality of the first channel is lower than the first index, the sending end sends first breakpoint information to the receiving end.
In some embodiments, the sending end may determine the first breakpoint information when the quality parameter of the first channel is lower than the first threshold, and then send the first breakpoint information to the receiving end.
Specifically, the sending end can send the first breakpoint information to the receiving end through the first channel; the sending end can also broadcast the first breakpoint information to the receiving end; the sending end can also send the first breakpoint information to the receiving end through a control channel, where the control channel may be a channel for transmitting a control message. For example, the control channel may be a Bluetooth Low Energy (ble) channel established by the sending end and the receiving end, specifically, in the process of the mobile phone projecting a screen to the large-screen device, the mobile phone and the large-screen device establish the ble control channel, the first channel of the mobile phone and the large-screen device transmission device is a routing AP channel, and when the channel quality of the first channel is lower than the first index, the mobile phone may send the first breakpoint information to the receiving end through the ble control channel. It can be understood that when the channel quality of the first channel is not good, the sending end sends the first breakpoint information to the receiving end through other channels, and therefore failure in sending the first breakpoint information can be avoided.
Optionally, the first breakpoint information may be sent in a broadcast and connection manner, and at the same speed, the first breakpoint information may be sent on the connection preferentially.
The first breakpoint information may include a breakpoint position, a sender identifier, a session identifier, progress information, a receiver identifier, and the like. For example, the data packet is filled in a variable form (Type Length Value, TLV), and the first breakpoint information may include a field name (Type). It should be noted that the first breakpoint information may also include other data, which is not limited herein.
Please refer to fig. 5, fig. 5 is a schematic diagram of breakpoint information according to an embodiment of the present disclosure. As shown in fig. 5, the first breakpoint information may include a field name, a sender identifier, a session identifier, progress information, and a receiver identifier. Wherein the field name comprises a field meaning for indicating a breakpoint location; the identification of the sending end can be a Media Access Control Address (MAC) Address of the sending end, and the identification of the receiving end can be an MAC Address of the receiving end; the session identifier is used to indicate the session after the breakpoint, for example, if the current sending end and the receiving end perform multiple sessions, the session identifier may be used to indicate the session transmitted by the current first channel; the segment of progress information may include the percentage of transmission and the specific content of the current transmission.
In some embodiments, the first channel between the sending end and the receiving end is wired communication, and the sending end may determine that the channel quality of the first channel is lower than the first index when the driver detects that the universal serial bus link is unstable or the number of times of instability reaches a preset number of times.
Optionally, the sending end may further determine whether to send the first breakpoint information to the receiving end according to the progress information. For example, in the case where the file transfer is up to ninety percent, the sender may not send the first breakpoint information to the receiver.
The first threshold value is set in the embodiment of the application, the sending end can negotiate breakpoint information with the receiving end in time when the first channel is abnormal, therefore, when the sending end and the receiving end switch channels, the receiving end can splice data from the breakpoint position in time, the data splicing speed of the receiving end is improved, and therefore in the channel switching process, the experience of a user is high.
And S104, when the channel quality of the first channel is lower than the first index, the receiving end sends second breakpoint information to the sending end.
For a specific process, reference may be made to relevant contents of step S103, which is not described herein again.
S105, the sending end and the receiving end negotiate target breakpoint information.
In some embodiments, the sending end sends the first breakpoint information to the receiving end, and the receiving end does not send the second breakpoint information to the sending end, so that the receiving end replies the confirmation information to the sending end after receiving the first breakpoint information, and both ends determine that the first breakpoint information sent by the sending end is the target breakpoint information.
In other embodiments, the receiving end sends the second breakpoint information to the sending end, and the sending end does not send the first breakpoint information to the receiving end, so that the sending end replies confirmation information to the receiving end after receiving the second breakpoint information sent by the receiving end, and both ends determine that the second breakpoint information sent by the receiving end is the target breakpoint information.
In still other embodiments, the receiving end sends the second breakpoint information to the sending end, and the sending end sends the first breakpoint information to the receiving end, then the receiving end replies the confirmation information to the sending end after receiving the first breakpoint information, and both ends determine that the first breakpoint information sent by the sending end is the target breakpoint information. It can be understood that the sending end and the receiving end detect the first channel at the same time, which can improve the detection effect of the detection result and is beneficial to improving the success rate of channel switching.
In some embodiments, the sending end and the receiving end may update the target breakpoint information again after a preset time. For example, after the sending end and the receiving end negotiate to determine the target breakpoint information for two seconds, the sending end and the receiving end still use the first channel to transmit data, and then the sending end and the receiving end may renegotiate the target breakpoint information.
S106, the sending end determines a first available channel.
Specifically, the sending end may obtain a channel available to the receiving end after negotiating with the receiving end to determine the target breakpoint information, determine a channel available to both the sending end and the receiving end as an available channel, and then determine the first available channel from the available channels.
In one implementation, the sending end may obtain a quality parameter of each of the available channels, and determine a channel with a highest quality parameter in the available channels as a first available channel.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating a method for scoring an available channel according to an embodiment of the present disclosure. As shown in fig. 6, the available channel includes ble, classic bluetooth (Basic Rate, BR), restricted application protocol (coach), and Point-to-Point transmission protocol (p 2 p), the sending end may use Rate and delay as an a group based on Rate and stability, use signal strength, heartbeat packet, and throughput as a B group, and score each group according to the acquired data, for example, 2 points without interference, 1 Point with interference available, and 0 Point repeatedly retransmitted in the bottom layer with serious interference. The sending end can combine with the actual service scene, and can increase the group A weight in the scene with higher speed requirement in the control command class; in scenarios where large files have higher quality requirements, the B group weights may be increased. As shown in fig. 6, according to the weighted result, the sorting result of the available channels is coach, p2p, BR, ble. For example, the sender may determine the coach as the first available lane.
In another implementation, the sending end may obtain a channel type used when the node transmits data of the same type as the first data within the target time, and further determine a channel belonging to the channel type in the available channels as the first available channel. Among them, the type of data may include an instruction (token), a text (text), a video stream (stream), a large file (file), and the like. For example, in a home network environment, a sending end is a mobile phone, a receiving end is a television, the mobile phone transmits a video stream to a computer, and the sending end and the receiving end are in communication connection with the computer, a refrigerator, and the like, so that the sending end can obtain a channel adopted by the computer, the refrigerator, and the like when the video stream is sent last time, and determine the channel as a first available channel.
Preferably, each node in the network can summarize the speed and quality of each transmission type on different channels, learn and share, and optimize a comprehensive sequencing strategy to achieve the optimal selection. Further, when two devices transmit again, the channel on which the transmission was performed last time can be preferentially used.
In yet another implementation, the sending end may obtain a quality parameter of each of the available channels, and then determine an available channel with a quality parameter higher than that of the first channel as the first available channel. For example, the channels available to both the sender and the sender include bluetooth and a point-to-point transmission channel, and the sender determines bluetooth as the first available channel when determining that the rate of bluetooth is higher than that of the point-to-point transmission channel.
In some embodiments, the transmitting end and/or the receiving end includes at least two chips, and the available channels include a channel between any one of the two chips and the opposite end. For example, the sending terminal is a device supporting multiple wifi chips, and when wifi transmission fails, the sending terminal can detect wifi channel quality of a second chip; for another example, the sending end is a device supporting multiple bluetooth chips, and detects the quality of a bluetooth channel of the second chip when bluetooth transmission fails.
In other embodiments, the sender may rank the time consumed for establishing the connection for the available channels, so as to select the channel with less time consumption as the first available channel. It should be understood that the time for switching the channel is less than the time for reestablishing the connection by the application layer, and the time for establishing the link by the application layer is less than the time for establishing the link after requesting the chip to switch. The time consumption for establishing connection for different channels of the application-side transport protocol is different, for example, the ble establishing link is faster than the BR.
S107, the receiving end determines a second available channel.
The specific process may refer to the relevant content of step S106, and is not described herein again.
Optionally, the sending end and the receiving end may perform inter-channel detection supported by the same transmission service type, for example, the sending end or the receiving end suddenly opens a hot spot or modifies a channel abnormality caused by 2G/5G wifi selection, and needs to search for an available channel again.
Optionally, the sender and the receiver may detect the transmission protocol of the application layer supported by the transmission service type, such as ble, BR, USB, coach, p2p for text transmission, and search for an available channel,
and S108, the transmitting end and the receiving end negotiate a second channel.
In some embodiments, the sending end sends the first available channel to the receiving end, and the receiving end does not send the second available channel to the sending end, then the receiving end replies the acknowledgement message to the sending end after receiving the first available channel, and both ends determine that the first available channel sent by the sending end is the target available channel.
In other embodiments, the receiving end sends the second available channel to the sending end, and the sending end does not send the first available channel to the receiving end, then the sending end replies the acknowledgement information to the receiving end after receiving the second available channel sent by the receiving end, and both ends determine that the second available channel sent by the receiving end is the target available channel.
In still other embodiments, the receiving end sends the second available channel to the sending end, and the sending end sends the first available channel to the receiving end, then the receiving end replies the acknowledgement message to the sending end after receiving the first available channel, and both ends determine that the first available channel sent by the sending end is the target available channel.
And S109, establishing a second channel by the sending end and the receiving end.
Specifically, after the sending end and the receiving end negotiate to determine the second channel, the connection of the second channel is established.
In some embodiments, the sending end and the receiving end negotiate to determine the target breakpoint information when the channel quality of the first channel is lower than the first index, and further negotiate to establish the second channel. It should be understood that in the embodiment of the present application, the second channel is established only when the first channel is abnormal, and the standby channel is not established before transmission starts, so that the problems that resources are wasted and transmission of the first channel is affected due to idle running are avoided.
S110, the sending end sends first data to the receiving end through the second channel, and the first data are located behind the target breakpoint.
Specifically, under the condition that the preset condition is met, the sending end and the receiving end are switched to the second channel, the sending end sends the first data to the receiving end through the second channel, and correspondingly, the second channel of the receiving end channel receives the first data from the sending end. The preset conditions comprise at least one condition that the quality parameter of the first channel is lower than a second threshold, the quality parameter of the first channel is lower than the quality parameter of the available channel, and the quality parameter of the available channel is higher than a third threshold. The second threshold and the third threshold are preset values, and are not limited specifically.
For example, the breakpoint position determined by negotiation between the sending end and the receiving end is determined by the sending end when the quality parameter of the first channel is lower than a first threshold, and the sending end may send, to the receiving end, data that is not sent by the sending end when the quality parameter of the first channel is lower than the first threshold, when the quality parameter of the first channel is lower than a second threshold.
For another example, after the sending end and the receiving end negotiate to determine the second channel, the channel quality of the first channel and the second channel is detected in real time, and when the quality parameter of the first channel is lower than the quality parameter of the second channel, the sending end switches to the second channel.
In some embodiments, after the sending end and the receiving end switch to the second channel, the sending end and the receiving end may disconnect the first channel.
And S111, splicing the second data received by the first channel and the first data received by the second channel by the receiving end, wherein the second data is data before the breakpoint position.
Specifically, after receiving the first data through the second channel, the receiving end splices the first data with the data before the breakpoint position received by the first channel. It should be noted that, by the embodiment of the present application, the output success rate can be increased, and experimental data shows that the transmission success rate can be increased by 30%, which is particularly obvious for the time period of frequent network condition changes and peak access.
In some embodiments, when the receiving end splices the second data received by the first channel with the first data received by the second channel, the transmitting end and the receiving end may disconnect the connection of the first channel. It will be appreciated that breaking the unnecessary path between the sending and receiving ends is beneficial to the performance of the device.
In the above-described embodiments, all or part of the functions may be implemented by software, hardware, or a combination of software and hardware. When implemented in software, 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium. 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, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.

Claims (23)

1. A channel switching method is applied to a sending end, and comprises the following steps:
the sending end transmits data to the receiving end through a first channel;
when the quality parameter of the first channel is lower than a first threshold, the sending end sends a breakpoint position to the receiving end, where the breakpoint position is used to determine first data, and the first data is data that is not sent by the sending end when the quality parameter of the first channel is lower than the first threshold;
the sending end negotiates with the receiving end to establish a second channel under the condition of keeping the first channel;
and the sending end sends the first data to the receiving end through the second channel, the first data is used for splicing the first data and second data by the receiving end based on the breakpoint position, and the second data is the data which is received by the receiving end through the first channel and is positioned before the breakpoint position.
2. The method according to claim 1, wherein the quality parameter of the first channel is any one of signal strength, channel throughput rate, channel rate, and heartbeat packet or a weighted sum of at least two of the signal strength, the channel throughput rate, the channel rate, and the heartbeat packet.
3. The method according to claim 1 or 2, wherein the negotiating for establishing the second channel with the receiving end by the transmitting end while maintaining the first channel comprises:
the sending end obtains a channel available for the receiving end;
the sending end determines a channel available to both the sending end and the receiving end as an available channel;
the sending end determines the second channel from the available channels;
the sending end sends the second channel to the receiving end;
and after receiving the reply message from the receiving end, the sending end establishes connection of a second channel with the receiving end.
4. The method of claim 3, wherein the determining, by the sending end, the second channel from the available channels comprises:
the sending end obtains the quality parameter of each channel in the available channels;
and the transmitting end determines the channel with the highest quality parameter in the available channels as the second channel.
5. The method of claim 3, wherein the sender, the receiver and the node communicate over a same network, and wherein the sender determining the second channel from the available channels comprises:
the sending end obtains the channel type used when the node transmits the data of the same type as the first data in the target time;
and the sending end determines the channel belonging to the channel type in the available channels as the second channel.
6. The method of claim 3, wherein the transmitting end determines the second channel from the available channels, comprising:
the sending end obtains the quality parameter of each channel in the available channels;
and the sending end determines an available channel with a quality parameter higher than that of the first channel as the second channel.
7. The method according to any of claims 3-6, wherein the transmitting end transmits the first data to the receiving end through the second channel, comprising:
and the sending end sends the first data to the receiving end through the second channel under the condition that a preset condition is met, wherein the preset condition comprises at least one of the condition that the quality parameter of the first channel is lower than a second threshold, the condition that the quality parameter of the first channel is lower than the quality parameter of the available channel and the condition that the quality parameter of the available channel is higher than a third threshold.
8. The method according to any one of claims 3-7, wherein the transmitting end comprises at least two chips, and the available channel comprises a channel between any one of the two chips and the receiving end.
9. The method according to any one of claims 1 to 8, wherein the sending end sends a breakpoint position to the receiving end when the quality parameter of the first channel is lower than a first threshold, and includes:
and the sending end broadcasts the breakpoint position to the receiving end.
10. The method according to any one of claims 1 to 8, wherein the sending end sends a breakpoint position to the receiving end when the quality parameter of the first channel is lower than a first threshold, and includes:
and the sending end sends the breakpoint position to the receiving end through a control channel.
11. A channel switching method is applied to a receiving end, and comprises the following steps:
the receiving end receives data from the transmitting end through a first channel;
the receiving end negotiates a breakpoint position with the transmitting end, wherein the breakpoint position is used for determining first data, and the first data is data which is transmitted by the transmitting end through the first channel and is positioned behind the breakpoint position;
the receiving end negotiates with the sending end to establish a second channel under the condition of keeping the first channel;
the receiving end receives the first data from the transmitting end through the second channel;
and the receiving terminal splices the first data and second data based on the breakpoint position, wherein the second data is the data which is received by the receiving terminal through the first channel and is positioned before the breakpoint position.
12. The method according to claim 11, wherein the breakpoint location is a breakpoint location received by the receiving end from the transmitting end, and the first data is data that is not transmitted by the transmitting end when a quality parameter of the first channel is lower than a first threshold; or, the breakpoint position is determined by the receiving end when the quality parameter of the first channel is lower than a fourth threshold, and the first data is data that is not received by the receiving end when the quality parameter of the first channel is lower than the fourth threshold.
13. The method according to claim 11 or 12, wherein the receiving end negotiates with the transmitting end to establish the second channel while maintaining the first channel, and includes:
the receiving end acquires a channel available for the sending end;
the receiving end determines the channel available to both the receiving end and the sending end as an available channel;
the receiving end determines the second channel from the available channels;
the receiving end sends the second channel to the sending end;
and the receiving end establishes connection of a second channel with the sending end after receiving the reply message from the sending end.
14. The method of claim 13, wherein the receiving end determines the second channel from the available channels, comprising:
the receiving end acquires the quality parameters of each channel in the available channels;
and the receiving end determines the channel with the highest quality parameter in the available channels as the second channel.
15. The method of claim 13, wherein the receiving end, the receiving end and the node communicate through the same network, and wherein the receiving end determines the second channel from the available channels comprises:
the receiving end acquires a channel type used when the node transmits data of the same type as the first data in target time;
and the receiving end determines the channel belonging to the channel type in the available channels as the second channel.
16. The method of claim 13, wherein the receiving end determines the second channel from the available channels, comprising:
the receiving end acquires the quality parameter of each channel in the available channels;
and the receiving end determines an available channel with quality parameters higher than those of the first channel as the second channel.
17. The method according to any of claims 13-16, wherein the receiving end comprises at least two chips, and the available channel comprises a channel between any one of the two chips and the transmitting end.
18. The method according to any one of claims 11-17, wherein the receiver negotiating a breakpoint location with the sender comprises:
and the receiving end broadcasts the breakpoint position to the transmitting end.
19. The method according to any of claims 11-17, wherein the negotiating a breakpoint location between the receiving end and the transmitting end comprises:
and the receiving end sends the breakpoint position to the sending end through a control path.
20. The method according to any of claims 11-19, wherein the second channel is determined by the sender, and the receiver negotiates with the sender to establish the second channel while maintaining the first channel, and includes:
and the receiving end establishes the connection of the second channel with the transmitting end when receiving the second channel from the transmitting end.
21. An electronic device, characterized in that the electronic device comprises: one or more processors, memory, and a display screen;
the memory coupled with the one or more processors, the memory to store computer program code, the computer program code comprising computer instructions, the one or more processors to invoke the computer instructions to cause the electronic device to perform the method of any of claims 1-20.
22. A computer program product comprising instructions for causing an electronic device to perform the method of any one of claims 1 to 20 when the computer program product is run on the electronic device.
23. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-20.
CN202110769317.1A 2021-07-07 2021-07-07 Channel switching method and device Pending CN115604773A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110769317.1A CN115604773A (en) 2021-07-07 2021-07-07 Channel switching method and device
PCT/CN2022/103922 WO2023280160A1 (en) 2021-07-07 2022-07-05 Channel switching method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110769317.1A CN115604773A (en) 2021-07-07 2021-07-07 Channel switching method and device

Publications (1)

Publication Number Publication Date
CN115604773A true CN115604773A (en) 2023-01-13

Family

ID=84801279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110769317.1A Pending CN115604773A (en) 2021-07-07 2021-07-07 Channel switching method and device

Country Status (2)

Country Link
CN (1) CN115604773A (en)
WO (1) WO2023280160A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626554A (en) * 2009-08-13 2010-01-13 中兴通讯股份有限公司 Multi-mode mobile terminal and resource downloading method thereof
US8750188B2 (en) * 2010-12-01 2014-06-10 Deutsche Telekom Ag System support for accessing and switching among multiple wireless interfaces on mobile devices
CN202663551U (en) * 2012-07-06 2013-01-09 上海中铁通信信号国际工程有限公司 Seamless switching embedded module
WO2015165024A1 (en) * 2014-04-29 2015-11-05 华为终端有限公司 Data transmission method and terminal
CN106576279B (en) * 2014-07-30 2020-11-17 华为技术有限公司 Multi-communication-system transmission method and device
CN109922205A (en) * 2018-11-29 2019-06-21 努比亚技术有限公司 Throw screen implementation method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
WO2023280160A1 (en) 2023-01-12

Similar Documents

Publication Publication Date Title
WO2021017889A1 (en) Display method of video call appliced to electronic device and related apparatus
CN111316598B (en) Multi-screen interaction method and equipment
CN113542839B (en) Screen projection method of electronic equipment and electronic equipment
US11683850B2 (en) Bluetooth reconnection method and related apparatus
CN113438354B (en) Data transmission method and device, electronic equipment and storage medium
US20230021994A1 (en) Cross-Device Content Projection Method and Electronic Device
US20230189366A1 (en) Bluetooth Communication Method, Terminal Device, and Computer-Readable Storage Medium
CN114125130B (en) Method for controlling communication service state, terminal device and readable storage medium
US20220294896A1 (en) Call method and apparatus
CN111316604B (en) Data transmission method and electronic equipment
US20230125956A1 (en) Wireless Communication System and Method
CN115696483A (en) Network link switching method based on electronic equipment state and electronic equipment
WO2020134868A1 (en) Connection establishment method, and terminal apparatus
CN113810451A (en) Method and device for establishing point-to-point link, server and terminal equipment
WO2020124447A1 (en) Multi-sim facing network management
CN113676902B (en) System, method and electronic equipment for providing wireless internet surfing
WO2023280160A1 (en) Channel switching method and apparatus
CN115460445B (en) Screen projection method of electronic equipment and electronic equipment
CN111801931B (en) Method for switching on and hanging up telephone when call occurs SRVCC switch
CN115048193A (en) Multi-device distributed scheduling method and related devices
CN117692693A (en) Multi-screen display method and related equipment
CN117354876A (en) Data migration method, electronic equipment and networking system
CN115857964A (en) Application program installation method and related equipment
CN116938950A (en) Data transmission method, electronic equipment and storage medium
CN116996900A (en) Data transmission method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination