CN116456405B - Network switching methods and electronic devices - Google Patents

Network switching methods and electronic devices

Info

Publication number
CN116456405B
CN116456405B CN202210019678.9A CN202210019678A CN116456405B CN 116456405 B CN116456405 B CN 116456405B CN 202210019678 A CN202210019678 A CN 202210019678A CN 116456405 B CN116456405 B CN 116456405B
Authority
CN
China
Prior art keywords
evaluation
indicator
target
network
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210019678.9A
Other languages
Chinese (zh)
Other versions
CN116456405A (en
Inventor
李锦波
陈朔
梁恒辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210019678.9A priority Critical patent/CN116456405B/en
Publication of CN116456405A publication Critical patent/CN116456405A/en
Application granted granted Critical
Publication of CN116456405B publication Critical patent/CN116456405B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/0085Hand-off measurements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/00837Determination of triggering parameters for hand-off
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供了一种网络切换方法及电子设备置,该方法包括:在电子设备运行目标应用程序的过程中,获取目标数据流,接着确定目标应用程序对应的多个评估指标以及每个评估指标对应的门限,在此基础上对目标数据流中多个评估指标的值进行统计,得到每个评估指标对应的目标值;针对多个评估指标中的每个评估指标,比较每个评估指标对应的目标值与每个评估指标对应的门限,得到第一评估指标的数量;在第一评估指标的数量超过数量阈值的情况下,将电子设备的网络从当前网络切换至备用网络。本申请可根据应用程序对应的多个评估指标确定出网络切换的时机,进而可以提高网络切换的准确性。

This application provides a network switching method and an electronic device. The method includes: acquiring a target data stream while the electronic device is running a target application; determining multiple evaluation metrics corresponding to the target application and a threshold for each evaluation metric; statistically analyzing the values of the multiple evaluation metrics in the target data stream to obtain a target value for each evaluation metric; comparing the target value for each evaluation metric with the threshold for each evaluation metric to obtain the number of first evaluation metrics; and switching the network of the electronic device from the current network to a backup network when the number of first evaluation metrics exceeds a threshold. This application can determine the timing of network switching based on multiple evaluation metrics corresponding to the application, thereby improving the accuracy of network switching.

Description

Network switching method and electronic equipment
Technical Field
The embodiment of the application relates to the field of terminal equipment, in particular to a network switching method and electronic equipment.
Background
With the development of communication technology, many electronic devices, such as smartphones, are currently supporting communication with Wi-Fi networks and communication with mobile cellular data networks. In general, if a user accesses a Wi-Fi network and opens a mobile cellular network data network, the mobile terminal will default to use the Wi-Fi network for communication. Moreover, under the condition of poor Wi-Fi communication quality, the electronic equipment can switch the network so as to improve the use experience of the user. Therefore, how to improve the accuracy of network handover is a technical problem to be solved.
Disclosure of Invention
In order to solve the technical problems, the application provides a network switching method and electronic equipment. In the method, when the electronic equipment runs different application programs, the time of network switching is determined according to a plurality of evaluation indexes corresponding to the application programs, and the accuracy of network switching is improved.
In a first aspect, an embodiment of the present application provides a network switching method. The method comprises the steps of obtaining a target data stream in the process of running a target application program by electronic equipment, wherein the target data stream is data generated by network communication between the electronic equipment and a target server, the target server is equipment for providing services of the target application program, the electronic equipment determines a plurality of evaluation indexes corresponding to the target application program and a threshold corresponding to each evaluation index, the evaluation indexes are used for describing network communication quality, the electronic equipment counts the values of the plurality of evaluation indexes in the target data stream to obtain a target value corresponding to each evaluation index, the electronic equipment compares the target value corresponding to each evaluation index with the threshold corresponding to each evaluation index in the plurality of evaluation indexes to obtain the number of first evaluation indexes, wherein the first evaluation indexes meet the following conditions that the target value of the evaluation indexes and the threshold corresponding to the evaluation indexes meet a first condition, and the network of the electronic equipment is switched from a current network to a standby network under the condition that the number of the first evaluation indexes exceeds the number threshold. Therefore, the electronic equipment can determine the time of network switching according to a plurality of evaluation indexes corresponding to the application program, so that the accuracy of network switching is improved.
According to the first aspect, determining a plurality of evaluation indexes corresponding to the target application program and a threshold corresponding to each evaluation index comprises determining a service scene of the target application program currently running, and acquiring the plurality of evaluation indexes corresponding to the service scene and the threshold corresponding to each evaluation index. Therefore, the service scenes of the target application program are different, the corresponding switching time is also different, and the accuracy of network switching can be further improved.
By way of example, the target application may include live traffic scenes and view video traffic scenes. Wherein, the evaluation indexes corresponding to the live broadcast service scene and the watching video service scene are different.
According to the first aspect or any implementation manner of the first aspect, for each evaluation index in the plurality of evaluation indexes, comparing a target value corresponding to each evaluation index with a threshold corresponding to each evaluation index to obtain the number of first evaluation indexes, wherein if it is determined at a first time that a current index in the plurality of evaluation indexes exceeds the corresponding threshold, the number of first evaluation indexes in a specified time period is obtained, the specified time period comprises at least one detection period, an ending time point of the specified time period is the first time, and a duration of the specified time period is the specified duration. Therefore, the electronic equipment can realize the switching of the network more accurately and flexibly, and further, the use experience of a user can be improved.
Illustratively, the specified duration may be 3s and the detection period may be 500ms.
According to the first aspect, or any implementation manner of the first aspect, the number of the first evaluation indexes in the specified time period is a sum of the number of voting marks of the evaluation indexes in the same detection period, wherein the evaluation index added with the voting marks is the first evaluation index.
According to the first aspect or any implementation manner of the first aspect, for each evaluation index of the plurality of evaluation indexes, comparing a target value corresponding to each evaluation index with a threshold corresponding to each evaluation index to obtain the number of first evaluation indexes, wherein the method comprises the steps of selecting one evaluation index from the plurality of evaluation indexes as a current index, executing a current index judging operation, judging whether the target value of the current index and the threshold corresponding to the current index meet a first condition, adding voting marks for the current index if the first condition is met, counting the number of voting marks in the plurality of evaluation indexes and taking the number as the number of first evaluation indexes, and selecting the next evaluation index from the plurality of evaluation indexes as the current index if the number of the first evaluation indexes does not exceed a number threshold, and executing the current index judging operation again until the judging operation on the plurality of evaluation indexes is completed. Therefore, the electronic equipment can continuously monitor a plurality of evaluation indexes of the target application program so as to ensure that the network quality can be switched in time when the network quality is a katen.
Illustratively, the number threshold may be 2 tickets and the plurality of evaluation indicators may be 4.
According to the first aspect, or any implementation manner of the first aspect, in a case where the judging operation on the plurality of evaluation indexes is completed, acquiring a data stream of a next detection period, taking the data stream of the next detection period as a target data stream, acquiring again the number of the first evaluation indexes by using values of the plurality of evaluation indexes in the target data stream, and determining whether the number of the first evaluation indexes exceeds a number threshold. In this way, the electronic device can comprehensively determine whether to perform the network switching operation in combination with the values of the evaluation indexes acquired in different periods.
According to the first aspect or any implementation manner of the first aspect, the current index judging operation is executed, if the first condition is met, a voting mark is added to the current index, and the method comprises the steps of acquiring a first threshold and a second threshold corresponding to the current index if the current index is a preset index, determining whether a target value of the current index exceeds the first threshold, adding the voting mark to the current index if the target value exceeds the first threshold, determining whether the target value of the current index exceeds the second threshold, and adding the voting mark to the current index again if the target value of the current index exceeds the second threshold. In this way, the value of the same indicator can be used to cast two tickets in case of severe deterioration, which can also trigger a handover operation of the network.
For example, the preset index may include a downlink rate (tcp+udp), a WiFi MAC layer uplink retransmission rate, and a TCP uplink retransmission rate.
According to the first aspect or any implementation manner of the first aspect, if the first condition is met, adding the voting mark to the current index includes recording a current time of adding the voting mark, and clearing the voting mark after a specified duration of the current time. Therefore, the number of voting marks acquired by the electronic equipment has real-time performance, and the network can be prevented from being switched by mistake.
According to a first aspect, or any implementation manner of the first aspect, the number of the first evaluation indexes in the specified period is a sum of numbers of voting marks of the evaluation indexes in at least two detection periods, wherein the evaluation index to which the voting marks are added is the first evaluation index.
According to the first aspect, or any implementation manner of the first aspect, the target application program is different, and the corresponding evaluation index is different.
The target application may be, for example, a live class application or a browse class application. Wherein, the evaluation indexes corresponding to the live broadcast application program and the browsing application program are different.
According to the first aspect, or any implementation manner of the first aspect, the thresholds of the same evaluation index corresponding to different target application programs are different.
Illustratively, the thresholds of the same evaluation index corresponding to the live class application or the browse class application are different.
According to the first aspect, or any implementation manner of the first aspect, the service scenario includes a live service scenario, and the evaluation index corresponding to the live service scenario includes at least a round trip transmission time, a downlink rate, a downlink retransmission rate and an uplink retransmission rate.
For example, the downlink rate may be a downlink rate (tcp+udp), the downlink retransmission rate may be a TCP downlink retransmission rate, and the uplink retransmission rate may be a WiFi MAC layer uplink retransmission rate.
In a second aspect, an embodiment of the present application provides an electronic device. The electronic equipment comprises one or more processors, a memory, one or more computer programs, a statistics unit, a comparison unit and a first evaluation index, wherein the one or more computer programs are stored in the memory, when the computer programs are executed by the one or more processors, the electronic equipment obtains a target data stream in the process of running a target application program by the electronic equipment, the target data stream is data generated by network communication between the electronic equipment and a target server, the target server is equipment for providing services of the target application program, the evaluation indexes corresponding to the target application program are determined and used for describing network communication quality, the evaluation indexes are used for counting the values of the evaluation indexes in the target data stream to obtain a target value corresponding to each evaluation index, the threshold corresponding to each evaluation index is compared for each evaluation index in the plurality of evaluation indexes, and the number of the first evaluation indexes is obtained, wherein the first evaluation index meets the following conditions that the target value of the evaluation index and the threshold corresponding to the evaluation index meet a first condition, and the threshold corresponding to the evaluation index is met under the condition that the number of the first evaluation index exceeds the current network of the standby network, and the network is switched from the network to the network.
According to a second aspect, the computer program, when executed by one or more processors, causes the electronic device to perform the steps of determining a traffic scenario in which the target application is currently running, and obtaining a plurality of evaluation indicators corresponding to the traffic scenario and a threshold corresponding to each evaluation indicator.
According to a second aspect, or any implementation manner of the second aspect, the computer program, when executed by the one or more processors, causes the electronic device to perform the steps of obtaining a number of first evaluation indexes in a specified time period if it is determined at a first time that a current index of the plurality of evaluation indexes exceeds a corresponding threshold, where the specified time period includes at least one detection period, and where an end time point of the specified time period is the first time, and a duration of the specified time period is the specified duration.
According to a second aspect, or any implementation manner of the second aspect, the number of the first evaluation indexes in the specified period is a sum of numbers of voting marks of the evaluation indexes in the same detection period, wherein the evaluation index to which the voting marks are added is the first evaluation index.
According to a second aspect, or any implementation manner of the second aspect, when the computer program is executed by one or more processors, the electronic device is caused to perform the steps of selecting one evaluation index from a plurality of evaluation indexes as a current index, performing a current index judgment operation, wherein the current index judgment operation is used for judging whether a target value of the current index and a threshold corresponding to the current index meet a first condition, adding a voting mark for the current index if the first condition is met, counting the number of voting marks in the plurality of evaluation indexes, taking the number as the number of the first evaluation indexes, selecting the next evaluation index from the plurality of evaluation indexes as the current index if the number of the first evaluation indexes does not exceed a number threshold, and performing the current index judgment operation again until the judgment operation on the plurality of evaluation indexes is completed.
According to a second aspect, or any implementation manner of the second aspect above, when the computer program is executed by the one or more processors, the electronic device is caused to perform the steps of acquiring a data stream of a next detection period and taking the data stream of the next detection period as a target data stream, acquiring again the number of first evaluation indexes by using values of the plurality of evaluation indexes in the target data stream, and determining whether the number of first evaluation indexes exceeds a number threshold.
According to a second aspect, or any implementation manner of the second aspect, the computer program, when executed by the one or more processors, causes the electronic device to perform the steps of acquiring a first threshold and a second threshold corresponding to the current index if the current index is a preset index, determining whether a target value of the current index exceeds the first threshold, adding a voting mark to the current index if the target value exceeds the first threshold, and determining whether the target value of the current index exceeds the second threshold, and adding the voting mark to the current index again if the target value of the current index exceeds the second threshold.
According to a second aspect, or any implementation manner of the second aspect above, the computer program, when executed by the one or more processors, causes the electronic device to perform the steps of recording a current time at which the voting mark is added, and clearing the voting mark after a specified duration of the current time.
According to a second aspect, or any implementation manner of the second aspect, the number of the first evaluation indexes in the specified period is a sum of numbers of voting marks of the evaluation indexes in at least two detection periods, wherein the evaluation index to which the voting marks are added is the first evaluation index.
According to a second aspect, or any implementation manner of the second aspect, the target application program is different, and the corresponding evaluation index is different.
According to a second aspect, or any implementation manner of the second aspect, the thresholds of the same evaluation index corresponding to different target applications are different.
According to the second aspect, or any implementation manner of the second aspect, the service scenario includes a live service scenario, and the evaluation index corresponding to the live service scenario includes at least a round trip transmission time, a downlink rate, a downlink retransmission rate and an uplink retransmission rate.
In a third aspect, an embodiment of the present application provides a chip. The chip comprises one or more interface circuits and one or more processors, the interface circuits being for receiving signals from a memory of the electronic device and for sending signals to the processors, the signals comprising computer instructions stored in the memory, which when executed by the processors, cause the electronic device to perform the network switching method of any one of the first aspect and the second aspect.
Any implementation manner of the third aspect and any implementation manner of the third aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation manner of the third aspect may be referred to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, which are not described herein.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium. The computer readable storage medium comprises a computer program, characterized in that the computer program, when run on an electronic device, causes the electronic device to perform the first aspect and any one of the network handover methods of the first aspect.
Any implementation manner of the fourth aspect and any implementation manner of the fourth aspect corresponds to any implementation manner of the first aspect and any implementation manner of the first aspect, respectively. Technical effects corresponding to any implementation manner of the fourth aspect may be referred to the technical effects corresponding to any implementation manner of the first aspect, and are not described herein.
Drawings
Fig. 1 is a schematic diagram of network connection between an electronic device and a cloud terminal according to an embodiment of the present application;
Fig. 2 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 3 is a schematic diagram of another application scenario provided in an embodiment of the present application;
Fig. 4 is a schematic diagram of network switching according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a technical architecture provided in an embodiment of the present application;
fig. 7 is a schematic flow chart of network switching according to an embodiment of the present application;
FIG. 8 is a schematic diagram of index evaluation when the application provided in the embodiment of the present application is tiger teeth;
Fig. 9a to 9c are schematic interface diagrams of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that in embodiments of the present application, "one or more" means one, two or more than two, "and/or" describes an association of associated objects, meaning that three relationships may exist, e.g., A and/or B may mean that A alone exists, while A and B together, B alone exists, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The terms first and second and the like in the description and in the claims of embodiments of the application, are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first target object and the second target object, etc., are used to distinguish between different target objects, and are not used to describe a particular order of target objects.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, a plurality of processing units refers to two or more processing units, and a plurality of systems refers to two or more systems.
In the embodiment of the application, the electronic equipment can establish a network channel between the wireless network card and other electronic equipment, and simultaneously, the electronic equipment can also establish the network channel between the data service network card and other electronic equipment. Wherein the network channel established between the wireless network card and other electronic devices may be referred to as a Wi-Fi network, and the network channel established between the data service network card and other electronic devices may be referred to as a cellular network. In practical applications, different applications (or different classes of applications) have different requirements on the quality of the network channels used.
In addition, the electronic device may be configured with a network acceleration module, where the network acceleration module is configured to perform a network switching operation if a network card is present when the electronic device runs an application program. Specifically, through the network acceleration module, the embodiment of the application can realize the switching between the Wi-Fi network and the cellular network, and refer to fig. 1 in detail. As can be seen from fig. 1, during the running process of the application program in the electronic device, if it is determined that the Wi-Fi network to which the electronic device is currently connected is stuck, the network of the electronic device may be switched from the Wi-Fi network to the cellular network.
Referring to fig. 2, a user uses an application a in a mobile phone to watch video/live broadcast, wherein the application a in the mobile phone establishes network connection with a server a of the application a through a wireless network card in the mobile phone. The data stream a generated between the application a and the server a (e.g., the data stream generated when live) is transmitted through the Wi-Fi network between the wireless network card on the handset and the wireless router. The user uses application B (browsing application) in the mobile phone to chat, and the application B in the mobile phone establishes network connection with a server B of the application B through a wireless network card of the mobile phone. In addition, a data stream B generated between the application B and the server B (for example, a data stream generated when browsing a web site) is transmitted through a Wi-Fi network between a wireless network card on the mobile phone and a wireless router.
In the embodiment of the application, the data sequence transmitted between two electronic devices is recorded as a data stream. In practical applications, the data stream may be a video stream, an audio stream, a download stream, a session stream, etc.
If the user uses the application a in the mobile phone and the application B in the mobile phone in the same location (the distance between the wireless network card and the wireless router is the same) and the same time range (for example, within half an hour), the Wi-Fi communication quality is not greatly different theoretically. However, since data stream a generates a larger amount of data per unit time than data stream B, data stream a has a higher quality requirement for Wi-Fi networks than data stream B. The user uses the application B smoothly, however, a click phenomenon may occur when the user uses the application a, resulting in poor user experience.
In addition, different service scenes of the same application may have different requirements on communication quality due to processing different services. As shown in fig. 3, the application a may include two scenes, which may be a live traffic scene and a video scene, respectively. The data stream generated by the application a in the live service scene may be a live stream A1, and the data stream generated by the application a in the video scene may be a video stream A2. Both live stream A1 and video stream A2 may be transmitted over Wi-Fi networks between the wireless network card and a 2.4GHz wireless router.
If the user uses the application a in the mobile phone to respectively perform live broadcast and video in the same location (the distance between the wireless network card and the wireless router is the same) and the same time range (for example, within half an hour), in theory, the quality difference of the network channel is not large. However, since the live stream A1 generates a larger amount of data per unit time than the video stream A2, the live stream A1 has a higher quality requirement for the network channel than the data stream B. The user may watch the video smoothly using the application a, however, the user may feel that the network rate is too slow when using the application a for live broadcast, resulting in poor user experience.
In summary, it can be known that different applications of the same electronic device have different requirements on the quality of the network channel, and that different traffic scenarios of the same application may also have different requirements on the quality of the network channel. In the case that it is determined that the network channel currently used by a certain application is insufficient to carry the data stream generated by the application, the communication quality can be improved by switching networks.
Referring to fig. 4, in case it is determined that the transmission quality of the data stream a of the application a is poor, the data stream a may be switched from the current Wi-Fi network to other network channels. As shown in fig. 4, the handset may switch data stream a onto a cellular network between the data service network card of the handset and the base station to communicate data stream a with server a over the cellular network.
In the embodiment of the application, the good (good) or bad (bad) of the communication quality of a certain network channel or the good (good) or bad (bad) of the transmission quality of a certain data stream on a certain network channel can be judged by a plurality of parameters. In a specific implementation, conditions may be set, for example, when a preset condition is satisfied, the communication quality is considered to be good (excellent), and when the preset condition is not satisfied, the communication quality is considered to be bad (bad).
It can be known from the above description that the precondition of performing network handover is that the communication quality of the network channel cannot meet the normal communication of the application program, so it is crucial how to determine whether the evaluation index of the current application program (service scenario) meets the handover condition.
Currently, when determining whether to perform a network switching operation, it is mainly performed on the basis of a critical flow, however, in order to ensure data security, most of the data flows interacted between the electronic device and the server are encrypted, such as HTTPS encryption. However, this causes difficulty in judging the communication quality of the network from the point of view of the critical flow when judging whether to perform the network switching operation.
In addition, when the existing electronic device and the server perform data interaction, the transmitted data stream is not limited to a single stream, that is, there is a possibility that multiple streams are transmitted when data transmission is performed, and the existence of multiple data streams makes it impossible to determine the communication quality of the network from the key stream. For example, the transmission between the short video application and the server in the live traffic scenario is a TCP (Transmission Control Protocol ) stream and a UDP (User Datagram Protocol, user datagram protocol) stream, and is interspersed with the transmission of P2P (Peer-to-Peer) streams.
In addition, when determining whether to perform a network switching operation, it may also be implemented by determining a network channel, however, the determination of the communication quality only by the network channel generally uses only parameters of the physical layer or MAC (Medium Access Control) layers. And when judging whether to execute the network switching operation through the channel, different evaluation indexes cannot be adopted for different scenes, namely different scenes cannot be distinguished, and the fact that the requirements of different scenes of the same application program on the communication quality of the network are possibly different can be known through the introduction. For example, the live service scene of the application a has a certain requirement on the rate, while the game scene has a low requirement on the rate, but the live service scene has a high requirement on the time delay and packet loss.
Therefore, the existing network switching judging method cannot accurately judge different application programs and different service scenes, so that the network switching accuracy is low.
In order to solve the above problems, an embodiment of the present application provides a network switching method. In the network switching method, a developer can configure different evaluation indexes and corresponding thresholds thereof for different application programs in advance. In addition, different evaluation indexes and thresholds can be set for different scenes of the same application. Thus, the accuracy of network switching can be improved to a certain extent.
The network switching method in the embodiment of the application can be applied to the electronic equipment. The electronic equipment is suitable for the mobile phone in the scene. In addition, the electronic device may be a tablet computer, a notebook, a wearable device, a notebook, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or the like. The embodiment of the application does not limit the specific type of the electronic equipment.
Fig. 5 shows a schematic structural diagram of the electronic device 100 in the embodiment of the application. It should be understood that the electronic device 100 shown in fig. 5 is only one example of an electronic device, and that the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 5 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. For example, the processor 110 is configured to perform a network handover method in an embodiment of the present application.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 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 conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near field communication (NEAR FIELD communication, NFC), infrared (IR), etc., applied to the electronic device 100.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, an organic light-emitting diode (OLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 causes the electronic device to perform the network switching method of the present application by executing the instructions stored in the internal memory 121, thereby executing various functional applications of the electronic device 100 and executing the instructions of the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
In the embodiment of the present application, the internal memory 121 may further store executable program codes corresponding to the network switching method for implementing the embodiment of the present application, and the processor may implement network switching by running the executable program codes corresponding to the network switching method.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The embodiment of the present application is not particularly limited to a specific structure of an execution subject of a network switching method, as long as processing can be performed with a network switching method provided according to the embodiment of the present application by running a code recorded with a network switching method of the embodiment of the present application. For example, the execution body of the network switching method provided by the embodiment of the application may be a functional module in the electronic device, which can call a program and execute the program, or a processing device, such as a chip, applied to the electronic device.
The electronic equipment in the embodiment of the application can be provided with a plurality of applications, such as a short video application, a browser application, a game, a news application and the like, wherein the short video application can be used for playing videos or carrying out video live broadcast and the like. These applications may establish network connections with other electronic devices (e.g., servers to which the applications correspond) through the resident electronic device.
As an example, an application a is installed in the electronic device, which may be a short video application. In addition, the application A can establish network connection with a server corresponding to the application A through a wireless network card (also called Wi-Fi network card) in the electronic equipment, and can also establish network connection with the server A corresponding to the application A through a data service network card in the electronic equipment. The wireless network card is a device supporting wireless local area network (Wireless Local Area Network, WLAN) surfing, and the data service network card is a device supporting mobile communication technologies such as packet radio service (GENERAL PACKET radio service, GPRS), enhanced data rates for GSM evolution (ENHANCED DATA RATE for GSM Evolution, EDGE), time Division synchronous code Division multiple access (TD-Synchronous Code Division Multiple Access, TD-SCDMA), high-speed Downlink packet access (HIGH SPEED Downlink PACKET ACCESS, HSDPA), wideband code Division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), fifth generation mobile communication technology (5th Generation Mobile Communication Technology,5G) and the like.
Fig. 6 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present application. As can be seen from fig. 6, the technical architecture of the electronic device divides the software into several layers, each of which has a clear role and division of work. The layers communicate with each other through a software interface.
The application layer may include various application programs, such as short video applications, browser applications, as previously described. In addition, the application programs can also include application programs of cameras, gallery, calendar, call, map, navigation, WLAN, bluetooth, music, short message and the like. In addition, the application layer may also be referred to as an application layer.
The service layer may include an environment detection component, a network detection component, a channel-level path management component, an application-level policy management component, a channel and application quality assessment component, a network connection management component.
The environment detection component is used for detecting various events of an upper application, and can detect the opening and the exiting of the application, detect the application currently switched to a foreground, detect the installation and the uninstallation of the application and the like as examples.
The network detection component is configured to detect a state (on or off, etc.) of a Wi-Fi network supported by the electronic device, and may also detect a state of a data service network supported by the electronic device. As an example, a wireless network card 1 of a 2.4GHz band and a wireless network card 2 of a 5.0GHz band are provided in the electronic device. The network detection component can detect whether a wireless network in a 2.4GHz frequency band is in an on or off state or not, and can also detect whether the wireless network in a 5.0GHz frequency band is in an on or off state. The electronic equipment is provided with a data service network card 1 of an operator A and a data service network card 2 of an operator B. The network detection component can detect whether the data service of the operator A is in an on or off state, and can also detect whether the data service of the operator B is in an on or off state.
The channel and application quality assessment component is used to assess the quality of the network channel. By way of example, the channel and application quality assessment component may assess the quality of Wi-Fi networks in the 2.4GHz band, and may also assess the quality of Wi-Fi networks in the 5.0GHz band. The quality of the cellular network of operator a may also be assessed, as well as the quality of the cellular network of operator B.
The network connection management component is configured to initiate a network channel, i.e., transition the network channel from a dormant state to an awake state. Wherein the network channel in the awake state can be directly used.
The channel-level path management component stores paths of a plurality of network channels, and is used for requesting or closing any network channel, so that the state change of any network channel can be perceived, and the quality of any network channel can also be perceived.
The application level policy management component is used to turn on the network acceleration function and enable the monitoring function of the data flow.
The policy layer may include a flow level policy management component, a flow level path management component, and a traffic awareness component.
The flow sensing component can be used for counting the reported data flows, and can also judge the communication quality of each data flow when the data flow transmitted by the flow reporting component is received. The flow level policy management component instructs the policy enforcement component to perform network switching operations. The flow-level path management component is used for updating the selection of network channels according to the policy change of an upper layer, triggering network channel quality detection, dynamically selecting an optimal channel, and also can be used for storing paths of different network channels, and can be used for storing paths of a network channel (for example, a main network channel) and a standby network channel which are currently used by an application. In addition, the flow level path management component can also judge the communication quality of each data stream when receiving the data stream transmitted by the flow level sensing component.
The kernel layer comprises a policy execution component and a traffic reporting component. The traffic reporting component is used for collecting data flow information and reporting the collected data flow information. The policy enforcement component is configured to enforce the switching of network channels.
As another embodiment of the present application, one component in the above embodiment may be split into two or more components, and two or more components located at the same level may be combined into the same component.
By way of example, the stream level policy management component and the stream level path management component of the policy layer may be combined into the same component, and the application level policy management component and the channel level path management component may be combined into the same component. In addition, in the embodiment of the present application, whether the application program currently running on the electronic device meets the condition of network switching may run on the flow-level path management component or on the flow sensing component, and the following embodiment will describe in detail the network switching under what conditions.
In the embodiment of the application, when the electronic equipment is detected to run the target application program, a plurality of evaluation indexes corresponding to the target application program can be acquired, and then, whether to execute network switching operation is comprehensively determined based on the evaluation indexes. Moreover, the application programs running on the electronic equipment are different, and the corresponding evaluation indexes are also different, so that the accuracy of network switching can be improved to a certain extent.
As shown in fig. 7, a network switching method according to an embodiment of the present application may include the following steps S10 to S12.
In step S01, the stream level path management component obtains a target data stream of a target application program.
It should be noted that, obtaining may refer to receiving the target data stream reported by the traffic reporting component. As one way, the traffic reporting component may report the application a related data stream to the flow level path management component once every preset period, where the data stream may be the target data stream. For example, the traffic reporting component may report its collected data streams to the stream level path management component every 500 ms. That is, the target data stream may be a current period data stream.
In the embodiment of the application, when the stream level path management component detects that the electronic equipment runs the target application program, the stream level path management component can acquire the target data stream corresponding to the target application program. In addition, if the target application includes a plurality of business scenarios, a target data stream of the currently running business scenario may be acquired.
In addition, the target data stream may be composed of a plurality of continuous data packets, wherein the plurality of data packets may be data about the target application program collected by the traffic reporting component at different times, that is, the target data stream may be data generated by the electronic device when the electronic device performs network communication with the target server. Wherein each packet can be considered a window. In addition, each data packet may include values of multiple evaluation metrics.
As an example, when a user starts application a or switches application a from the background to the foreground, the application-level policy management component may instruct the traffic reporting component to start listening to application a, i.e. instruct the traffic reporting component to report the data flow of application a to the flow-level path management component. The application A can be any application program in the electronic device capable of networking and using a network.
And S02, selecting values corresponding to a plurality of evaluation indexes from the target data stream by the stream-level path management component, and carrying out window statistics on the value of each evaluation index.
In the embodiment of the application, each application program can store a plurality of corresponding evaluation indexes, and the flow-level path management component can select evaluation values corresponding to the plurality of evaluation indexes from the target data flow after acquiring the target data flow transmitted by the flow reporting component.
An application may correspond to only one business scenario. For example, the navigation travel class application a corresponds to only one business scenario of the search route. In addition, one application program may also correspond to a plurality of business scenarios. For example, the short video class application B corresponds to a live traffic scene and a view video traffic scene.
In order to more accurately realize network switching, the embodiment of the application configures a plurality of evaluation indexes for each application program and each service scene corresponding to each application program. In addition, the application is also provided with a corresponding threshold for each evaluation index. Therefore, the corresponding evaluation index may be different depending on the application. Moreover, the thresholds of the same evaluation index corresponding to different application programs may also be different.
In summary, a certain correspondence may exist among the application program, the service scenario corresponding to the application program, the evaluation index, and the threshold corresponding to the evaluation index. In order to better understand the relationship among the application program, the service scenario, the evaluation index and the threshold corresponding to the evaluation index, the following table 1 is given in the embodiment of the present application.
Wherein, table 1 may be stored in the flow-level path management component, and when detecting that the electronic device runs the target application program, the flow-level path management component may obtain a plurality of evaluation indexes corresponding to the target application program by using the table 1.
As can be seen from table 1, the same application program (service scenario) may correspond to multiple evaluation indexes, and if the application programs are different, the corresponding evaluation indexes may also be different.
As an example, the evaluation index corresponding to the live traffic scenario in the "tiger tooth" application program may be TCP RTT (Round Trip Time), TCP downlink rate, TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate.
As another example, the evaluation index corresponding to the traffic scenario of the browsing website in the "browser" application may be TCP RTT, TCP uplink retransmission rate, TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate.
It is noted that the number of the thresholds corresponding to the same evaluation index may be one or more as shown in table 1. For example, the evaluation index TCP RTT and the threshold of the TCP downlink retransmission rate of the application "tiger tooth" have one, i.e. only threshold 1. As another example, there may be two thresholds corresponding to the evaluation index downlink rate (tcp+udp) and the WiFi MAC layer uplink retransmission rate, that is, there is a threshold 1 and a threshold 2.
It should be noted that, when configuring an evaluation index for each application (service scenario), the embodiment of the present application may select one or more evaluation indexes from the evaluation indexes such as TCP RTT, downlink rate, uplink rate, retransmission rate, etc. The retransmission rate may include a TCP downlink retransmission rate, a TCP uplink retransmission rate, a WiFi MAC layer uplink retransmission rate, and the like.
TABLE 1 evaluation index and threshold for multiple applications, multiple business scenarios
In addition, the rates may include an uplink rate and a downlink rate, and the downlink rate may include a TCP downlink rate, a UDP downlink rate, a tcp+udp downlink rate, and the like. Optionally, delay, packet loss rate, whether there is a response, etc. may be configured as evaluation indexes, and in particular, the application program or the service scenario configures which evaluation indexes are not explicitly limited here, and may be selected according to practical situations.
Table 1 above only lists some applications and evaluation indicators and thresholds for the scenes of the applications, and is only used for example.
As is known from the above description, the target data stream may include a plurality of data packets, each data packet corresponding to a window, and each window may include a plurality of evaluation index values, so as to better implement the evaluation on the application a. After obtaining the multiple evaluation indexes, the flow-level path management component may perform window statistics on multiple values corresponding to each evaluation index to obtain a target value corresponding to each evaluation index.
In the embodiment of the application, the window statistics can be performed on a plurality of values corresponding to the same evaluation index. As an example, the window statistics may be an average of a plurality of evaluation values corresponding to the same evaluation index, and the obtained average is taken as the target value of the evaluation index.
As another example, the window statistics may be obtained by obtaining a maximum value of a plurality of evaluation values corresponding to the same evaluation index, and using the maximum value as the target value of the evaluation index. The specific statistical strategies adopted are not limited explicitly, and can be selected according to actual situations.
As one way, the flow level path management component may perform window statistics only once or may perform window statistics multiple times when window statistics are performed on the evaluation index. Also, the number of windows may be different when performing a plurality of window counting operations.
As one example, window statistics may be performed twice when the evaluation index downstream rate (tcp+udp) is being counted. The first window statistics may be to obtain an average value of 4 windows to obtain a first target value, and the second window statistics may be to obtain an average value of 7 windows to obtain a second target value.
The evaluation indexes corresponding to the live service scene of tiger tooth are known through table 1 and comprise TCP RTT, downlink rate (TCP+UDP), TCP downlink retransmission rate and WiFi MAC layer uplink retransmission rate. The application can record TCP RTT as R, downlink rate as V, TCP downlink retransmission rate as P, wiFi MAC layer uplink retransmission rate as C.
After acquiring multiple evaluation indexes, the flow-level path management component may select 4 data packets closest to the current time from the target data flow to perform window statistics, where the 4 data packets are data packet 1, data packet 2, data packet 3, and data packet 4. In addition, the data packet 1 includes evaluation indexes of R1, V1, P1, and C1, the data packet 2 includes evaluation indexes of R2, V2, P2, and C2, the data packet 3 includes evaluation indexes of R3, V3, P3, and C3, and the data packet 4 includes evaluation indexes of R4, V4, P4, and C4.
The flow level path management component may perform window statistics on each evaluation index in the 4 data packets after the data packets are acquired. For example, an average value of the TCP downlink retransmission rates in the 4 data packets is calculated, and a target value of the TCP downlink retransmission rate is obtained. The specific calculation formula may be (p1+p2+p3+p4)/4, and the statistics of other evaluation indexes are similar to the statistics of the TCP downlink retransmission rate, and will not be described herein.
In addition, when the window statistics are performed on the value of each evaluation index, the same statistical method can be adopted, or different statistical methods can be adopted. For example, the value of each evaluation index is counted as an average value. As another example, the statistics of the values of a portion of the evaluation index may be an average value, another portion may be a maximum/minimum value, or the like.
In summary, by performing window statistics on the values of the plurality of evaluation indexes, a target value corresponding to each evaluation index can be obtained, and then it can be determined whether to perform the network handover operation based on the target values. In addition, after the target value corresponding to each evaluation index is obtained, the flow-level path management component may select one from the plurality of evaluation indexes as the current index, that is, proceed to step S03.
It should be noted that, the value of the evaluation index in the target data stream may be obtained by the flow level path management component from the traffic reporting component. For example, values such as TCP RTT, TCP downlink rate, and TCP downlink retransmission rate. Alternatively, the value of the evaluation index may be obtained by the flow-level path management component from the service layer. For example, the value of the WiFi MAC layer uplink retransmission rate. The evaluation indexes are not specifically limited by which component transmits the flow to the level path management component, and can be selected according to the application program and the actual situation of the scene corresponding to the application program.
In step S03, the stream level path management component selects one from the multiple evaluation indexes as a current index.
In some implementations, the stream level path management component can sequentially select a current metric from the plurality of evaluation metrics in order and then determine whether the current metric satisfies the voting condition. Specifically, the flow level path management component may determine whether the current index exceeds the corresponding threshold, i.e. go to step S04.
Step S04, the flow-level path management component determines whether the target value of the current index exceeds a corresponding threshold.
As one approach, upon acquiring the current indicator, the flow level path management component may determine whether the target value of the current indicator exceeds a threshold. If the threshold is exceeded, the voting mark of the current index is set, and the process advances to step S05. The threshold may be a maximum/minimum value corresponding to the current index.
In addition, upon determining that the current index does not exceed the threshold, the stream level path management component may determine whether the current index has voted, i.e., proceed to step S10.
As an example, if the current index is the TCP downlink retransmission rate, it is determined whether the target value P0 of the TCP downlink retransmission rate is greater than a 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, a voting mark of the current index TCP downlink retransmission rate can be set. The voting mark is used for indicating that the current index TCP downlink retransmission rate exceeds a threshold.
And S05, setting a voting mark of the current index by the stream-level path management component.
In the embodiment of the application, when the target value of the current index exceeds the threshold, the stream-level path management component can set the voting mark of the current index, wherein the setting of the voting mark of the current index can be that the voting mark is set for the current evaluation index.
As an example, if it is determined that the current index TCP downlink retransmission rate exceeds its corresponding threshold, the vote flag corresponding to the TCP downlink retransmission rate may be set to 1, where 1 is used to indicate that 1 vote has been cast.
It should be noted that, when determining whether the target value of the current index exceeds the corresponding threshold, the flow level path management component may first determine whether only one threshold exists in the current index. If there is only one threshold, it is determined whether the target value of the current indicator exceeds the threshold.
In addition, if it is determined that the current index has a plurality of thresholds, the flow level path management component may first determine whether the first target value of the current index exceeds a threshold 1, and if the first target value exceeds the threshold 1, set a voting flag for the current index, where the voting flag is 1. On the basis, whether the second target value of the current index exceeds the threshold 2 is continuously determined, if the second target value exceeds the threshold 2, the voting mark is set for the current index again, and the voting mark at the moment is 2. In other words, if the same evaluation index is marked twice, this indicates that two votes are generated.
In the embodiment of the present application, the first target value and the second target value may be the same or different. In addition, the number of windows for obtaining the first target value and the number of windows for obtaining the second target value may be the same or different, and the selection is not specifically limited, and may be made according to actual situations.
As an example, if the first target value of the current index WiFi MAC layer uplink retransmission rate exceeds the threshold 1, the voting flag corresponding to the WiFi MAC layer uplink retransmission rate may be 1. Wherein 1 is used to indicate that 1 ticket has been cast. In addition, if the target value of the current index WiFi MAC layer uplink retransmission rate is greater than the threshold 2, the ticket mark is set to 2. Wherein 2 is used to indicate that 2 tickets have been cast.
And step S06, the stream level path management component records the voting time of the current index.
In some implementations, the stream level path management component, after placing the vote mark for the current metric, can record the vote time for the current metric. In other words, after performing the voting operation, the stream-level path management component may record the voting time for the current index. For example, the stream level path management component may record the point in time of the vote after setting the vote mark for the current index TCP RTT.
It should be noted that, the flow level path management component may also store the historical voting time of the current index, and by comparing the current voting time with the historical voting time, the flow level path management component may more accurately implement the switching of the network.
Step S07, the stream level path management component judges whether the votes with the voting marks reach two votes.
As a way, the stream level path management component may also determine whether the current number of votes has accumulated two votes, i.e. whether the current number of votes has reached two votes, after recording the voting time. The two tickets may be the same evaluation index, or different evaluation indexes may be respectively thrown.
As an example, when the downlink rate (tcp+udp) or the WiFi MAC layer uplink retransmission rate meets the threshold 2 corresponding to the respective evaluation index, it is determined that the current vote is accumulated for two votes, i.e., the vote of the downlink rate (tcp+udp) is marked with 2, or the vote of the WiFi MAC layer uplink retransmission rate is marked with 2, it is determined that the current vote is accumulated for two votes.
As another example, the voting flag of TCP RTT is 1, the voting flag of downstream rate (TCP+UDP) is 1, the current voting accumulation of two votes is determined, the voting flag of TCP RTT is 1, the voting flag of TCP downstream retransmission rate is 1, the current voting accumulation of two votes is determined, the voting flag of TCP RTT is 1, the voting flag of WiFi MAC layer upstream retransmission rate is 1, the current voting accumulation of two votes is determined, the voting flag of downstream rate (TCP+UDP) is 1, the voting flag of TCP downstream retransmission rate is 1, the voting flag of WiFi MAC layer upstream retransmission rate is 1, the current voting accumulation of two votes is determined, the voting flag of TCP downstream retransmission rate is 1, the voting flag of WiFi MAC layer upstream retransmission rate is 1, and the current voting accumulation of two votes is determined.
It can be known from the above description that there may be a plurality of evaluation indexes corresponding to each application program/service scenario, and the voting manners may also be different, so the evaluation indexes and the voting manners are merely examples, and the actual situation is specific.
In other embodiments, when determining that the current vote is accumulated for two votes, the flow-level path management component may determine that the communication quality of the network is "stuck", i.e. proceed to step S08. In addition, if the current number of votes does not reach two, it may be determined whether each evaluation index is traversed, that is, step S09 is performed.
It should be noted that, when determining whether to perform the network handover operation, different applications (service scenarios) may correspond to the same number of evaluation indexes, or may correspond to different numbers of evaluation indexes, and how to set the evaluation indexes specifically is not limited explicitly herein, and may be selected according to actual situations.
In summary, the requirements of different applications (traffic scenarios) on the quality of the network channels are different. The embodiment of the application can be configured with different evaluation indexes aiming at different applications (service scenes), and determine whether the communication quality of the current network is stuck or not based on the evaluation indexes, if so, the network switching operation is executed, and the accuracy of the network switching can be improved to a certain extent.
And step S08, the flow-level path management component judges that the network is stuck and determines to switch the network.
As one way, when the stream level path management component obtains the voting result as two votes, it can determine that the network communication quality of the application a is poor, i.e. that the network is stuck, and at this time, the stream level path management component determines to switch networks. On this basis, the flow-level path management component may request the standby network from the channel-level path management component and, after acquiring the standby network, transmit the standby network to the policy enforcement component through the flow-level policy management component, so as to switch the network of the electronic device from the Wi-Fi network to the cellular network through the policy enforcement component.
Step S09, the flow-level path management component determines whether each evaluation index is traversed.
As one approach, upon determining that the current number of votes has not reached two, the flow-level path management component may determine whether each evaluation index completes the traversal. If it is determined that each evaluation index in the target data stream has completed traversal, the stream level path management component may acquire the data stream of the next cycle and take the data stream of the next cycle as the target data stream. On this basis, steps S02 to S08 are repeatedly performed.
In addition, if the evaluation index which is not traversed exists, a next evaluation index is acquired, the next evaluation index is taken as a current index, and whether the target value of the current index exceeds a corresponding index threshold value is continuously determined.
As an example, the live traffic scenario of "tiger tooth" has four evaluation indexes, which are respectively TCP RTT, downlink rate (tcp+udp), TCP downlink retransmission rate, and WiFi MAC layer uplink retransmission rate. After traversing the TCP RTT, the downlink rate (TCP+UDP) and the TCP downlink retransmission rate respectively, the flow-level path management component determines that the uplink retransmission rate of the WiFi MAC layer is not traversed. At this time, the flow level path management component may use the WiFi MAC layer uplink retransmission rate as a current index, and then continuously determine whether the target value of the WiFi MAC layer uplink retransmission rate exceeds a corresponding index threshold.
As another example, if the flow level path management component determines that the TCP RTT, the downstream rate (tcp+udp), the TCP downstream retransmission rate, and the WiFi MAC layer upstream retransmission rate have all completed traversing, the data flow of the next period is acquired and taken as the target data flow, and the above-described network communication quality determination operation is repeatedly performed.
And S10, the stream-level path management component judges whether the voting mark of the current index is empty.
In the embodiment of the application, when the stream level path management component determines that the target value of the current index does not exceed the corresponding index threshold value, the stream level path management component can judge whether the voting mark of the current index is empty. Wherein, the voting mark is empty, which means that the current index has no vote. If the vote mark of the current index is empty, it is determined whether each evaluation index completes the traversal, i.e., step S09 is entered. In addition, if the voting flag of the current index is not null, i.e., the current index has voted, the stream-level path management component determines whether the voting time of the current index has exceeded a specified period of time, i.e., proceeds to step S11.
Step S11, the stream level path management component determines whether the voting time of the current index exceeds a specified duration.
As known from the above description, after each vote, the flow level path management component may record the time of the current index vote, and the flow level path management component may also store the historical vote time. To ensure accuracy of network switching, after determining that the current metric has voted, the flow-level path management component may determine whether the voting time for the metric has exceeded a specified duration. Wherein the specified duration may be 3 seconds.
If the voting time of the current index has exceeded the specified duration, the stream-level path management component may remove the voting mark of the current index, i.e., proceed to step S12. In addition, if the voting time of the current index does not exceed the specified duration, the stream-level path management component may determine whether each evaluation index completes the traversal, i.e., proceed to step S09.
As one example, it is determined by the flow level path management component that the target value of the current index TCP RTT does not exceed the threshold and it is determined that the current index TCP RTT has been voted before. At this time, the flow level path management component may determine whether the duration from the time of the previous vote to the current time exceeds 3 seconds, and if not, proceed to step S09. If 3 seconds are exceeded, the voting mark of the current index may be removed.
It should be noted that the specified duration may include a plurality of periods, and voting marks may be correspondingly set when different evaluation indexes in each period exceed corresponding thresholds. For example, the specified duration is 3s, including 6 cycles, each of which has a duration of 500ms.
And S12, the stream-level path management component removes the voting mark of the current index.
In the embodiment of the application, the voting mark for removing the current index can be the voting mark set before the current index is removed by the stream level path management component by initializing the voting record of the current index to zero.
As one way, through the voting process described above, the stream-level path management component can obtain a voting result that can include a zero vote, a one vote, and two votes. After the voting result is obtained, the stream level path management component can obtain the communication quality of the current network based on the voting result. Specifically, when the voting result is zero or one, the communication quality of the corresponding network is Good, and when the voting result is two, the corresponding communication quality is cartoon (Bad).
An exemplary diagram as shown in fig. 8 is presented for a clearer understanding of the voting process. As can be seen from fig. 8, the number of evaluation indexes corresponding to the live service scenario of tiger tooth may be 4, which are respectively TCP RTT, downlink rate (tcp+udp), TCP downlink retransmission rate and WiFi MAC layer uplink retransmission rate.
As one way, the specified duration may include a plurality of periods in which if different evaluation indexes are provided with voting marks in different periods and the number of voting marks exceeds a number threshold, it is determined that the communication quality of the network is Bad (stuck). A as shown in fig. 8 is a vote mark generated when the value of the TCP RTT in the first period of the first specified duration exceeds its corresponding threshold value. B as shown in fig. 8 is a vote mark generated when the value of the downlink rate (tcp+udp) in the second period of the first specified duration exceeds its corresponding threshold value. It can be seen that the voting mark at this time reaches the number threshold two votes, and the communication quality of the network is determined to be Bad (caton).
Alternatively, if only one evaluation index is set with a voting flag within a specified period of time, it is determined that the communication quality of the network is Good. C as shown in fig. 8 is a vote mark generated when the value of the downlink rate (tcp+udp) in the first period of the second specified duration exceeds its corresponding threshold value. It can be seen that the voting mark at this time does not reach the number threshold for two votes, and the communication quality of the network is determined to be Good.
As another way, if the voting marks are set in the same period for different evaluation indexes within a specified period, and the voting marks exceed the number threshold, it is determined that the communication quality of the network is Bad (cartoon). D as shown in fig. 8 is a vote mark generated when the value of the TCP RTT in the first period of the third specified duration exceeds its corresponding threshold value. E as shown in fig. 8 is a vote mark generated when the value of the downstream rate (tcp+udp) in the first period of the third specified duration exceeds its corresponding threshold value. It can be seen that the voting mark at this time reaches the number threshold two votes, and the communication quality of the network is determined to be Bad (caton).
As another way, if a plurality of voting marks are set in the same period for the same evaluation index within a specified period and the voting marks exceed the number threshold, it is determined that the communication quality of the network is Bad (cartoon). F shown in fig. 8 is a vote mark generated when the value of the WiFi MAC layer uplink retransmission rate in the first period of the fourth specified duration exceeds both its corresponding first threshold and its corresponding second threshold. It can be seen that the voting mark at this time reaches the number threshold two votes, and the communication quality of the network is determined to be Bad (caton).
In other words, if the uplink retransmission rate of the WiFi MAC layer is seriously deteriorated, two tickets may be directly cast, and the network communication quality is determined to be Bad (cartoon). Specifically, the flow level path management component may determine whether the value of the uplink retransmission rate of the WiFi MAC layer exceeds the corresponding threshold 2, if so, determine that the uplink retransmission rate of the WiFi MAC layer is seriously deteriorated, and determine that the communication quality of the network is Bad (cartoon).
In order to ensure the use experience of the user, when the communication quality of the network is determined to be Bad (katon), the embodiment of the application can switch the network of the electronic equipment from the Wi-Fi network to the cellular network, namely, execute the network switching operation.
It should be noted that, if only one of the plurality of evaluation indexes throws 1 ticket or 0 ticket in the specified duration, the communication quality of the network is determined to be Good. Wherein the specified time period may be 3s. For example, only the TCP downlink retransmission rate throws 1 ticket within 3s, and at this time, the communication quality of the network is determined to be Good.
In summary, the evaluation indexes of the votes may belong to different periods, such as a and B shown in fig. 8. Alternatively, the different evaluation indexes of the vote may be in the same period, e.g., D and E in fig. 8 are in the same period. And, if two tickets are thrown to the same evaluation index in different periods within the appointed duration, the communication quality of the network can be determined as Bad (cartoon).
It should be noted that, in the embodiment of the present application, the ticket number threshold is configurable, and may be two tickets or more than two tickets. For example, the ticket threshold may be 3 tickets or more. The number of ticket thresholds is specifically set, and the number of ticket thresholds is not limited explicitly and can be selected according to actual situations.
In the embodiment of the application, when the flow-level path management component determines that the communication quality of the network is a katon, the switching network is determined, namely the current network of the electronic equipment is switched from the Wi-Fi network to the cellular network.
In performing a network switching operation, the flow level path management component may determine whether a standby network is currently present, and if the standby network is not present, the flow level path management component may send a request message for the standby path to the channel level path management component. Wherein the standby network may be a cellular network.
In one manner, after the channel-level path management component receives the request message of the standby path, the channel-level path management component starts to search other available and best-quality networks except the currently used active network, and uses the searched network as a standby network, and after the standby network is determined, the channel-level path management component can send a request for starting the standby network to the network connection management component.
In addition, after receiving the starting request of the standby network, the network connection management component switches the standby network from the dormant state to the wake-up state. On this basis, the network connection management component may send a message to the channel-level path management component that the standby network has been awakened. On this basis, the channel-level path management component may send the standby network to the stream-level path management component.
As one approach, the flow level path management component, upon acquiring the backup network, may transmit the backup network through the flow level policy management component to the policy enforcement component to switch the network of the electronic device from the current network to the backup network through the policy enforcement component. Specifically, the network of the electronic device is handed off from the Wi-Fi network to the cellular network.
In other embodiments, if the flow level management component determines that a standby network currently exists, it may no longer request to acquire a path of the standby network, but instead send its stored standby network directly to the flow and policy enforcement component to switch the network of the electronic device to the standby network.
In other embodiments, when determining to perform a network handover operation, the embodiment of the present application may also output a prompt message to prompt the user that the current network has been handed over from the Wi-Fi network to the cellular network through the prompt message. In order to more clearly understand the network switching and prompting process, an exemplary diagram shown in fig. 9a to 9c is provided in the embodiment of the present application. It can be seen from fig. 9a that a plurality of applications may be installed on the electronic device, and these applications may include a clock, a calendar, a gallery, a browser, and "tiger teeth" etc.
Optionally, when the user clicks the icon of the application "tiger tooth", the user may open the application, and then the display interface of the electronic device may jump from fig. 9a to fig. 9b, where fig. 9b is a video interface of the user live broadcast, and the video interface may include controls such as the number of fans, the number of popularity, the time of live broadcast, and the expression of the user. In this process, the application level policy management component may instruct the traffic reporting component to begin listening to the data stream of "tiger teeth". In addition, the flow reporting component can periodically report the monitored data flow to the flow-level path management component in the process of monitoring the tiger teeth.
After receiving the target data stream related to the tiger tooth transmitted by the flow reporting component, the flow level path management component can select the values of a plurality of evaluation indexes corresponding to the tiger tooth from the target data stream. On this basis, the flow-level path management component may determine whether to perform a network handover operation based on a combination of values of these evaluation metrics. Specifically, if it is determined that the communication quality of the network is stuck, a network switching operation is performed.
In addition, after the network switching operation is performed, the policy execution component can output prompt information after switching the network of the electronic device from the Wi-Fi network to the cellular network in order to ensure the use experience of the user. Specifically, the policy executing component may return the result of successfully executing the switching operation to the flow level path management component, and the flow level path management component may send a display request of the prompt information to the service layer, and the view system of the service layer may control the electronic device to display the interface as shown in fig. 9c based on the request.
In other words, after performing the network handover operation, the embodiment of the present application may output a network handover prompt box as shown in fig. 9c, through which the user is informed that the electronic device has been handed over from the wireless network to the cellular network. The prompt information in the embodiment of the application is only an example, and the electronic equipment can also output the prompt information in one or more modes of floating window, vibration or voice and the like.
In another embodiment of the present application, in order to ensure accuracy of network switching, the electronic device may also compare the current network with the standby network when acquiring the path of the standby network. The flow-level path management component in the embodiment can determine whether the communication quality of the standby network is better than the communication quality of the current network when receiving the standby network transmitted by the channel-level path management component, and if so, execute the network switching operation.
In addition, if the communication quality of the current network is better than that of the standby network, it means that the communication quality of the standby network is worse, and even if the current network is worse, there is no need for handover.
In other embodiments, the component performing the network switch may also be a flow aware component. Specifically, after receiving the target data stream of the target application program transmitted by the flow reporting component, the flow sensing component can select a plurality of evaluation index values from the target data stream, and then comprehensively determine whether the communication network of the electronic device is stuck or not based on the plurality of evaluation index values. If the communication quality of the network is determined to be stuck, the flow awareness component may instruct the policy enforcement component to perform a handover operation of the network.
It should be noted that, if the service scenarios corresponding to the target application program are plural, the target data stream is the data corresponding to the currently running service scenario. If the traffic corresponding to the target application is not plural, the target data stream may be data corresponding to the target application.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The present embodiment also provides a computer storage medium having stored therein computer instructions which, when executed on an electronic device, cause the electronic device to execute the above-described related method steps to implement the network switching method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-mentioned related steps to implement the network handover method in the above-mentioned embodiments.
In addition, the embodiment of the application also provides a device which can be a chip, a component or a module, and the device can comprise a processor and a memory which are connected, wherein the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory so as to enable the chip to execute the network switching method in the method embodiments.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding methods provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Any of the various embodiments of the application, as well as any of the same embodiments, may be freely combined. Any combination of the above is within the scope of the application.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative, and not restrictive, of the present application, without departing from the present application by those of ordinary skill in the art in light of the present application.

Claims (25)

1.一种网络切换方法,其特征在于,包括:1. A network handover method, characterized in that it includes: 在电子设备运行目标应用程序的过程中,获取目标数据流;其中,所述目标数据流是所述电子设备与目标服务器进行网络通信产生的数据,所述目标服务器为提供所述目标应用程序的服务的设备;所述目标数据流为与所述目标应用程序对应的数据流;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. 在所述第一评估指标的数量超过数量阈值的情况下,将所述电子设备的网络从当前网络切换至备用网络;其中,所述当前网络为Wi-Fi网络,所述备用网络为蜂窝网络;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.根据权利要求1所述的方法,其特征在于,所述确定所述目标应用程序对应的多个评估指标以及每个评估指标对应的门限,包括:2. The method according to claim 1, characterized in that, determining the 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.根据权利要求1或2所述的方法,其特征在于,所述针对所述多个评估指标中的每个评估指标,比较每个评估指标对应的目标值与每个评估指标对应的门限,得到第一评估指标的数量,包括:3. The method according to claim 1 or 2, characterized in that, 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: 如果在第一时刻确定所述多个评估指标中的当前指标超出对应的门限,则获取指定时间段内所述第一评估指标的数量,所述指定时间段包括至少一个检测周期;其中,所述指定时间段的结束时间点为所述第一时刻,所述指定时间段的时长为指定时长。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.根据权利要求3所述的方法,其特征在于,所述指定时间段内所述第一评估指标的数量,是同一所述检测周期内所述评估指标的投票标记的数量和,其中,添加所述投票标记的评估指标为所述第一评估指标。4. The method according to claim 3, wherein the number of the first evaluation indicators within the specified time period is the sum of the number of voting marks of the evaluation indicators within the same detection cycle, wherein the evaluation indicator with the added voting mark is the first evaluation indicator. 5.根据权利要求4所述的方法,其特征在于,所述针对所述多个评估指标中的每个评估指标,比较每个评估指标对应的目标值与每个评估指标对应的门限,得到第一评估指标的数量,包括:5. The method according to claim 4, characterized in that, 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: 执行当前指标判断操作,所述当前指标判断操作用于判断所述当前指标的目标值和所述当前指标对应的门限是否符合第一条件;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.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, characterized in that the method further comprises: 在完成对所述多个评估指标的判断操作的情况下,获取下一个检测周期的数据流,并将所述下一个检测周期的数据流作为所述目标数据流,利用所述目标数据流中的多个所述评估指标的值再次获取所述第一评估指标的数量,以及确定所述第一评估指标的数量是否超过数量阈值。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.根据权利要求5所述的方法,其特征在于,所述执行当前指标判断操作;若符合第一条件,则为所述当前指标添加所述投票标记,包括: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, includes: 若所述当前指标为预设指标,则获取所述当前指标对应的第一门限和第二门限;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.根据权利要求5所述的方法,其特征在于,所述若符合第一条件,则为所述当前指标添加投票标记之后,包括:8. The method according to claim 5, characterized in that, after adding a voting flag to the current indicator if the first condition is met, it 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.根据权利要求3所述的方法,其特征在于,所述指定时间段内所述第一评估指标的数量,是至少两个所述检测周期内所述评估指标的投票标记的数量和,其中,添加所述投票标记的评估指标为所述第一评估指标。9. The method according to claim 3, wherein the number of the first evaluation indicators within the specified time period is the sum of the number of voting marks of the evaluation indicators within at least two detection cycles, wherein the evaluation indicator with the added voting marks is the first evaluation indicator. 10.根据权利要求4至9任一所述的方法,其特征在于,所述目标应用程序不同,对应的所述评估指标不同。10. The method according to any one of claims 4 to 9, wherein the evaluation metrics are different for different target applications. 11.根据权利要求4至9任一所述的方法,其特征在于,不同所述目标应用程序对应的同一所述评估指标的门限不同。11. The method according to any one of claims 4 to 9, wherein the threshold of the same evaluation metric is different for different target applications. 12.根据权利要求2所述的方法,其特征在于,所述业务场景包括直播业务场景,所述直播业务场景对应的评估指标至少包括往返传输时间、下行速率、下行重传率和上行重传率。12. The method according to claim 2, wherein the business scenario includes a 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. 13.一种电子设备,其特征在于,包括:13. An electronic device, characterized in that it comprises: 一个或多个处理器;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 by 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. 在所述第一评估指标的数量超过数量阈值的情况下,将所述电子设备的网络从当前网络切换至备用网络;其中,所述当前网络为Wi-Fi网络,所述备用网络为蜂窝网络;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.根据权利要求13所述的设备,其特征在于,当所述计算机程序被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:14. The device according to claim 13, wherein 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.根据权利要求13或14所述的设备,其特征在于,当所述计算机程序被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤: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.根据权利要求15所述的设备,其特征在于,所述指定时间段内所述第一评估指标的数量,是同一所述检测周期内所述评估指标的投票标记的数量和,其中,添加所述投票标记的评估指标为所述第一评估指标。16. The device according to claim 15, wherein the number of the first evaluation indicators within the specified time period is the sum of the number of voting marks of the evaluation indicators within the same detection cycle, wherein the evaluation indicator with the added voting mark is the first evaluation indicator. 17.根据权利要求16所述的设备,其特征在于,当所述计算机程序被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:17. The device according to claim 16, wherein 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.根据权利要求17所述的设备,其特征在于,当所述计算机程序被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:18. The device according to claim 17, wherein 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.根据权利要求17所述的设备,其特征在于,当所述计算机程序被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:19. The device according to claim 17, wherein 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.根据权利要求17所述的设备,其特征在于,所述当所述计算机程序被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:20. The device according to claim 17, wherein 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.根据权利要求15所述的设备,其特征在于,所述指定时间段内所述第一评估指标的数量,是至少两个所述检测周期内所述评估指标的投票标记的数量和,其中,添加所述投票标记的评估指标为所述第一评估指标。21. The device according to claim 15, wherein the number of the first evaluation indicators within the specified time period is the sum of the number of voting marks of the evaluation indicators within at least two detection cycles, wherein the evaluation indicator with the added voting marks is the first evaluation indicator. 22.根据权利要求16至21任一所述的设备,其特征在于,所述目标应用程序不同,对应的所述评估指标不同。22. The device according to any one of claims 16 to 21, wherein the evaluation metrics are different for different target applications. 23.根据权利要求16至21任一所述的设备,其特征在于,不同所述目标应用程序对应的同一所述评估指标的门限不同。23. The device according to any one of claims 16 to 21, wherein the threshold of the same evaluation metric corresponding to different target applications is different. 24.根据权利要求14所述的设备,其特征在于,所述业务场景包括直播业务场景,所述直播业务场景对应的评估指标至少包括往返传输时间、下行速率、下行重传率和上行重传率。24. The device according to claim 14, wherein the business scenario includes a 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. 25.一种计算机可读存储介质,包括计算机程序,其特征在于,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1-12中任意一项所述的网络切换方法。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.
CN202210019678.9A 2022-01-10 2022-01-10 Network switching methods and electronic devices Active CN116456405B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210019678.9A CN116456405B (en) 2022-01-10 2022-01-10 Network switching methods and electronic devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210019678.9A CN116456405B (en) 2022-01-10 2022-01-10 Network switching methods and electronic devices

Publications (2)

Publication Number Publication Date
CN116456405A CN116456405A (en) 2023-07-18
CN116456405B true CN116456405B (en) 2026-04-03

Family

ID=87127797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210019678.9A Active CN116456405B (en) 2022-01-10 2022-01-10 Network switching methods and electronic devices

Country Status (1)

Country Link
CN (1) CN116456405B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112469099A (en) * 2020-11-25 2021-03-09 维沃移动通信有限公司 Networking control method, networking control device, electronic equipment and storage medium
CN112996063A (en) * 2019-12-18 2021-06-18 中国移动通信集团四川有限公司 Network switching method and server

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005076649A1 (en) * 2004-02-10 2005-08-18 Forward Information Technologies Sa Method and system for seamless handover of mobile devices in heterogenous networks
CN110798868B (en) * 2018-08-02 2022-07-29 华为技术有限公司 Network switching method, electronic equipment and chip subsystem

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112996063A (en) * 2019-12-18 2021-06-18 中国移动通信集团四川有限公司 Network switching method and server
CN112469099A (en) * 2020-11-25 2021-03-09 维沃移动通信有限公司 Networking control method, networking control device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116456405A (en) 2023-07-18

Similar Documents

Publication Publication Date Title
CN113795040B (en) Channel switching method, electronic device and storage medium
EP4216501B1 (en) Method for switching channels, electronic device, and storage medium
CN113810938B (en) Channel switching method, electronic device and storage medium
CN116744328B (en) A network acceleration method and device
CN115484649B (en) Channel switching method, electronic device and storage medium
CN116709368B (en) Network acceleration method and device
US12199913B2 (en) Control resource set processing method, device, and computer storage medium
CN116709442A (en) A kind of wireless network switching method and electronic equipment
CN111163226A (en) Volume adjusting method, device and system
CN113890905B (en) Channel switching method, electronic device and storage medium
CN116744329A (en) A network acceleration method and electronic device
CN116456405B (en) Network switching methods and electronic devices
CN117939661A (en) Access control method, device, communication equipment and medium
CN116709369B (en) Network acceleration method and electronic device
CN113810965B (en) Channel switching method, electronic device and storage medium
CN116137722B (en) Network acceleration methods, electronic devices, chip systems, and readable storage media
CN116137730B (en) A network acceleration method, electronic device, chip system and storage medium
CN117915356B (en) A network acceleration method and apparatus
RU2802678C1 (en) Channel switching method, electronic device and storage medium
CN116709367B (en) A network acceleration method and device
HK40068161B (en) Channel switching method, electronic device and storage medium
HK40068161A (en) Channel switching method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Applicant after: Honor Terminal Co.,Ltd.

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Applicant before: Honor Device Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant