Channel switching method, electronic device and storage medium
AssigneeHonor Device Co., Ltd.
InventorDongang Wu
Life of this patent
Estimating the term…
Abstract
A channel switching method, an electronic device and a storage medium are provided. The electronic device includes a first network channel and a second network channel, and a use priority of the second network channel is higher than a use priority of the first network channel. The method includes: starting a first application, where the first application includes a first data flow, and the first data flow is carried on the first network channel; and when it is detected that the second network channel is enabled and it is detected that the first data flow is a data flow of a preset type, keeping the first data flow still carried on the first network channel.
Claims20
A channel switching method, applied to an electronic device, wherein the electronic device is configured to communicate using a first network channel and a second network channel, a use priority of the second network channel is higher than a use priority of the first network channel, and the method comprises:
- starting a first application, wherein the first application comprises a first data flow, and the first data flow is carried on the first network channel;
- when it is detected that the second network channel is enabled, detecting whether the first data flow is a delay-sensitive flow based on at least one of the following parameters:
- a protocol type, a port number, a packet transmission feature, or a preset string in a packet, wherein the packet transmission feature comprises at least one of the following:
- a packet size, a quantity of packets within a preset duration, or a packet transmission speed, and wherein detecting whether the first data flow is a delay-sensitive flow comprises sequentially performing protocol type matching, port number matching, matching of whether a data packet of the first data flow includes the preset string, and data packet transmission feature matching on the data packet of the first data flow;
- when it is detected that the first data flow is a delay-sensitive flow, keeping the first data flow still carried on the first network channel;
- and
- detecting that transmission of the first data flow carried on the first network channel ends and no data flow is carried on the first network channel, and disabling the first network channel.
An electronic device, comprising a memory, wherein the memory stores computer program code, the computer program code comprises instructions, and when the electronic device reads the instructions from the memory, the electronic device is enabled to perform operations comprising:
- starting a first application, wherein the first application comprises a first data flow, and the first data flow is carried on a first network channel, and wherein the electronic device is configured to communicate using the first network channel and a second network channel, and a use priority of the second network channel is higher than a use priority of the first network channel;
- when it is detected that the second network channel is enabled, detecting whether the first data flow is delay-sensitive flow based on at least one of the following parameters:
- a protocol type, a port number, a packet transmission feature, or a preset string in a packet, wherein the packet transmission feature comprises at least one of the following:
- a packet size, a quantity of packets within a preset duration, or a packet transmission speed, and wherein detecting whether the first data flow is a delay-sensitive flow comprises sequentially performing protocol type matching, port number matching, matching of whether a data packet of the first data flow includes the preset string, and data packet transmission feature matching on the data packet of the first data flow;
- when it is detected that the first data flow is a delay-sensitive flow, keeping the first data flow still carried on the first network channel;
- and
- detecting that transmission of the first data flow carried on the first network channel ends and no data flow is carried on the first network channel, and disabling the first network channel.
A non-transitory computer-readable storage medium, comprising computer instructions, wherein when the computer instructions are run on an electronic device, the electronic device is enabled to perform operations comprising:
- starting a first application, wherein the first application comprises a first data flow, and the first data flow is carried on a first network channel, wherein the electronic device is configured to communicate using the first network channel and a second network channel, and a use priority of the second network channel is higher than a use priority of the first network channel;
- when it is detected that the second network channel is enabled, detecting whether the first data flow is a delay-sensitive flow based on at least one of the following parameters:
- a protocol type, a port number, a packet transmission feature, or a preset string in a packet, wherein the packet transmission feature comprises at least one of the following:
- a packet size, a quantity of packets within a preset duration, or a packet transmission speed, and wherein detecting whether the first data flow is a delay-sensitive flow comprises sequentially performing protocol type matching, port number matching, matching of whether a data packet of the first data flow includes the preset string, and data packet transmission feature matching on the data packet of the first data flow;
- when it is detected that the first data flow is a delay-sensitive flow, keeping the first data flow still carried on the first network channel;
- and
- detecting that transmission of the first data flow carried on the first network channel ends and no data flow is carried on the first network channel, and disabling the first network channel.
Dependencies are inferred from the claim text.