Network switching methods and electronic devices
By configuring evaluation metrics and thresholds for different applications and business scenarios, electronic devices can switch to backup networks in a timely manner when they detect a decline in network quality, solving the problem of low accuracy in network switching in existing technologies and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-10
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies cannot accurately determine the network communication quality of different applications and business scenarios, resulting in low accuracy in network switching.
By configuring specific evaluation metrics and thresholds for different applications and business scenarios, electronic devices acquire data streams while running target applications, count the values of evaluation metrics, and perform network switching when the number of evaluation metrics exceeds the threshold.
It improves the accuracy of network switching and user experience, ensuring timely switching to a backup network when network quality deteriorates.
Smart Images

Figure CN116456405B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal devices, and more particularly to a network switching method and an electronic device. Background Technology
[0002] With the development of communication technology, many electronic devices, such as smartphones, now support communication via both Wi-Fi and cellular data networks. Generally, if a user connects to both Wi-Fi and cellular data, the mobile device will default to using Wi-Fi. Furthermore, in cases of poor Wi-Fi quality, the electronic device can switch networks to improve the user experience. Therefore, improving the accuracy of network switching is a crucial technical problem that needs to be solved. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a network switching method and an electronic device. In this method, when the electronic device is running different applications, the timing of network switching is determined based on multiple evaluation metrics corresponding to those applications, thereby improving the accuracy of network switching.
[0004] In a first aspect, embodiments of this application provide a network switching method. The method includes: acquiring a target data stream during the execution of a target application by an electronic device; wherein the target data stream is data generated by network communication between the electronic device and a target server, and the target server is a device providing services for the target application; the electronic device determines multiple evaluation metrics corresponding to the target application and a threshold corresponding to each evaluation metric, the evaluation metrics describing network communication quality; the electronic device statistically analyzes the values of the multiple evaluation metrics in the target data stream to obtain a target value corresponding to each evaluation metric; for each of the multiple evaluation metrics, the electronic device compares the target value corresponding to each evaluation metric with the threshold corresponding to each evaluation metric to obtain a number of first evaluation metrics; wherein the first evaluation metrics satisfy the following condition: the target value of the evaluation metric and the threshold corresponding to the evaluation metric satisfy the first condition; when the number of first evaluation metrics exceeds a threshold, the network of the electronic device is switched from the current network to a backup network. In this way, the electronic device can determine the timing of network switching based on multiple evaluation metrics corresponding to the application, thereby improving the accuracy of network switching.
[0005] Based on the first aspect, multiple evaluation metrics corresponding to the target application and the thresholds for each evaluation metric are determined, including: determining the current business scenario in which the target application is running; and obtaining multiple evaluation metrics corresponding to the business scenario and the thresholds for each evaluation metric. In this way, the switching timing will differ depending on the business scenario in which the target application is running, further improving the accuracy of network switching.
[0006] For example, the target application may include live streaming and video viewing scenarios. The evaluation metrics for live streaming and video viewing scenarios are different.
[0007] According to the first aspect, or any implementation of the first aspect above, for each of the multiple evaluation indicators, the target value corresponding to each evaluation indicator is compared with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators. This includes: if it is determined at a first moment that the current indicator among the multiple evaluation indicators exceeds the corresponding threshold, then the number of first evaluation indicators within a specified time period is obtained, where the specified time period includes at least one detection cycle; wherein, the end time of the specified time period is the first moment, and the duration of the specified time period is the specified duration. In this way, electronic devices can more accurately and flexibly switch networks, thereby improving the user experience.
[0008] For example, the specified duration can be 3 seconds, and the detection period can be 500 ms.
[0009] According to the first aspect, or any implementation of the first aspect above, the number of first evaluation indicators within a specified time period is the sum of the number of voting marks of evaluation indicators within the same detection cycle, wherein the evaluation indicator with added voting marks is the first evaluation indicator.
[0010] According to the first aspect, or any implementation of the first aspect above, for each of the multiple evaluation indicators, the target value corresponding to each evaluation indicator is compared with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators. This includes: selecting one evaluation indicator from the multiple evaluation indicators as the current indicator; performing a current indicator judgment operation, which determines whether the target value and the threshold corresponding to the current indicator meet a first condition; if the first condition is met, adding a voting mark to the current indicator; counting the number of voting marks among the multiple evaluation indicators and using this number as the number of first evaluation indicators; if the number of first evaluation indicators does not exceed the number threshold, selecting the next evaluation indicator from the multiple evaluation indicators as the current indicator, and performing the current indicator judgment operation again, until the judgment operation for multiple evaluation indicators is completed. In this way, the electronic device can continuously monitor multiple evaluation indicators of the target application to ensure timely switching when network quality is lagging.
[0011] For example, the number threshold can be 2 votes, and there can be 4 evaluation indicators.
[0012] According to the first aspect, or any implementation of the first aspect above, after completing the judgment operation on multiple evaluation indicators, the data stream of the next detection cycle is obtained, and the data stream of the next detection cycle is used as the target data stream. The values of multiple evaluation indicators in the target data stream are used to obtain the number of the first evaluation indicator again, and to determine whether the number of the first evaluation indicator exceeds the quantity threshold. In this way, the electronic device can combine the values of the evaluation indicators obtained in different cycles to comprehensively determine whether to perform a network switching operation.
[0013] Based on the first aspect, or any implementation of the first aspect above, perform the current indicator judgment operation; if the first condition is met, add a voting flag to the current indicator, including: if the current indicator is a preset indicator, obtain the first threshold and the second threshold corresponding to the current indicator; determine whether the target value of the current indicator exceeds the first threshold; if it exceeds the first threshold, add a voting flag to the current indicator, and determine whether the target value of the current indicator exceeds the second threshold; if the target value of the current indicator exceeds the second threshold, add a voting flag to the current indicator again. In this way, the same indicator value can cast two votes in the event of severe deterioration, which can also trigger the network switching operation.
[0014] For example, preset metrics may include downlink rate (TCP+UDP), WiFi MAC layer uplink retransmission rate, and TCP uplink retransmission rate.
[0015] According to the first aspect, or any implementation of the first aspect above, if the first condition is met, after adding a voting tag to the current indicator, the process includes: recording the current time when the voting tag is added; and clearing the voting tag after a specified duration from the current time. In this way, the number of voting tags acquired by the electronic device is real-time, thus preventing accidental network switching.
[0016] According to the first aspect, or any implementation of the first aspect above, the number of first evaluation indicators within a specified time period is the sum of the number of voting marks of evaluation indicators within at least two detection periods, wherein the evaluation indicator with added voting marks is the first evaluation indicator.
[0017] Depending on the first aspect, or any of the implementation methods of the first aspect above, the corresponding evaluation metrics will differ depending on the target application.
[0018] For example, the target application can be a live streaming application or a browsing application. The evaluation metrics for live streaming applications and browsing applications are different.
[0019] Depending on the first aspect, or any of the implementations of the first aspect above, the thresholds for the same evaluation metric may differ for different target applications.
[0020] For example, the thresholds for the same evaluation metric may differ for live streaming applications and browsing applications.
[0021] According to the first aspect, or any of the implementation methods of the first aspect above, the business scenario includes the live streaming business scenario, and the evaluation indicators corresponding to the live streaming business scenario include at least round-trip transmission time, downlink rate, downlink retransmission rate and uplink retransmission rate.
[0022] For example, the downlink rate can be the downlink rate (TCP+UDP), the downlink retransmission rate can be the TCP downlink retransmission rate, and the uplink retransmission rate can be the WiFi MAC layer uplink retransmission rate.
[0023] Secondly, embodiments of this application provide an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when executed by the one or more processors, the electronic device performs the following steps: During the execution of a target application by the electronic device, acquiring a target data stream; wherein the target data stream is data generated by network communication between the electronic device and a target server, and the target server is a device providing services for the target application; determining multiple evaluation metrics corresponding to the target application and a threshold corresponding to each evaluation metric, the evaluation metrics being used to describe network communication quality; statistically analyzing the values of the multiple evaluation metrics in the target data stream to obtain a target value corresponding to each evaluation metric; for each of the multiple evaluation metrics, comparing the target value corresponding to each evaluation metric with the threshold corresponding to each evaluation metric to obtain the number of first evaluation metrics; wherein the first evaluation metric satisfies the following condition: the target value of the evaluation metric and the threshold corresponding to the evaluation metric satisfy the first condition; and when the number of the first evaluation metrics exceeds a threshold, switching the network of the electronic device from the current network to a backup network.
[0024] According to the second aspect, when a computer program is executed by one or more processors, it causes the electronic device to perform the following steps: determine the business scenario in which the target application is currently running; and obtain multiple evaluation metrics corresponding to the business scenario and the threshold corresponding to each evaluation metric.
[0025] According to the second aspect, or any implementation of the second aspect above, when a computer program is executed by one or more processors, the electronic device performs the following steps: if it is determined at a first moment that the current indicator among a plurality of evaluation indicators exceeds the corresponding threshold, then the number of the first evaluation indicators within a specified time period is obtained, the specified time period including at least one detection cycle; wherein, the end time of the specified time period is the first moment, and the duration of the specified time period is the specified duration.
[0026] According to the second aspect, or any implementation of the second aspect above, the number of first evaluation indicators within a specified time period is the sum of the number of voting marks of evaluation indicators within the same detection cycle, wherein the evaluation indicator with added voting marks is the first evaluation indicator.
[0027] According to the second aspect, or any implementation thereof, when a computer program is executed by one or more processors, the electronic device performs the following steps: selecting one evaluation indicator from multiple evaluation indicators as the current indicator; performing a current indicator judgment operation, which determines whether the target value of the current indicator and the threshold corresponding to the current indicator meet a first condition; if the first condition is met, adding a voting mark to the current indicator; counting the number of voting marks among the multiple evaluation indicators and using this number as the number of the first evaluation indicators; if the number of the first evaluation indicators does not exceed the number threshold, selecting the next evaluation indicator from the multiple evaluation indicators as the current indicator, and performing the current indicator judgment operation again, until the judgment operation for multiple evaluation indicators is completed.
[0028] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps: after completing the judgment operation on multiple evaluation indicators, it acquires the data stream of the next detection cycle, uses the data stream of the next detection cycle as the target data stream, uses the values of multiple evaluation indicators in the target data stream to acquire the number of the first evaluation indicator again, and determines whether the number of the first evaluation indicator exceeds the quantity threshold.
[0029] According to the second aspect, or any implementation of the second aspect above, when a computer program is executed by one or more processors, the electronic device performs the following steps: if the current indicator is a preset indicator, then obtain the first threshold and the second threshold corresponding to the current indicator; determine whether the target value of the current indicator exceeds the first threshold; if it exceeds the first threshold, add a voting flag to the current indicator, and determine whether the target value of the current indicator exceeds the second threshold; if the target value of the current indicator exceeds the second threshold, add a voting flag to the current indicator again.
[0030] According to the second aspect, or any implementation thereof, when a computer program is executed by one or more processors, the electronic device performs the following steps: recording the current time when the voting mark is added; and clearing the voting mark after a specified duration from the current time.
[0031] According to the second aspect, or any implementation of the second aspect above, the number of first evaluation indicators within a specified time period is the sum of the number of voting marks of evaluation indicators within at least two detection periods, wherein the evaluation indicator with added voting marks is the first evaluation indicator.
[0032] Depending on the second aspect, or any of the implementation methods of the second aspect above, the corresponding evaluation metrics will differ depending on the target application.
[0033] According to the second aspect, or any of the implementations of the second aspect above, the thresholds for the same evaluation metric differ for different target applications.
[0034] According to the second aspect, or any implementation of the second aspect above, the business scenario includes the live streaming business scenario, and the evaluation indicators corresponding to the live streaming business scenario include at least round-trip transmission time, downlink rate, downlink retransmission rate and uplink retransmission rate.
[0035] Thirdly, embodiments of this application provide a chip. The chip includes one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, it causes the electronic device to perform the network switching method of the first aspect and any one of the first aspects.
[0036] The third aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the third aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here.
[0037] Fourthly, embodiments of this application provide a computer-readable storage medium. The computer-readable storage medium includes a computer program, characterized in that, when the computer program is run on an electronic device, it causes the electronic device to perform the first aspect and any one of the network switching methods in the first aspect.
[0038] The fourth aspect and any implementation thereof correspond to the first aspect and any implementation thereof, respectively. The technical effects of the fourth aspect and any implementation thereof are similar to those of the first aspect and any implementation thereof, and will not be repeated here. Attached Figure Description
[0039] Figure 1 This is a schematic diagram illustrating a network connection between an electronic device and the cloud, as shown in an embodiment of this application.
[0040] Figure 2 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0041] Figure 3This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;
[0042] Figure 4 A network handover diagram provided in an embodiment of this application;
[0043] Figure 5 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application;
[0044] Figure 6 Technical architecture diagrams provided for embodiments of this application;
[0045] Figure 7 A schematic diagram illustrating a network switching process provided in an embodiment of this application;
[0046] Figure 8 This is a schematic diagram illustrating the performance evaluation of Huya as the application used in this embodiment of the application.
[0047] Figures 9a-9c A schematic diagram of the interface of an electronic device provided in an embodiment of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0050] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0051] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0052] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0053] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more. For example, multiple processing units means two or more processing units; multiple systems means two or more systems.
[0054] In this embodiment, an electronic device can establish a network channel with other electronic devices via a wireless network card, and it can also establish a network channel with other electronic devices via a data service network card. The network channel established via a wireless network card can be called a Wi-Fi network, while the network channel established via a data service network card can be called a cellular network. In practical applications, different applications (or different types of applications) have different requirements for the quality of the network channel used.
[0055] Additionally, the electronic device may be equipped with a network acceleration module. This module is used to perform network switching when network lag occurs while the electronic device is running an application. Specifically, in this embodiment of the application, this network acceleration module can achieve switching between Wi-Fi and cellular networks. For details, please refer to [link to relevant documentation]. Figure 1 .pass Figure 1 As can be seen, if an application on an electronic device determines that the Wi-Fi network currently connected to the device is lagging during operation, the device's network can be switched from Wi-Fi to cellular network.
[0056] See Figure 2A user uses application A on their phone to watch videos / live streams. Application A establishes a network connection with its server A via the phone's Wi-Fi card. Data stream A generated between application A and server A (e.g., data stream generated during a live stream) is transmitted via the Wi-Fi network between the phone's Wi-Fi card and the wireless router. Similarly, a user uses application B (a browsing application) on their phone to chat. Application B establishes a network connection with its server B via the phone's Wi-Fi card. Data stream B generated between application B and server B (e.g., data stream generated when browsing a website) is transmitted via the Wi-Fi network between the phone's Wi-Fi card and the wireless router.
[0057] In this embodiment, the data sequence transmitted between two electronic devices is referred to as a data stream. In practical applications, this data stream can be a video stream, audio stream, download stream, session stream, etc.
[0058] If a user uses app A and app B on their phone at the same location (within the same distance between the Wi-Fi card and router) and for the same period of time (e.g., within half an hour), theoretically, the difference in Wi-Fi communication quality should be minimal. However, because data stream A generates a larger amount of data per unit time compared to data stream B, data stream A places higher demands on the quality of the Wi-Fi network. Users may experience smoother performance with app B, but may experience lag or stuttering with app A, resulting in a poorer user experience.
[0059] Furthermore, different business scenarios within the same application may have different communication quality requirements due to the different business processes they handle. For example... Figure 3 As shown, application A can include two scenarios: a live streaming scenario and a video scenario. In the live streaming scenario, the data stream generated by application A can be live stream A1, and in the video scenario, the data stream generated by application A can be video stream A2. Both live stream A1 and video stream A2 can be transmitted via a Wi-Fi network between a wireless network card and a 2.4GHz wireless router.
[0060] If a user uses application A on their phone to stream live and watch video simultaneously from the same location (within the same distance between the wireless network card and the wireless router) and within the same timeframe (e.g., within half an hour), theoretically, the difference in network channel quality should be minimal. However, because live stream A1 generates a larger amount of data per unit time compared to video stream A2, live stream A1 has higher requirements for network channel quality than video stream B. While watching video using application A may be smooth, streaming live using application A might feel too slow, resulting in a poor user experience.
[0061] In summary, different applications on the same electronic device have different requirements for network channel quality, and different business scenarios within the same application may also have different requirements. If it is determined that the network channel currently used by a particular application is insufficient to handle the data stream generated by that application, switching networks can improve communication quality.
[0062] See Figure 4 If it is determined that the transmission quality of data stream A for application A is poor, data stream A can be switched from the current Wi-Fi network to another network channel. For example... Figure 4 As shown, the mobile phone can switch data stream A to the cellular network between the mobile phone's data service network card and the base station in order to transmit data stream A with server A through the cellular network.
[0063] In this application embodiment, the communication quality (good / bad) of a certain network channel or the transmission quality (good / bad) of a certain data stream on a certain network channel can be determined by some parameters. In specific implementation, some conditions can be set. For example, when the preset conditions are met, the communication quality is considered good (good), and when the preset conditions are not met, the communication quality is considered bad (poor).
[0064] As can be seen from the above introduction, the prerequisite for performing network switching is that the communication quality of the network channel cannot meet the normal communication of the application. Therefore, it is crucial to determine whether the evaluation indicators of the current application (business scenario) meet the switching conditions.
[0065] Currently, the determination of whether to perform a network handover operation is primarily based on critical flows. However, to ensure data security, most data streams between electronic devices and servers are encrypted, such as through HTTPS. This makes it difficult to assess network communication quality from the perspective of critical flows when deciding whether to perform a network handover operation.
[0066] Furthermore, when existing electronic devices interact with servers, the transmitted data streams are no longer limited to a single stream; multiple streams may be transmitted during data transmission. The existence of multiple data streams makes it impossible to judge the network communication quality based on the critical stream. For example, in the context of live streaming services, short video applications transmit data between themselves and servers using TCP (Transmission Control Protocol) streams, UDP (User Datagram Protocol) streams, and P2P (Peer-to-peer) streams.
[0067] Alternatively, determining whether to perform a network switching operation can also be done by judging the network channel. However, judging communication quality solely based on the network channel typically only uses physical layer or MAC (Medium Access Control) layer parameters. Furthermore, when determining whether to perform a network switching operation based on the channel, it's impossible to use different evaluation metrics for different scenarios; that is, it cannot differentiate between different scenarios. As mentioned above, different scenarios of the same application may have different requirements for network communication quality. For example, application A's live streaming scenario has certain requirements for speed, while the gaming scenario has lower speed requirements, but the live streaming scenario has higher requirements for latency and packet loss.
[0068] Therefore, existing methods for determining network switching cannot accurately identify different applications and business scenarios, resulting in low accuracy in network switching.
[0069] To address the aforementioned issues, this application provides a network handover method. In this method, developers can pre-configure different evaluation metrics and corresponding thresholds for different applications. Furthermore, different evaluation metrics and thresholds can be set for different scenarios within the same application. This can improve the accuracy of network handover to a certain extent.
[0070] The network switching method in this application embodiment can be applied to electronic devices. The electronic device is suitable for mobile phones in the above scenario. Additionally, the electronic device can also be a tablet computer, laptop, wearable device, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc. This application embodiment does not limit the specific type of electronic device.
[0071] Figure 5 A schematic diagram of the structure of the electronic device 100 in an embodiment of this application is shown. It should be understood that... Figure 5 The electronic device 100 shown is merely an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 5 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0072] Electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0073] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0074] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the network switching method in the embodiments of this application.
[0075] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0076] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The USB interface 130 is an interface compliant with the USB standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0077] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0078] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0079] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0080] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.
[0081] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0082] 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 technology.
[0083] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0084] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0085] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0086] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0087] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0088] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications of electronic device 100 by running the instructions stored in internal memory 121, and executes the instructions in internal memory 121 to cause the electronic device to perform the network switching method described in this application. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0089] In the embodiments of this application, the internal memory 121 may also store executable program code corresponding to the network switching method of the embodiments of this application, and the processor can realize network switching by running the executable program code corresponding to the network switching method.
[0090] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0091] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0092] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0093] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can be corresponding to touch operations applied to different applications (such as taking photos, playing audio, etc.). Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc.
[0094] This application does not specifically limit the structure of the execution entity of a network switching method. Any method can be implemented by running code containing the network switching method of this application. For example, the execution entity of a network switching method provided in this application can be a functional module in an electronic device capable of calling and executing programs, or a processing device applied in an electronic device, such as a chip.
[0095] The electronic device in this embodiment can install and run multiple applications, such as short video applications, browser applications, games, and news applications. The short video applications can be used to play videos or conduct live video streaming. These applications can establish network connections with other electronic devices (e.g., the server corresponding to the application) through the electronic device they reside on.
[0096] As an example, an electronic device has an application A installed, which can be a short video application. Furthermore, application A can establish a network connection with its corresponding server through the wireless network card (also referred to as a Wi-Fi card) in the electronic device; application A can also establish a network connection with its corresponding server A through the data service network card in the electronic device. The wireless network card is a device that supports Wireless Local Area Network (WLAN) internet access; the data service network card is a device that supports mobile communication technologies such as General Packet Radio Service (GPRS), Enhanced Data Rate for GSM Evolution (EDGE), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), High Speed Downlink Packet Access (HSDPA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), and 5th Generation Mobile Communication Technology (5G) for internet access.
[0097] Figure 6 This is a software structure block diagram of an electronic device 100 according to an embodiment of this application. Figure 6 As can be seen, the technical architecture of electronic devices divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces.
[0098] The application layer can include various applications, such as short video applications and browser applications as mentioned earlier. Additionally, applications can also include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, and SMS applications. The application layer can also be called the application layer.
[0099] The service layer may include environment detection components, network detection components, channel-level path management components, application-level policy management components, channel and application quality assessment components, and network connection management components.
[0100] Among them, the environment detection component is used to detect various events of upper-layer applications. For example, it can detect the opening and exit of applications, as well as applications that are currently switched to the foreground, and applications that are installed or uninstalled.
[0101] The network detection component is used to detect the status (on or off, etc.) of Wi-Fi networks supported by electronic devices, and can also detect the status of data service networks supported by the electronic device. As an example, the electronic device has a 2.4GHz wireless network card 1 and a 5.0GHz wireless network card 2. The network detection component can detect whether the 2.4GHz wireless network is on or off; it can also detect whether the 5.0GHz wireless network is on or off. The electronic device has a data service network card 1 from operator A and a data service network card 2 from operator B. The network detection component can detect whether the data service from operator A is on or off; it can also detect whether the data service from operator B is on or off.
[0102] The Channel and Application Quality Assessment (CQA) component is used to evaluate the quality of network channels. As an example, this component can assess the quality of Wi-Fi networks in the 2.4 GHz band and also in the 5.0 GHz band. It can also assess the quality of cellular networks belonging to operator A and operator B.
[0103] The network connectivity management component is used to start a network channel, that is, to bring the network channel from a dormant state to a wake-up state. The wake-up network channel can be used directly.
[0104] The channel-level path management component stores paths for multiple network channels, and is used to request or close any network channel. It can detect changes in the status of any network channel and the quality of any network channel.
[0105] The application-level policy management component is used to enable network acceleration and data flow monitoring.
[0106] The policy layer can include flow-level policy management components, flow-level path management components, and traffic awareness components.
[0107] The traffic-aware component can be used to statistically analyze reported data streams and determine the communication quality of each data stream upon receiving data streams from the traffic reporting component. The flow-level policy management component instructs the policy execution component to perform network switching operations. The flow-level path management component updates network channel selection based on upper-layer policy changes, triggers network channel quality detection, dynamically selects the optimal channel, and can also store paths for different network channels; for example, it can store the paths of the network channels currently used by the application (e.g., the primary network channel) and backup network channels. Additionally, the flow-level path management component can also determine the communication quality of each data stream upon receiving data streams from the flow-level awareness component.
[0108] The kernel layer includes a policy enforcement component and a traffic reporting component. The traffic reporting component collects data stream information and reports the collected data stream information. The policy enforcement component executes network channel switching.
[0109] As another embodiment of this application, in the above embodiments, one component can be split into two or more components, and two or more components at the same level can be merged into the same component.
[0110] As an example, the flow-level policy management component and the flow-level path management component at the policy layer can be merged into a single component; the application-level policy management component and the channel-level path management component can also be merged into a single component. Furthermore, in this embodiment, the determination of whether the application currently running on the electronic device meets the conditions for network switching can be performed by the flow-level path management component or by the traffic-aware component. The following embodiments will detail the circumstances under which network switching is performed.
[0111] In this embodiment, when a target application is detected running on an electronic device, multiple evaluation metrics corresponding to that target application can be obtained. Then, based on these evaluation metrics, a comprehensive determination is made as to whether to perform a network handover operation. Furthermore, different applications running on the electronic device correspond to different evaluation metrics, which can improve the accuracy of network handover to a certain extent.
[0112] like Figure 7 As shown in the embodiment of this application, a network switching method is provided, which may include the following steps S10 to S12.
[0113] Step S01: The stream-level path management component obtains the target data stream of the target application.
[0114] It should be noted that "acquiring" can refer to receiving the target data stream reported by the traffic reporting component. As one approach, the traffic reporting component can report the data stream related to application A to the flow-level path management component every preset period; this data stream can serve as the target data stream. For example, the traffic reporting component can report its collected data stream to the flow-level path management component every 500ms. In other words, the aforementioned target data stream can be the data stream of the current period.
[0115] In this embodiment, when the flow-level path management component detects that an electronic device is running a target application, it can obtain the target data stream corresponding to that target application. Additionally, if the target application includes multiple business scenarios, it can obtain the target data stream of the currently running business scenario.
[0116] Furthermore, the target data stream can consist of multiple consecutive data packets. These data packets can be data about the target application collected by a traffic reporting component at different times; that is, the target data stream can be data generated by an electronic device during network communication with a target server. Each data packet can be viewed as a window. Additionally, each data packet can include values for multiple evaluation metrics.
[0117] As an example, when a user launches application A or switches application A from the background to the foreground, the application-level policy management component can instruct the traffic reporting component to start listening to application A, that is, instruct the traffic reporting component to report the data stream of application A to the flow-level path management component. Application A can be any application on an electronic device that can access the network.
[0118] Step S02: The flow-level path management component selects the values corresponding to multiple evaluation metrics from the target data stream and performs window statistics on the value of each evaluation metric.
[0119] In this embodiment of the application, each application can store multiple corresponding evaluation metrics. After the flow-level path management component obtains the target data stream transmitted by the traffic reporting component, it can select the evaluation values corresponding to multiple evaluation metrics from the target data stream.
[0120] An application can correspond to only one business scenario. For example, navigation and travel application A only corresponds to the business scenario of searching routes. Alternatively, an application can correspond to multiple business scenarios. For example, short video application B corresponds to both live streaming and video viewing business scenarios.
[0121] To achieve more accurate network switching, this application configures multiple evaluation metrics for each application and each corresponding business scenario. Furthermore, this application also configures corresponding thresholds for each evaluation metric. Therefore, different applications may have different evaluation metrics. Moreover, the thresholds for the same evaluation metric may differ across different applications.
[0122] In summary, there can be certain correspondences between applications, their corresponding business scenarios, evaluation metrics, and the thresholds corresponding to those metrics. To better understand the relationships between applications, business scenarios, evaluation metrics, and the thresholds corresponding to those metrics, the embodiments of this application provide the following Table 1.
[0123] Table 1 can be stored in the flow-level path management component. When the electronic device is detected to be running the target application, the flow-level path management component can use Table 1 to obtain multiple evaluation metrics corresponding to the target application.
[0124] As can be seen from Table 1, the same application (business scenario) can have multiple evaluation indicators. Different applications may have different evaluation indicators.
[0125] As an example, the evaluation metrics for the live streaming business scenario in the "Huya" application could be TCPRTT (Round Trip Time), TCP downlink rate, TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate.
[0126] As another example, the evaluation metrics for the business scenario of browsing websites in a "browser" application could be TCP RTT, TCP uplink retransmission rate, TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate.
[0127] Furthermore, as shown in Table 1, the same evaluation metric can have one or more thresholds. For example, the evaluation metrics "Huya" have only one threshold for TCP RTT and TCP downlink retransmission rate, namely threshold 1. However, the evaluation metrics downlink rate (TCP+UDP) and WiFi MAC layer uplink retransmission rate can have two thresholds, namely threshold 1 and threshold 2.
[0128] It should be noted that when configuring evaluation metrics for each application (business scenario), this embodiment of the application can select one or more evaluation metrics from TCP RTT, downlink rate, uplink rate, retransmission rate, etc. The retransmission rate can include TCP downlink retransmission rate, TCP uplink retransmission rate, and WiFi MAC layer uplink retransmission rate, etc.
[0129] Table 1 Evaluation metrics and thresholds for multiple applications and multiple business scenarios
[0130]
[0131] Additionally, the rate can include uplink and downlink rates, and the downlink rate can include TCP downlink rate, UDP downlink rate, and TCP+UDP downlink rate, etc. Optionally, latency, packet loss rate, and the presence of a response can also be configured as evaluation metrics. There are no explicit restrictions on which evaluation metrics to configure for the specific application or business scenario; you can choose according to the actual situation.
[0132] Table 1 above lists only a portion of the applications and their corresponding evaluation metrics and thresholds for each application scenario, and is for illustrative purposes only.
[0133] As described above, the target data stream can include multiple data packets, each corresponding to a window, and each window can include values for multiple evaluation metrics. To better evaluate application A, the flow-level path management component, after obtaining multiple evaluation metrics, can perform window statistics on the multiple values corresponding to each evaluation metric to obtain the target value for each evaluation metric.
[0134] In this embodiment of the application, window statistics can be performed on multiple values corresponding to the same evaluation indicator. As an example, window statistics can be performed by averaging multiple evaluation values corresponding to the same evaluation indicator and using the average value as the target value of the evaluation indicator.
[0135] As another example, window statistics can also involve obtaining the maximum value among multiple evaluation values for the same evaluation metric and using that maximum value as the target value for that metric. There are no explicit restrictions on which statistical strategy to use here; the choice can be made based on the actual situation.
[0136] As one approach, when performing window statistics on evaluation metrics, the flow-level path management component can perform either a single window statistics operation or multiple window statistics operations. Furthermore, the number of windows can vary when performing multiple window statistics operations.
[0137] As an example, when performing statistics on the evaluation metric of downlink rate (TCP+UDP), two window statistics can be performed. The first window statistics can be performed by averaging four windows to obtain the first target value; the second window statistics can be performed by averaging seven windows to obtain the second target value.
[0138] Table 1 shows that the evaluation metrics for Huya's live streaming service scenario include TCP RTT, downlink rate (TCP+UDP), TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate. In this application, TCP RTT can be denoted as R, downlink rate as V, TCP downlink retransmission rate as P, and WiFi MAC layer uplink retransmission rate as C.
[0139] After acquiring multiple evaluation metrics, the flow-level path management component can select the four closest data packets from the target data stream for window statistics. These four data packets are data packet 1, data packet 2, data packet 3, and data packet 4. Furthermore, data packet 1 includes evaluation metrics R1, V1, P1, and C1; data packet 2 includes evaluation metrics R2, V2, P2, and C2; data packet 3 includes evaluation metrics R3, V3, P3, and C3; and data packet 4 includes evaluation metrics R4, V4, P4, and C4.
[0140] After acquiring four data packets, the flow-level path management component can perform window statistics on each evaluation metric within these packets. For example, it can calculate the average TCP downlink retransmission rate across the four packets to obtain the target TCP downlink retransmission rate. The specific calculation formula is (P1+P2+P3+P4) / 4. The statistics for other evaluation metrics are similar to those for the TCP downlink retransmission rate and will not be elaborated upon here.
[0141] Furthermore, when performing window statistics on the values of each evaluation indicator, the same statistical method can be used, or different statistical methods can be used. For example, when performing statistics on the values of each evaluation indicator, the average value can be calculated. Or, when performing statistics on the values of some evaluation indicators, the average value can be calculated, while for others, the maximum / minimum value can be obtained, etc.
[0142] In summary, by performing window statistics on the values of multiple evaluation metrics, the target value corresponding to each evaluation metric can be obtained. Subsequently, based on these target values, it can be determined whether to perform a network handover operation. Furthermore, after obtaining the target value for each evaluation metric, the flow-level path management component can select one from the multiple evaluation metrics as the current metric, i.e., proceed to step S03.
[0143] It should be noted that the values of the evaluation metrics in the target data stream can be obtained by the flow-level path management component from the traffic reporting component. Examples include TCP RTT, TCP downlink rate, and TCP downlink retransmission rate. Optionally, the values of the evaluation metrics can also be obtained by the flow-level path management component from the service layer. For example, the WiFi MAC layer uplink retransmission rate. There is no explicit restriction on which component transmits the stream to the flow-level path management component for each evaluation metric; it can be selected based on the application and the actual situation of the application's context.
[0144] Step S03: The flow-level path management component selects one of multiple evaluation metrics as the current metric.
[0145] In some implementations, the flow-level path management component can sequentially select the current metric from multiple evaluation metrics and then determine whether the current metric meets the voting criteria. Specifically, the flow-level path management component can determine whether the current metric exceeds the corresponding threshold, i.e., proceed to step S04.
[0146] Step S04: The flow-level path management component determines whether the target value of the current metric exceeds the corresponding threshold.
[0147] As one approach, upon obtaining the current metric, the flow-level path management component can determine whether the target value of the current metric exceeds a threshold. If it exceeds the threshold, a voting flag for the current metric is set, proceeding to step S05. The threshold can be the maximum or minimum value corresponding to the current metric.
[0148] In addition, when it is determined that the current metric has not exceeded the threshold, the flow-level path management component can determine whether the current metric has been voted on, that is, proceed to step S10.
[0149] As an example, if the current metric is the TCP downlink retransmission rate, then we need to determine whether the target value P0 of the TCP downlink retransmission rate is greater than the threshold (20%) corresponding to the TCP downlink retransmission rate. If the target value P0 of the TCP downlink retransmission rate is greater than the threshold, then a voting flag for the current metric, TCP downlink retransmission rate, can be set. The voting flag indicates that the current metric, TCP downlink retransmission rate, has exceeded the threshold.
[0150] Step S05: The flow-level path management component sets the voting flag for the current metric.
[0151] In this embodiment of the application, when it is determined that the target value of the current indicator exceeds the threshold, the flow-level path management component can set a voting flag for the current indicator. Setting a voting flag for the current indicator can be done by setting a voting flag for the current evaluation indicator.
[0152] As an example, if it is determined that the current metric TCP downlink retransmission rate exceeds its corresponding threshold, the voting flag corresponding to the TCP downlink retransmission rate can be set to 1, where 1 indicates that 1 vote has been cast.
[0153] It should be noted that when determining whether the target value of the current metric exceeds the corresponding threshold, the flow-level path management component can first determine whether the current metric has only one threshold. If only one threshold exists, then it determines whether the target value of the current metric exceeds that threshold.
[0154] Furthermore, if it is determined that the current metric has multiple thresholds, the flow-level path management component can first determine whether the first target value of the current metric exceeds threshold 1. If it exceeds threshold 1, a voting flag is set for the current metric, and the voting flag is 1. Based on this, it continues to determine whether the second target value of the current metric exceeds threshold 2. If it exceeds threshold 2, a voting flag is set for the current metric again, and the voting flag is 2. In other words, if the same evaluation metric is flagged twice, it indicates that two votes have been generated.
[0155] In this embodiment, the first target value and the second target value can be the same or different. Furthermore, the number of windows acquiring the first target value and the number of windows acquiring the second target value can be the same or different; the specific choice is not explicitly limited here and can be selected according to the actual situation.
[0156] As an example, if the first target value of the current metric, WiFi MAC layer uplink retransmission rate, exceeds threshold 1, then the voting flag corresponding to the WiFi MAC layer uplink retransmission rate can be 1. Here, 1 represents one vote cast. Conversely, if the target value of the current metric, WiFi MAC layer uplink retransmission rate, is greater than threshold 2, then the voting flag is set to 2. Here, 2 represents two votes cast.
[0157] Step S06: The flow-level path management component records the voting time of the current metric.
[0158] In some implementations, the flow-level path management component can record the voting time of the current metric after setting the voting flag for the current metric. In other words, the flow-level path management component can record the voting time of the current metric after performing a voting operation. For example, after setting the voting flag for the current metric TCP RTT, the flow-level path management component can record the voting time.
[0159] It should be noted that the flow-level path management component can also store the historical voting time of the current metric. By comparing the current voting time with the historical voting time, the flow-level path management component can more accurately switch networks.
[0160] Step S07: The flow-level path management component determines whether the number of votes with voting marks reaches two.
[0161] As one approach, after recording the voting time, the flow-level path management component can also determine whether the current number of votes has accumulated to two, i.e., whether the current number of votes has reached two votes. These two votes can be for the same evaluation metric, or for two different evaluation metrics, each with its own two votes.
[0162] As an example, if the downlink rate (TCP+UDP) or the WiFi MAC layer uplink retransmission rate meets the threshold 2 corresponding to their respective evaluation indicators, then it is determined that the current vote has accumulated two votes. That is, the vote mark for the downlink rate (TCP+UDP) is 2, or the vote mark for the WiFi MAC layer uplink retransmission rate is 2, then it is determined that the current vote has accumulated two votes.
[0163] As another example, the voting flags for TCP RTT and downlink rate (TCP+UDP) are both set to 1, indicating a total of two votes. Similarly, the voting flags for TCP RTT and TCP downlink retransmission rate are both set to 1, indicating a total of two votes. The voting flags for both TCP RTT and WiFi MAC layer uplink retransmission rate are both set to 1, indicating a total of two votes.
[0164] As can be seen from the above introduction, there can be multiple evaluation metrics for each application / business scenario, and the voting methods can also be different. Therefore, the evaluation metrics and voting methods mentioned above are only examples, and the actual situation shall prevail.
[0165] In other implementations, when the flow-level path management component determines that the current vote count has reached two, it can determine that the network communication quality is "stuttering," and proceed to step S08. Alternatively, if the current vote count has not reached two, it can determine whether each evaluation metric has been traversed, and proceed to step S09.
[0166] It should be noted that when determining whether to perform a network switching operation, different applications (business scenarios) may have the same number of evaluation metrics or different numbers of evaluation metrics. There are no specific restrictions on how to set them up here, and you can choose according to the actual situation.
[0167] In summary, different applications (business scenarios) have different requirements for network channel quality. This application embodiment can configure different evaluation indicators for different applications (business scenarios) and determine whether the current network communication quality is laggy based on these indicators. If laggy, a network switching operation is performed, which can improve the accuracy of network switching to a certain extent.
[0168] Step S08: The flow-level path management component determines that the network is lagging and decides to switch networks.
[0169] As one approach, when the flow-level path management component receives two votes, it can determine that application A has poor network communication quality, i.e., network congestion. In this case, the flow-level path management component decides to switch networks. Based on this, the flow-level path management component can request an alternative network from the channel-level path management component. After obtaining the alternative network, it transmits the alternative network to the policy enforcement component through the flow-level policy management component, so that the policy enforcement component can switch the electronic device's network from Wi-Fi to cellular network.
[0170] Step S09: The flow-level path management component determines whether each evaluation metric has been traversed.
[0171] As one approach, if the current vote count does not reach two votes, the flow-level path management component can determine whether each evaluation metric has been traversed. If it is determined that each evaluation metric in the target data stream has been traversed, the flow-level path management component can obtain the data stream of the next cycle and use the data stream of the next cycle as the target data stream. Based on this, steps S02 to S08 are repeated.
[0172] In addition, if there are evaluation indicators that have not been traversed, the next evaluation indicator is obtained and used as the current indicator to continue to determine whether the target value of the current indicator exceeds the corresponding indicator threshold.
[0173] As an example, Huya's live streaming business has four evaluation metrics: TCP RTT, downlink rate (TCP+UDP), TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate. After iterating through TCP RTT, downlink rate (TCP+UDP), and TCP downlink retransmission rate, the stream-level path management component determines that the WiFi MAC layer uplink retransmission rate has not yet been traversed. At this point, the stream-level path management component can use the WiFi MAC layer uplink retransmission rate as the current metric and then further determine whether the target value of the WiFi MAC layer uplink retransmission rate exceeds the corresponding metric threshold.
[0174] As another example, if the stream-level path management component determines that TCP RTT, downlink rate (TCP+UDP), TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate have all been traversed, it obtains the data stream of the next cycle and uses it as the target data stream, repeating the above network communication quality judgment operation.
[0175] Step S10: The flow-level path management component determines whether the voting flag of the current metric is empty.
[0176] In this embodiment, when the flow-level path management component determines that the target value of the current indicator has not exceeded the corresponding indicator threshold, it can determine whether the voting flag of the current indicator is empty. An empty voting flag means that the current indicator has not been voted on. If the voting flag of the current indicator is empty, it determines whether each evaluation indicator has been traversed, i.e., proceeds to step S09. Alternatively, if the voting flag of the current indicator is not empty, i.e., the current indicator has been voted on, the flow-level path management component determines whether the voting time of the current indicator has exceeded a specified duration, i.e., proceeds to step S11.
[0177] Step S11: The flow-level path management component determines whether the voting time for the current metric has exceeded the specified duration.
[0178] As described above, after each vote, the flow-level path management component can record the voting time for the current metric, and it can also store historical voting times. To ensure the accuracy of network switching, after confirming that a vote has been cast for the current metric, the flow-level path management component can determine whether the voting time for that metric has exceeded a specified duration. This specified duration can be 3 seconds.
[0179] If the voting time for the current metric has exceeded the specified duration, the flow-level path management component can remove the voting flag for the current metric, proceeding to step S12. Alternatively, if the voting time for the current metric has not exceeded the specified duration, the flow-level path management component can determine whether each evaluation metric has been traversed, proceeding to step S09.
[0180] As an example, the flow-level path management component determines that the target value of the current metric TCP RTT has not exceeded the threshold and confirms that the current metric TCP RTT has already been voted on. At this point, the flow-level path management component can determine whether the time elapsed between the previous vote and the current time exceeds 3 seconds. If it does not exceed 3 seconds, proceed to step S09. If it exceeds 3 seconds, the vote marker for the current metric can be removed.
[0181] It should be noted that the specified duration can include multiple periods, and voting flags can be set for different evaluation indicators exceeding the corresponding thresholds within each period. For example, a specified duration of 3 seconds may include 6 periods, each period lasting 500ms.
[0182] Step S12: The flow-level path management component removes the voting flag for the current metric.
[0183] In this embodiment of the application, removing the voting flag of the current indicator can be done by initializing the voting record of the current indicator to zero, that is, the flow-level path management component removes the voting flag previously set for the current indicator.
[0184] As one method, through the voting process described above, the flow-level path management component can obtain the voting results, which can include zero votes, one vote, or two votes. After obtaining the voting results, the flow-level path management component can determine the current network communication quality based on these results. Specifically, when the voting result is zero votes or one vote, the corresponding network communication quality is rated as Good; when the voting result is two votes, the corresponding communication quality is rated as Bad.
[0185] To better understand the voting process, this application provides the following embodiments: Figure 8 The example diagram is shown below. (By...) Figure 8 It can be seen that there are four evaluation indicators for Huya's live streaming business scenario: TCP RTT, downlink rate (TCP+UDP), TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate.
[0186] As one approach, the specified duration can include multiple periods. If different evaluation metrics have voting flags set in different periods within this specified duration, and the number of voting flags exceeds a threshold, then the network communication quality is determined to be Bad (laggy). For example... Figure 8 The 'A' shown is a voting flag generated when the value of TCP RTT exceeds its corresponding threshold value within the first period of the first specified duration. For example... Figure 8 The value of B shown is a voting flag generated when the downlink rate (TCP+UDP) exceeds its corresponding threshold value within the second period of the first specified duration. It can be seen that when the number of voting flags reaches the threshold of two, the network communication quality is determined to be Bad (stuttering).
[0187] As another approach, if only one evaluation metric has a voting flag set within a specified time period, the network's communication quality is determined to be "Good". For example... Figure 8The value C shown represents the voting flag generated when the downlink rate (TCP+UDP) exceeds its corresponding threshold value within the first period of the second specified duration. It is evident that the number of voting flags at this point has not reached the threshold of two, thus determining the network communication quality as Good.
[0188] As another approach, if different evaluation metrics have voting flags set within the same period over a specified time period, and the number of voting flags exceeds a threshold, then the network communication quality is determined to be Bad (laggy). For example... Figure 8 The value of D shown is the voting flag generated when the TCPRTT value exceeds its corresponding threshold value within the first period of the third specified duration. For example... Figure 8 The value E shown represents the voting flag generated when the downlink rate (TCP+UDP) exceeds its corresponding threshold value within the first period of the third specified duration. It is evident that when the number of voting flags reaches the threshold of two, the network communication quality is determined to be Bad (stuttering).
[0189] As another approach, if multiple voting flags are set for the same evaluation metric within the same period over a specified time period, and the number of voting flags exceeds a threshold, then the network communication quality is determined to be Bad (laggy). For example... Figure 8 The value of F shown is the voting flag generated when the WiFi MAC layer uplink retransmission rate exceeds both its corresponding first threshold and its corresponding second threshold within the first period of the fourth specified time. It can be seen that when the number of voting flags reaches the threshold of two, the network communication quality is determined to be Bad (stuttering).
[0190] In other words, if the WiFi MAC layer uplink retransmission rate deteriorates significantly, it can directly cast two votes and determine the network communication quality as Bad (stuttering). Specifically, the flow-level path management component can determine whether the WiFi MAC layer uplink retransmission rate exceeds its corresponding threshold 2. If it does, it determines that the WiFi MAC layer uplink retransmission rate has deteriorated significantly, and at this time, the network communication quality is determined to be Bad (stuttering).
[0191] To ensure a good user experience, when the network communication quality is determined to be Bad (laggy), this embodiment of the application can switch the network of the electronic device from Wi-Fi to cellular network, i.e., perform a network switching operation.
[0192] It should be noted that if only one of the multiple evaluation metrics receives 1 vote or 0 votes within a specified time period, the network communication quality is determined to be "Good". The specified time period can be 3 seconds. For example, if only the TCP downlink retransmission rate receives 1 vote within 3 seconds, the network communication quality is determined to be "Good".
[0193] In summary, the evaluation indicators for voting can fall within different timeframes, such as... Figure 8 As shown in A and B. Additionally, different evaluation indicators for voting can also belong to the same period, such as... Figure 8 D and E in the equation belong to the same period. Furthermore, if the same evaluation metric receives two votes in different periods within a specified time frame, the network communication quality can be determined to be Bad (laggy).
[0194] It should be noted that the vote threshold in this embodiment is configurable; it can be two votes or more. For example, the vote threshold can also be three votes or more. The specific value of the vote threshold is not explicitly limited here and can be selected based on the actual situation.
[0195] In this embodiment of the application, when the flow-level path management component determines that the network communication quality is sluggish, it determines to switch the network, that is, to switch the current network of the electronic device from the Wi-Fi network to the cellular network.
[0196] During network handover, the flow-level path management component can determine if a backup network exists. If no backup network exists, the flow-level path management component can send a request message for a backup path to the channel-level path management component. The backup network can be a cellular network.
[0197] In one approach, after receiving the request message for the backup path, the channel-level path management component begins to search for other available and highest-quality networks besides the currently used primary network, and uses the found network as a backup. After determining the backup network, the channel-level path management component can send a request to the network connection management component to enable the backup network.
[0198] Additionally, upon receiving a request to activate the backup network, the network connectivity management component switches the backup network from a dormant state to a activated state. Based on this, the network connectivity management component can send a message to the channel-level path management component indicating that the backup network has been activated. The channel-level path management component can then send the backup network information to the flow-level path management component.
[0199] In one approach, after acquiring a backup network, the flow-level path management component can transmit the backup network to the policy enforcement component via the flow-level policy management component. The policy enforcement component then switches the electronic device's network from the current network to the backup network. Specifically, this switches the electronic device's network from a Wi-Fi network to a cellular network.
[0200] In other implementations, if the flow level management component determines that a backup network exists, it can instead send its stored backup network directly to the flow and policy enforcement component to switch the network of the electronic device to the backup network without requesting the path to the backup network.
[0201] In other embodiments, when a network switching operation is determined to be performed, embodiments of this application may also output a prompt message to notify the user that the current network has switched from a Wi-Fi network to a cellular network. To better understand the network switching and prompting process, embodiments of this application provide the following... Figures 9a-9c The example diagram is shown below. (By...) Figure 9a It can be seen that multiple applications can be installed on electronic devices, which may include clocks, calendars, photo galleries, browsers, and "Huya" (a Chinese video-sharing platform).
[0202] Optionally, when a user clicks the icon of the "Huya" application, the application will open, and the electronic device's display interface will then be able to... Figure 9a Jump to Figure 9b , Figure 9b The video interface for users' live streams can include controls such as the number of followers, viewership, live stream duration, and emoticons. During this process, the application-level policy management component can instruct the traffic reporting component to begin monitoring the data stream from "Huya". Additionally, while monitoring "Huya", the traffic reporting component can periodically report the monitored data stream to the stream-level path management component.
[0203] After receiving the target data stream related to "Huya" from the traffic reporting component, the flow-level path management component can select the values of multiple evaluation metrics corresponding to "Huya" from the target data stream. Based on these values, the flow-level path management component can comprehensively determine whether to perform a network handover operation. Specifically, if the network communication quality is determined to be sluggish, a network handover operation is performed.
[0204] In addition, to ensure a good user experience after performing the network switching operation, the policy enforcement component can output a notification message after switching the electronic device's network from Wi-Fi to cellular. Specifically, the policy enforcement component can return the result of the successful switching operation to the flow-level path management component, which can then send a request to the service layer to display the notification message. The service layer's view system can then control the electronic device to display the notification message based on this request. Figure 9c The interface shown.
[0205] In other words, after performing a network handover operation, embodiments of this application can output as follows: Figure 9cThe network switching prompt shown informs the user that their electronic device has switched from a wireless network to a cellular network. The prompt information in this embodiment is merely an example; the electronic device may also output prompt information through one or more methods, such as a floating window, vibration, or voice.
[0206] In another embodiment of this application, to ensure the accuracy of network switching, the electronic device can also compare the current network with the backup network when it obtains the path of the backup network. In this embodiment, when the flow-level path management component receives the backup network transmitted by the channel-level path management component, it can determine whether the communication quality of the backup network is better than that of the current network. If it is better, a network switching operation is performed.
[0207] In addition, if the communication quality of the current network is better than that of the backup network, it means that the communication quality of the backup network is worse, and there is no need to switch even if the current network is relatively poor.
[0208] In other implementations, the component performing network switching can also be a traffic-aware component. Specifically, after receiving the target data stream of the target application transmitted by the traffic reporting component, the traffic-aware component can select values of multiple evaluation metrics from the target data stream, and then, based on the values of these multiple evaluation metrics, comprehensively determine whether the communication network of the electronic device is experiencing lag. If it is determined that the network communication quality is lag-prone, the traffic-aware component can instruct the policy execution component to perform a network switching operation.
[0209] It should be noted that if the target application corresponds to multiple business scenarios, then the target data stream is the data corresponding to the currently running business scenario. If the target application corresponds to fewer than multiple business scenarios, then the target data stream can be the data corresponding to the target application itself.
[0210] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0211] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the network switching method described above.
[0212] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the network switching method described in the above embodiment.
[0213] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the network switching methods in the above-described method embodiments.
[0214] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0215] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0216] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0217] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0218] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0219] Any content in the various embodiments of this application, as well as any content in the same embodiment, can be freely combined. Any combination of the above content is within the scope of this application.
[0220] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0221] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can interpret the embodiments of this application without departing from its scope.
Claims
1. A network handover method, characterized in that, include: During the execution of a target application on an electronic device, a target data stream is acquired; wherein, the target data stream is data generated by network communication between the electronic device and a target server, and the target server is a device that provides services for the target application; the target data stream is a data stream corresponding to the target application. Determine multiple evaluation metrics corresponding to the target application and a threshold for each evaluation metric, wherein the evaluation metrics are used to describe network communication quality; The values of the multiple evaluation indicators in the target data stream are statistically analyzed to obtain the target value corresponding to each evaluation indicator; For each of the plurality of evaluation indicators, the target value corresponding to each evaluation indicator is compared with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators; wherein, the first evaluation indicator satisfies the following condition: the target value of the evaluation indicator and the threshold corresponding to the evaluation indicator satisfy the first condition. If the number of the first evaluation indicators exceeds the number threshold, the network of the electronic device is switched from the current network to a backup network; wherein the current network is a Wi-Fi network and the backup network is a cellular network; Specifically, for each of the plurality of evaluation indicators, comparing the target value corresponding to each evaluation indicator with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators includes: Select one evaluation indicator from the plurality of evaluation indicators as the current indicator; Determine whether the target value of the current indicator and the threshold corresponding to the current indicator meet the first condition; If the first condition is met, a voting flag is added to the current indicator; The number of voting marks among the multiple evaluation indicators is counted, and this number is used as the number of the first evaluation indicator; The step of statistically analyzing the values of the multiple evaluation indicators in the target data stream to obtain the target value corresponding to each evaluation indicator includes: One of the multiple evaluation indicators is selected as the target indicator in turn; The value of the target indicator is obtained from data packets in the target data stream; wherein, there are multiple data packets, and the number of values of the target indicator is the same as the number of data packets; Based on multiple values of the target indicator, determine the target value corresponding to the target indicator.
2. The method according to claim 1, characterized in that, The step of determining multiple evaluation metrics corresponding to the target application and the threshold corresponding to each evaluation metric includes: Determine the current business scenario in which the target application is running; Obtain multiple evaluation metrics corresponding to the business scenario and the threshold corresponding to each evaluation metric.
3. The method according to claim 1 or 2, characterized in that, The step of comparing the target value corresponding to each of the plurality of evaluation indicators with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators includes: If it is determined at the first moment that the current indicator among the plurality of evaluation indicators exceeds the corresponding threshold, then the number of the first evaluation indicators within a specified time period is obtained, wherein the specified time period includes at least one detection cycle; wherein the end time of the specified time period is the first moment, and the duration of the specified time period is a specified duration.
4. The method according to claim 3, characterized in that, The number of the first evaluation indicators within the specified time period is the sum of the number of voting marks for the evaluation indicators within the same detection cycle, wherein the evaluation indicator with the added voting mark is the first evaluation indicator.
5. The method according to claim 4, characterized in that, The step of comparing the target value corresponding to each of the plurality of evaluation indicators with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators includes: Perform a current indicator judgment operation, which is used to determine whether the target value of the current indicator and the threshold corresponding to the current indicator meet the first condition; If the first condition is met, then add the voting flag to the current indicator; The number of voting marks among the multiple evaluation indicators is counted, and this number is used as the number of the first evaluation indicator; If the number of the first evaluation indicators does not exceed the quantity threshold, then the next evaluation indicator is selected from the plurality of evaluation indicators as the current indicator, and the current indicator judgment operation is performed again until the judgment operation of the plurality of evaluation indicators is completed.
6. The method according to claim 5, characterized in that, The method further includes: After completing the judgment operation on the multiple evaluation indicators, the data stream of the next detection cycle is obtained, and the data stream of the next detection cycle is used as the target data stream. The values of the multiple evaluation indicators in the target data stream are used to obtain the number of the first evaluation indicators again, and it is determined whether the number of the first evaluation indicators exceeds the quantity threshold.
7. The method according to claim 5, characterized in that, The step of performing the current indicator judgment operation; if the first condition is met, then adding the voting flag to the current indicator, including: If the current indicator is a preset indicator, then obtain the first threshold and the second threshold corresponding to the current indicator; Determine whether the target value of the current indicator exceeds the first threshold. If it exceeds the first threshold, add a voting flag to the current indicator and determine whether the target value of the current indicator exceeds the second threshold. If the target value of the current indicator exceeds the second threshold, a voting flag is added to the current indicator again.
8. The method according to claim 5, characterized in that, If the first condition is met, then adding a voting flag to the current indicator includes: Record the current time when the voting marker was added; The voting flag will be cleared after the specified duration of the current time.
9. The method according to claim 3, characterized in that, The number of the first evaluation indicator within the specified time period is the sum of the number of voting marks of the evaluation indicator within at least two detection cycles, wherein the evaluation indicator with the added voting marks is the first evaluation indicator.
10. The method according to any one of claims 4 to 9, characterized in that, The evaluation metrics differ depending on the target application.
11. The method according to any one of claims 4 to 9, characterized in that, The thresholds for the same evaluation metric differ for different target applications.
12. The method according to claim 2, characterized in that, The business scenarios include live streaming business scenarios, and the evaluation indicators corresponding to the live streaming business scenarios include at least round-trip transmission time, downlink rate, downlink retransmission rate, and uplink retransmission rate.
13. An electronic device, characterized in that, include: One or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, cause the electronic device to perform the following steps: During the execution of the target application on the electronic device, a target data stream is acquired; wherein, the target data stream is data generated by the electronic device communicating with a target server over a network, and the target server is a device that provides services for the target application; the target data stream is a data stream corresponding to the target application. Determine multiple evaluation metrics corresponding to the target application and a threshold for each evaluation metric, wherein the evaluation metrics are used to describe network communication quality; The values of the multiple evaluation indicators in the target data stream are statistically analyzed to obtain the target value corresponding to each evaluation indicator; For each of the plurality of evaluation indicators, the target value corresponding to each evaluation indicator is compared with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators; wherein, the first evaluation indicator satisfies the following condition: the target value of the evaluation indicator and the threshold corresponding to the evaluation indicator satisfy the first condition. If the number of the first evaluation indicators exceeds the number threshold, the network of the electronic device is switched from the current network to a backup network; wherein the current network is a Wi-Fi network and the backup network is a cellular network; Specifically, for each of the plurality of evaluation indicators, comparing the target value corresponding to each evaluation indicator with the threshold corresponding to each evaluation indicator to obtain the number of first evaluation indicators includes: Select one evaluation indicator from the plurality of evaluation indicators as the current indicator; Determine whether the target value of the current indicator and the threshold corresponding to the current indicator meet the first condition; If the first condition is met, a voting flag is added to the current indicator; The number of voting marks among the multiple evaluation indicators is counted, and this number is used as the number of the first evaluation indicator; The step of statistically analyzing the values of the multiple evaluation indicators in the target data stream to obtain the target value corresponding to each evaluation indicator includes: One of the multiple evaluation indicators is selected as the target indicator in turn; The value of the target indicator is obtained from data packets in the target data stream; wherein, there are multiple data packets, and the number of values of the target indicator is the same as the number of data packets; Based on multiple values of the target indicator, determine the target value corresponding to the target indicator.
14. The device according to claim 13, characterized in that, When the computer program is executed by the one or more processors, the electronic device performs the following steps: Determine the current business scenario in which the target application is running; Obtain multiple evaluation metrics corresponding to the business scenario and the threshold corresponding to each evaluation metric.
15. The device according to claim 13 or 14, characterized in that, When the computer program is executed by the one or more processors, the electronic device performs the following steps: If it is determined at the first moment that the current indicator among the plurality of evaluation indicators exceeds the corresponding threshold, then the number of the first evaluation indicators within a specified time period is obtained, wherein the specified time period includes at least one detection cycle; wherein the end time of the specified time period is the first moment, and the duration of the specified time period is a specified duration.
16. The device according to claim 15, characterized in that, The number of the first evaluation indicators within the specified time period is the sum of the number of voting marks for the evaluation indicators within the same detection cycle, wherein the evaluation indicator with the added voting mark is the first evaluation indicator.
17. The device according to claim 16, characterized in that, When the computer program is executed by the one or more processors, the electronic device performs the following steps: Perform a current indicator judgment operation, which is used to determine whether the target value of the current indicator and the threshold corresponding to the current indicator meet the first condition; If the first condition is met, then add the voting flag to the current indicator; The number of voting marks among the multiple evaluation indicators is counted, and this number is used as the number of the first evaluation indicator; If the number of the first evaluation indicators does not exceed the quantity threshold, then the next evaluation indicator is selected from the plurality of evaluation indicators as the current indicator, and the current indicator judgment operation is performed again until the judgment operation of the plurality of evaluation indicators is completed.
18. The device according to claim 17, characterized in that, When the computer program is executed by the one or more processors, the electronic device performs the following steps: After completing the judgment operation on the multiple evaluation indicators, the data stream of the next detection cycle is obtained, and the data stream of the next detection cycle is used as the target data stream. The values of the multiple evaluation indicators in the target data stream are used to obtain the number of the first evaluation indicators again, and it is determined whether the number of the first evaluation indicators exceeds the quantity threshold.
19. The device according to claim 17, characterized in that, When the computer program is executed by the one or more processors, the electronic device performs the following steps: If the current indicator is a preset indicator, then obtain the first threshold and the second threshold corresponding to the current indicator; Determine whether the target value of the current indicator exceeds the first threshold. If it exceeds the first threshold, add a voting flag to the current indicator and determine whether the target value of the current indicator exceeds the second threshold. If the target value of the current indicator exceeds the second threshold, a voting flag is added to the current indicator again.
20. The device according to claim 17, characterized in that, When the computer program is executed by the one or more processors, the electronic device performs the following steps: Record the current time when the voting marker was added; The voting flag will be cleared after the specified duration of the current time.
21. The device according to claim 15, characterized in that, The number of the first evaluation indicator within the specified time period is the sum of the number of voting marks of the evaluation indicator within at least two detection cycles, wherein the evaluation indicator with the added voting marks is the first evaluation indicator.
22. The device according to any one of claims 16 to 21, characterized in that, The evaluation metrics differ depending on the target application.
23. The device according to any one of claims 16 to 21, characterized in that, The thresholds for the same evaluation metric differ for different target applications.
24. The device according to claim 14, characterized in that, The business scenarios include live streaming business scenarios, and the evaluation indicators corresponding to the live streaming business scenarios include at least round-trip transmission time, downlink rate, downlink retransmission rate, and uplink retransmission rate.
25. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the network switching method as described in any one of claims 1-12.
Citation Information
Patent Citations
Networking control method, networking control device, electronic equipment and storage medium
CN112469099A
Network switching method and server
CN112996063A