Network switching method, device and electronic device
By calculating the network quality score value of the network to be selected and automatically switch to the network with the highest adaptability, the problem of low network utilization and networking efficiency in the prior art is solved, and a higher network utilization and user experience is achieved.
Patent Information
- Application Number
- CN202410352480.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-03-26
AI Technical Summary
In the prior art, it is difficult for mobile terminal devices to effectively improve network utilization and networking efficiency during network switching, resulting in poor user experience.
By determining the difference between the network quality index value of the network to be selected and the target network quality index value of the target application scenario, and calculating the network quality score value based on the index weight value, we can automatically switch to the network with the highest degree of adaptability.
It improves network utilization and networking efficiency and improves user experience.
Smart Images

Figure CN118301697B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of communication technologies, and in particular, to a network switching method, apparatus, and electronic device. Background Art
[0002] Currently, the functions of mobile terminals are becoming more and more diverse. Mobile terminals can run various applications through the network to access service content, thereby meeting user needs. However, a mobile terminal device can only be connected to one network at the same time. Therefore, there are problems such as weak single network signal and small coverage area, and the user experience is poor.
[0003] In the prior art, a mobile terminal device can save connection information of multiple networks at the same time. If the signal strength of the currently connected network is small, the network with the largest signal strength can be determined from the connection information of the multiple networks saved in the mobile terminal, and the mobile terminal device can be connected to this network.
[0004] However, the above method can only reduce the occurrence of network disconnection to a certain extent, and it is difficult to effectively improve network utilization and networking efficiency. Summary of the Invention
[0005] Embodiments of the present application provide a network switching method, apparatus, electronic device, and storage medium to solve the problem of low network utilization and networking efficiency in related technologies.
[0006] In a first aspect, an embodiment of the present application provides a network switching method, which is applied to a vehicle side. The method includes:
[0007] Determine the network quality index difference between the first network quality index values corresponding to the candidate networks and the target network quality index value of the target application scenario;
[0008] Based on the target application scenario, determine the index weight value of the target network quality index value;
[0009] Based on the target network quality index value, the network quality index difference, and the index weight value, determine the first network quality score values corresponding to the multiple candidate networks;
[0010] Based on the first network quality score value, determine the target candidate network from the multiple candidate networks, and switch to the target candidate network.
[0011] Optionally, the target application scenario includes at least one independent application scenario. The determining the index weight value of the target network quality index value based on the target application scenario includes:
[0012] Determine the independent weight value corresponding to the independent application scenario;
[0013] Determine the index weight value of the target network quality index value based on the independent weight value.
[0014] Optionally, the determining the index weight value of the target network quality index value based on the independent weight value includes:
[0015] When the target application scenario includes multiple independent application scenarios, determine the application priorities of the multiple independent application scenarios;
[0016] Based on the application priorities and the independent weight value, determine the index weight value of the target network quality index value.
[0017] Optionally, the method further includes:
[0018] When the target application scenario includes multiple independent application scenarios, determine the second network quality index values and the independent weight values respectively corresponding to the multiple independent application scenarios;
[0019] Based on the independent weight value, perform weighted averaging on the second network quality index values to obtain the target network quality index value.
[0020] Optionally, the determining the first network quality score values respectively corresponding to the multiple candidate networks based on the target network quality index value, the network quality index difference, and the index weight value includes:
[0021] Calculate the ratio of the network quality index difference to the target network quality index value to obtain the network quality index missing ratio of the candidate network;
[0022] Multiply the network quality index missing ratio by the index weight value correspondingly to obtain the index score value of the candidate network;
[0023] Based on the index score value, determine the first network quality score value of the candidate network.
[0024] Optionally, the determining the target candidate network from the multiple candidate networks based on the first network quality score value includes:
[0025] Determine the candidate network corresponding to the maximum value of the first network quality score value as the target candidate network,
[0026] Or, determine the candidate network corresponding to the first network quality score value greater than or equal to the first threshold as the target candidate network.
[0027] Optionally, the method further includes:
[0028] When the first connection state of the current network is normal, perform the step of determining the network quality index differences between the first network quality indexes respectively corresponding to the multiple candidate networks and the target network quality index of the target application scenario;
[0029] When the first connection state is abnormal, perform network switching based on the user identification code type corresponding to the current network.
[0030] Optionally, the performing network switching based on the user identification code type corresponding to the current network includes:
[0031] When the user identification code type corresponding to the current network is the first identification code type and there is a first network corresponding to the first identification code type among the multiple candidate networks, determine the second connection state of the first network;
[0032] When the second connection state is normal, switch to the first network;
[0033] When the user identification code type corresponding to the current network is the first identification code type and there is no first network corresponding to the first identification code type among the multiple candidate networks, determine the third connection state of the second network corresponding to the second identification code type among the multiple candidate networks; wherein, the second identification code type is different from the first identification code type;
[0034] When the third connection state is normal, switch to the second network;
[0035] When the user identification code type corresponding to the current network is the second identification code type and the user identification code corresponding to the current network includes network configuration information, initialize the network connection of the current network based on the network configuration information and reconnect to the current network.
[0036] In a second aspect, an embodiment of the present application provides a software installation device, the device includes:
[0037] A first determination module, configured to determine the network quality index differences between the first network quality index values respectively corresponding to the candidate networks and the target network quality index value of the target application scenario;
[0038] A second determination module, configured to determine the index weight value of the target network quality index value based on the target application scenario;
[0039] A third determination module, configured to determine the first network quality score values respectively corresponding to the multiple candidate networks based on the target network quality index value, the network quality index difference, and the index weight value;
[0040] The first switching module is configured to determine a target candidate network from the multiple candidate networks based on the first network quality score value, and switch to the target candidate network.
[0041] Optionally, the target application scenario includes at least one independent application scenario, and the second determination module includes:
[0042] The first determination sub-module is configured to determine an independent weight value corresponding to the independent application scenario;
[0043] The second determination sub-module is configured to determine an index weight value of the target network quality index value based on the independent weight value.
[0044] Optionally, the second determination sub-module includes:
[0045] The first determination unit is configured to determine the application priorities of the multiple independent application scenarios when the target application scenario includes multiple independent application scenarios;
[0046] The second determination unit is configured to determine an index weight value of the target network quality index value based on the application priorities and the independent weight values.
[0047] Optionally, the apparatus further includes:
[0048] The fourth determination module is configured to determine second network quality index values and independent weight values respectively corresponding to the multiple independent application scenarios when the target application scenario includes multiple independent application scenarios;
[0049] The fifth determination module is configured to perform weighted averaging on the second network quality index values based on the independent weight values to obtain the target network quality index value.
[0050] Optionally, the third determination module includes:
[0051] The first calculation sub-module is configured to calculate a ratio of the network quality index difference to the target network quality index value to obtain a network quality index missing ratio of the candidate network;
[0052] The second calculation sub-module is configured to multiply the network quality index missing ratio by the index weight value correspondingly to obtain an index score value of the candidate network;
[0053] The third determination sub-module is configured to determine a first network quality score value of the candidate network based on the index score value.
[0054] Optionally, the third determination module includes:
[0055] A fourth determination sub-module, configured to determine the candidate network corresponding to the maximum value of the first network quality score as the target candidate network,
[0056] or, determine the candidate network corresponding to the first network quality score greater than or equal to the first threshold as the target candidate network.
[0057] Optionally, the apparatus further includes:
[0058] An execution module, configured to execute the step of determining the network quality index difference between the first network quality indexes corresponding to the multiple candidate networks and the target network quality index of the target application scenario when the first connection state of the current network is normal;
[0059] A second switching module, configured to perform network switching based on the user identification code type corresponding to the current network when the first connection state is abnormal.
[0060] Optionally, the second switching module includes:
[0061] A fifth determination sub-module, configured to determine the second connection state of the first network when the user identification code type corresponding to the current network is the first identification code type and there is a first network corresponding to the first identification code type among the multiple candidate networks;
[0062] A first switching sub-module, configured to switch to the first network when the second connection state is normal;
[0063] A sixth determination sub-module, configured to determine the third connection state of the second network corresponding to the second identification code type among the multiple candidate networks when the user identification code type corresponding to the current network is the first identification code type and there is no first network corresponding to the first identification code type among the multiple candidate networks; wherein, the second identification code type is different from the first identification code type;
[0064] A second switching sub-module, configured to switch to the second network when the third connection state is normal;
[0065] An initialization sub-module, configured to initialize the network connection of the current network based on the network configuration information and reconnect to the current network when the user identification code type corresponding to the current network is the second identification code type and the user identification code corresponding to the current network includes network configuration information.
[0066] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor, wherein the processor is configured to execute the instructions to implement the network switching method described in any one of the above.
[0067] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the network switching method described in any one of the above.
[0068] In an embodiment of the present application, it includes: determining the network quality index difference between the first network quality index values corresponding to the candidate networks and the target network quality index value of the target application scenario, determining the index weight value of the network quality index difference based on the target application scenario, determining the first network quality score values corresponding to the multiple candidate networks based on the target network quality index value, the network quality index difference, and the index weight value, and determining the target candidate network from the multiple candidate networks based on the first network quality score value and switching to the target candidate network. The first network quality score value of the candidate network can be calculated according to the network quality index value of the candidate network and the target network quality index of the target application scenario, and the target candidate network is screened out from the candidate networks according to the first network quality score value and switched to the target candidate network, which can automatically switch to the network with the highest adaptability to the target application scenario, and to a certain extent improves the network utilization rate and networking efficiency.
[0069] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically described below. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0071] Figure 1 is a flowchart of the steps of a network switching method provided by an embodiment of the present application;
[0072] Figure 2 is a flowchart of the steps of another network switching method provided by an embodiment of the present application;
[0073] Figure 3 is a schematic diagram of the process of automatically switching networks provided by an embodiment of the present application;
[0074] Figure 4 It is a flowchart of a specific implementation manner of a network switching method provided by an embodiment of the present application;
[0075] Figure 5 It is a logic block diagram of a software installation device provided by an embodiment of the present application;
[0076] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present application. Specific implementation manner
[0077] Hereinafter, exemplary embodiments of the present application will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present application can be more thoroughly understood and the scope of the present application can be completely conveyed to those skilled in the art.
[0078] Refer to Figure 1 , Figure 1 It is a step flowchart of a network switching method provided by an embodiment of the present application, which is applied to a target device. The method includes:
[0079] Step 101, determine the network quality index difference between the first network quality index value corresponding to each candidate network and the target network quality index value of the target application scenario.
[0080] In the embodiments of the present application, the candidate networks may be WIFI, mobile networks, etc. Among them, the mobile network may include multiple operator networks, and the above networks can be used through an Embedded-SIM (eSIM). The target device may be a device with Internet access function and capable of storing the connected network information, such as intelligent devices like mobile phones, computers, tablets, in-vehicle devices, etc. The target device can start and use multiple independent applications simultaneously. Among them, different applications have different requirements for network quality. For example, an online video playback application requires a relatively high network bandwidth, a map navigation application requires a relatively low network latency, and a real-time voice call application requires a relatively low network latency and a relatively low packet loss rate. One or more independent application programs started simultaneously on the target device can jointly constitute the target application scenario. Since each independent application program has network quality requirements, therefore, the target application scenario can also have network quality requirements, and the network quality can be evaluated by network quality indicators. Therefore, the network quality requirement of the target application scenario is the target network quality indicator value. Among them, the network quality indicators may include, but are not limited to, network latency, network bandwidth, packet loss rate, signal strength, etc. On this basis, the first network quality indicator values corresponding to the candidate networks can be determined according to one or more of the above network quality indicators, and then the first network quality indicator values can be subtracted from the target network quality indicator values correspondingly, so that the network quality indicator difference between the first network quality indicator values and the target network quality indicator values can be determined. Among them, the network quality indicator difference can be the difference between two network quality indicator values corresponding to the network indicators of the relative type.
[0081] For example, if the first network quality indicator values of the candidate network are signal strength 60, network latency 40 ms, packet loss rate 20%, and bandwidth 200 Mbps, and the target network quality indicator values are signal strength 50, network latency 10 ms, packet loss rate 15%, and bandwidth 150 Mbps, then the network quality indicator difference is signal strength 10, network latency 30 ms, packet loss rate 5%, and bandwidth 50 Mbps.
[0082] Step 102, determine the index weight value of the target network quality indicator value based on the target application scenario.
[0083] In the embodiments of the present application, for a target application scenario, the weights between its corresponding target network quality indicators are usually different. And application scenarios can usually be in one-to-one correspondence with weight values. For example, the weight values of the network indicators required for online video playback applications may be different from those required for real-time voice call applications. Therefore, the indicator weight value corresponding to the target application scenario can also correspond to the target application scenario. On this basis, the indicator weight value corresponding to the target application scenario can be determined according to the weight values of the independent application scenarios included in the target application scenario, that is, the indicator weight value of the target network quality indicator value. For example, the arithmetic mean of the weight values of the independent application scenarios included in the target application scenario can be taken as the indicator weight value corresponding to the target application scenario, or the weight values of the independent application scenarios can be calculated according to the order of activation of the independent application scenarios and a preset weight distribution method to obtain the indicator weight value corresponding to the target application scenario.
[0084] Step 103: Based on the target network quality indicator value, the network quality indicator difference, and the indicator weight value, determine the first network quality score values corresponding to the multiple candidate networks respectively.
[0085] In the embodiments of the present application, since different network quality indicators correspond to different dimensions, therefore, the ratio between the network quality indicator difference and the target network quality indicator value can be calculated to obtain the dimension-normalized relative quality indicator difference, and then weighted summation is performed according to the relative quality indicator difference and the indicator weight value to obtain the first network quality score values corresponding to the multiple candidate networks respectively. When performing weighted summation, the relative quality indicator differences corresponding to all types of network quality indicators can be selected, or the relative quality indicator difference of the network quality indicator corresponding to the maximum value in the indicator weight value can be selected and multiplied by the maximum value of the indicator weight value to obtain the first network quality score value.
[0086] Step 104: Based on the first network quality score value, determine a target candidate network from the multiple candidate networks and switch to the target candidate network.
[0087] In the embodiments of the present application, after obtaining the first network quality score value of the candidate network, a target candidate network can be determined from the multiple candidate networks according to the first network quality score value, and the connection network of the target device can be switched to the target candidate network. For example, the candidate network corresponding to the maximum value of the first network quality score value can be used as the target candidate network, or the candidate network corresponding to the first network quality score value greater than or equal to a first threshold can be used as the target candidate network, and any one of the target candidate networks can be selected for switching when performing network switching.
[0088] In an embodiment of the present application, by determining the network quality index difference between the first network quality index values corresponding to the candidate networks and the target network quality index value of the target application scenario, determining the index weight value of the network quality index difference based on the target application scenario, and determining the first network quality score values corresponding to the multiple candidate networks based on the target network quality index value, the network quality index difference, and the index weight value, and determining the target candidate network from the multiple candidate networks based on the first network quality score value and switching to the target candidate network, the first network quality score value of the candidate network can be calculated according to the network quality index value of the candidate network and the target network quality index of the target application scenario, and the target candidate network can be screened out from the candidate networks according to the first network quality score value and switched to the target candidate network, so that the network can be automatically switched to the network with the highest adaptability to the target application scenario, which improves the network utilization rate and the networking efficiency to a certain extent.
[0089] Refer to Figure 2 , Figure 2 FIG. is a flowchart of steps of another network switching method provided by an embodiment of the present application. The method includes:
[0090] Step 201, when the first connection state of the current network is normal, execute the step of determining the network quality index difference between the first network quality indexes corresponding to the multiple candidate networks and the target network quality index of the target application scenario.
[0091] In an embodiment of the present application, the first connection state of the current network can be judged first. If the first connection state is normal, the step of determining the network quality index difference between the first network quality indexes corresponding to the multiple candidate networks and the target network quality index of the target application scenario can be executed to obtain the network quality index difference.
[0092] Step 202, when the first connection state is abnormal, perform network switching based on the user identification code type corresponding to the current network.
[0093] In an embodiment of the present application, if the first connection status of the current network is abnormal, the user identification code type corresponding to the current network can be determined, and network switching can be performed according to the user identification code type. If the user identification code type is the first identification code type, the first alternative network corresponding to the first identification code type can be selected from the alternative networks and switched to the first alternative network, where the first identification code type can be a service code number type, and the service code number is a user number and network number composed of numbers and symbols for implementing communication functions. These code numbers are used to identify specific communication services or users and are indispensable identity identifiers in communication; if the user identification code type is the second identification code type, it can be searched in the target device whether there is an available first alternative network corresponding to the first identification code type. If it exists, switch to the first alternative network. If it does not exist, the service code number corresponding to the first identification code type can be requested from a specified server through the configuration information of the current network, and the current network can be switched to the network corresponding to the service code number according to the service code number to complete network switching.
[0094] Optionally, in step 202, the following sub-steps may be included:
[0095] Sub-step 2021, when the user identification code type corresponding to the current network is the first identification code type and there is a first network corresponding to the first identification code type among the multiple alternative networks, determine the second connection status of the first network.
[0096] In an embodiment of the present application, if the user identification code type corresponding to the current network is the first identification code type, it can be determined whether there is a first network corresponding to the first identification code type among the alternative networks. If it exists, the second connection status of the first network can be determined.
[0097] Sub-step 2022, when the second connection status is normal, switch to the first network.
[0098] In an embodiment of the present application, if the second connection status of the first network is normal, the current network can be switched to the first network.
[0099] Sub-step 2023, when the user identification code type corresponding to the current network is the first identification code type and there is no first network corresponding to the first identification code type among the multiple alternative networks, determine the third connection status of the second network corresponding to the second identification code type among the multiple alternative networks; where the second identification code type is different from the first identification code type.
[0100] In an embodiment of the present application, if the user identification code type corresponding to the current network is the first identification code type, and there is no first network corresponding to the first identification code type in the candidate networks, the third connection state of the second network corresponding to the second identification code type can be determined from the candidate networks. The second identification code type may correspond to the global seed code number type, and communication with a specified server can be performed through the international communication network corresponding to the global seed code number. The second identification code type and the first identification code type may be different.
[0101] In a possible embodiment, if the user identification code type corresponding to the current network is the first identification code type, there is a first network corresponding to the first identification code type in the candidate networks, and the second connection states of the first networks are all abnormal connections, the third connection state of the second network corresponding to the second identification code type can also be determined from the candidate networks.
[0102] Sub-step 2024, when the third connection state is a normal connection, switch to the second network.
[0103] In an embodiment of the present application, if the third connection state of the second network is a normal connection, the current network can be switched to the second network.
[0104] Sub-step 2025, when the user identification code type corresponding to the current network is the second identification code type and the user identification code corresponding to the current network contains network configuration information, initialize the network connection of the current network based on the network configuration information and reconnect to the current network.
[0105] In an embodiment of the present application, if the user identification code type corresponding to the current network is the second identification code type, it can be determined whether the user identification code corresponding to the current network contains network configuration information. If the user identification code contains network configuration information, the network connection of the current network can be initialized according to the network configuration information, and after the initialization is completed, reconnect to the current network.
[0106] In a possible embodiment, as Figure 3 shown Figure 3It is a schematic flowchart of automatically switching networks provided by an embodiment of the present application. In the figure, the target device can automatically switch the current network to the first network corresponding to the first identification code type. Among them, the first identification code type usually corresponds to a service code number, and communication can be directly carried out through the operator network corresponding to the service code number. The target device can also connect to the second network corresponding to the second identification code type. Among them, the second identification code type usually corresponds to a global seed code number, and communication with a specified server can be carried out through the international communication network corresponding to the global seed code number. If the user identification code type corresponding to the current network of the target device is the second identification code type, first determine whether the current network has a configuration file. If there is no configuration file, the configuration file can be downloaded from the specified server and the current network can be initialized. Then, search in the target device to see if there is a first network corresponding to the available first identification code type. If there is a configuration file, search in the target device to see if there is a first network corresponding to the available first identification code type. If there is a first network, switch to the first network. If there is no first network, the service code number of the first identification code type can be requested and sent from the specified server through the configuration information of the current network, and the current network can be switched to the network corresponding to the service code number to complete the network switch.
[0107] In the embodiment of the present application, when the user identification code type corresponding to the current network is the first identification code type and there is a first network corresponding to the first identification code type among multiple candidate networks, determine the second connection status of the first network. When the second connection status is normal, switch to the first network. When the user identification code type corresponding to the current network is the first identification code type and there is no first network corresponding to the first identification code type among multiple candidate networks, determine the third connection status of the second network corresponding to the second identification code type among multiple candidate networks. Among them, the second identification code type is different from the first identification code type. When the third connection status is normal, switch to the second network. When the user identification code type corresponding to the current network is the second identification code type and the user identification code corresponding to the current network contains network configuration information, initialize the network connection of the current network based on the network configuration information and reconnect to the current network. The network switch can be pre-performed according to the user identification code type of the current network, which improves the network utilization rate and networking efficiency of the target device to a certain extent.
[0108] In an embodiment of the present application, when the first connection state of the current network is normal, the step of determining the network quality index differences between the first network quality indexes corresponding to multiple candidate networks and the target network quality index of the target application scenario is executed. When the first connection state is abnormal, network switching is performed based on the user identification code type corresponding to the current network. The network quality index differences can be determined when the first connection state of the current network is normal, and network switching can be performed according to the user identification code type corresponding to the current network when the connection is abnormal, which improves the availability of network communication of the target device to a certain extent.
[0109] Step 203, when the target application scenario includes multiple independent application scenarios, determine the second network quality index values and independent weight values corresponding to the multiple independent application scenarios respectively.
[0110] In an embodiment of the present application, if the target application scenario includes multiple independent application scenarios, since each independent application scenario corresponds to an independent weight value, the second network quality index values and independent weight values corresponding to the multiple independent application scenarios can be determined according to the network quality index type.
[0111] Step 204, perform weighted averaging on the second network quality index values based on the independent weight values to obtain the target network quality index value.
[0112] In an embodiment of the present application, for each independent application scenario, there is a corresponding relationship between the second network quality index value and the independent weight value. Therefore, according to this corresponding relationship, the second network quality index value and the independent weight value can be weighted averaged to obtain the target network quality index value.
[0113] For example, if the target application scenario includes an online video playback application and a map navigation application, where the second network quality index value of the online video playback application is signal strength 60, network latency 40 ms, packet loss rate 20%, and bandwidth 200 Mbps, and the independent weight values are 0.2, 0.2, 0.1, 0.5, and the second network quality index value of the map navigation application is signal strength 50, network latency 10 ms, packet loss rate 10%, and bandwidth 100 Mbps, and the independent weight values are 0.2, 0.5, 0.2, 0.1, then the target network quality index value of the target application scenario is signal strength (60×0.2 + 50×0.2) / (0.2 + 0.2), network latency (40×0.2 + 10×0.5) / (0.2 + 0.5) ms, packet loss rate (0.2×0.1 + 0.1×0.2) / (0.1 + 0.2), and bandwidth (200×0.5 + 100×0.1) / (0.5 + 0.1) Mbps, that is, signal strength 55, network latency 18.6 ms, packet loss rate 13.3%, and bandwidth 183.3 Mbps.
[0114] In an embodiment of the present application, when the target application scenario includes multiple independent application scenarios, by determining the second network quality index values and independent weight values respectively corresponding to the multiple independent application scenarios, and performing weighted averaging on the second network quality index values based on the independent weight values to obtain the target network quality index value, the weighted averaging method can be used to calculate the target network quality index value when the target application scenario includes multiple independent application scenarios, which improves the accuracy and reliability of the target network quality index value to a certain extent.
[0115] Step 205: Determine the network quality index difference between the first network quality index value corresponding to each candidate network and the target network quality index value of the target application scenario.
[0116] In an embodiment of the present application, the implementation content of this step can refer to the embodiment content of step 101 and will not be elaborated here.
[0117] Step 206: Determine the independent weight value corresponding to the independent application scenario.
[0118] In an embodiment of the present application, for an independent application scenario, its corresponding independent weight value can usually be stored at a specified location in the target device database. Therefore, the independent weight value corresponding to the independent application scenario can be determined from the database of the target device according to each specified location.
[0119] Step 207: Based on the independent weight value, determine the index weight value of the target network quality index value.
[0120] In an embodiment of the present application, the arithmetic mean of the weight values of the independent application scenarios included in the target application scenario can be taken as the index weight value corresponding to the target application scenario, or the weight values of the independent application scenarios can be calculated according to the start order of the independent application scenarios and the preset weight distribution method to obtain the index weight value corresponding to the target application scenario.
[0121] Continuing with the above example, if the independent weight values are 0.2, 0.5, 0.2, 0.1 and 0.2, 0.2, 0.1, 0.5, the index weight values can be 0.2, 0.35, 0.15, 0.3. If the weight distribution method for two independent application scenarios is "the weight of the online launched application is 0.6", and the map navigation application is launched before the online video playback application, the index weight values can be 0.2×0.6 + 0.2×0.4, 0.5×0.6 + 0.2×0.4, 0.2×0.6 + 0.1×0.4, 0.1×0.6 + 0.5×0.4, that is, 0.2, 0.38, 0.16, 0.26.
[0122] Optionally, step 207 may include the following sub-steps:
[0123] Sub-step 2071, when the target application scenario includes multiple independent application scenarios, determine the application priorities of the multiple independent application scenarios.
[0124] In the embodiments of the present application, for the target device, each independent application scenario may have an application priority. For example, for an in-vehicle multimedia device, the priority of the map navigation application may be higher than that of the online video playback application. On this basis, if the target application scenario includes multiple independent application scenarios, the priorities of the multiple independent application scenarios can be determined.
[0125] Sub-step 2072, based on the application priority and the independent weight value, determine the index weight value of the target network quality index value.
[0126] In the embodiments of the present application, the application priority may include a first priority and a second priority, and in multiple independent application scenarios, at most one independent application with the first priority can be started simultaneously. Among them, the weight assignment value of the first priority can be set to be greater than or equal to 0.5, and the weight assignment value of the second priority can be set to be less than or equal to 0.5. On this basis, the weight assignment values corresponding to the independent application scenarios can be determined according to the priorities of the independent application scenarios. For example, if the target application scenario includes four independent application scenarios, the weight assignment value of the independent application scenario with the first priority can be 0.5, and the weight assignment values of the independent application scenarios with the second priority can be 0.16, 0.17, 0.17.
[0127] In the embodiments of the present application, by determining the application priorities of multiple independent application scenarios when the target application scenario includes multiple independent application scenarios, and based on the application priority and the independent weight value, determining the index weight value of the target network quality index value, when the target application scenario includes multiple independent application scenarios, the index weight value of the target network quality index value can be determined according to the application priority and the independent weight value of the independent application scenario, which improves the adaptability of the index weight value to the actual network requirements to a certain extent and improves the reliability of the index weight value.
[0128] In the embodiments of the present application, by determining the independent weight value corresponding to the independent application scenario and based on the independent weight value, determining the index weight value of the target network quality index value, the index weight value of the target network quality index value can be calculated according to the independent weight value corresponding to the independent application scenario included in the target application scenario, which improves the accuracy of the index weight value to a certain extent.
[0129] Step 208: Calculate the ratio of the network quality indicator difference to the target network quality indicator value to obtain the network quality indicator missing ratio of the candidate network.
[0130] In an embodiment of the present application, the network quality indicator difference can be divided by the target network indicator value to obtain the ratio of the network quality indicator difference to the target network quality indicator value, and this ratio is used as the network quality indicator missing ratio of the candidate network.
[0131] For example, if the network quality indicator difference is signal strength 10, network latency 30 ms, packet loss rate 5%, and bandwidth 50 Mbps, and the target network quality indicator value is signal strength 50, network latency 10 ms, packet loss rate 15%, and bandwidth 150 Mbps, then the network quality indicator missing ratio is signal strength 20%, network latency 300%, packet loss rate 33.3%, and bandwidth 33.3%.
[0132] Step 209: Multiply the network quality indicator missing ratio by the indicator weight value correspondingly to obtain the indicator score value of the candidate network.
[0133] In an embodiment of the present application, the network quality indicator missing ratio can be multiplied by the indicator weight value of the target network quality indicator correspondingly to obtain the indicator score value of the candidate network.
[0134] Continuing with the above example, if the indicator weight values are 0.2, 0.35, 0.15, 0.3, and the network quality indicator missing ratio is signal strength 20%, network latency 300%, packet loss rate 33.3%, and bandwidth 33.3%, then the indicator score value of the candidate network is 0.04, 1.05, 0.05, 0.1.
[0135] Step 210: Determine the first network quality score value of the candidate network based on the indicator score value.
[0136] In an embodiment of the present application, after obtaining the indicator score value, the values included in the indicator score value can be added up to obtain the first network quality score value of the candidate network; or the average value of the values included in the indicator score value can be calculated to obtain the first network quality score value of the candidate network.
[0137] Continuing with the above example, if the indicator score value is 0.04, 1.05, 0.05, 0.1, then the first network quality score value can be 0.04 + 1.05 + 0.05 + 0.1 = 1.24.
[0138] In an embodiment of the present application, by calculating the ratio of the difference in network quality indicators to the target network quality indicator value, the missing ratio of the network quality indicators of the candidate network is obtained. The missing ratio of the network quality indicators is multiplied by the indicator weight value correspondingly to obtain the indicator score value of the candidate network. Based on the indicator score value, the first network quality score value of the candidate network is determined. The difference in network quality indicators can be dimensionally normalized, and the first network quality score value of the candidate network can be calculated by means of weighted summation, which improves the usability of the first network quality score value.
[0139] Step 211, determine that the candidate network corresponding to the maximum value of the first network quality score value is the target candidate network, or determine that the candidate network corresponding to the first network quality score value greater than or equal to the first threshold is the target candidate network.
[0140] In an embodiment of the present application, the maximum value of the first network quality score value can be screened out from the first network quality score values, and the candidate network corresponding to the maximum value can be used as the target candidate network. Alternatively, the score values greater than the first threshold can be screened out from the first network quality score values, and the candidate networks corresponding to the score values greater than the first threshold can be used as the target candidate networks. After the target candidate network is determined, the target device can be switched to the target candidate network.
[0141] In an embodiment of the present application, by determining that the candidate network corresponding to the maximum value of the first network quality score value is the target candidate network, or determining that the candidate network corresponding to the first network quality score value greater than or equal to the first threshold is the target candidate network, the target device can be switched to the target candidate network with a higher network quality score value, which improves the network utilization rate to a certain extent.
[0142] See Figure 3 , Figure 3A data flow diagram of a network switching method provided by an embodiment of this application. In the figure, the process can start first, and then the connection status of the current network can be judged. If the connection is normal, the target network quality index value and the index weight value of the target application scenario are calculated. If the connection is abnormal, the user identification code type of the current network is judged. If it is the first identification code type, switch to the first network corresponding to the first identification code type in the candidate networks, and calculate the target network quality index value and the index weight value of the target application scenario when the first network is available; if it is the second identification code type, initialize the current network according to the network configuration information included in the user identification code of the current network. After the initialization is completed, reconnect to the current network, and then calculate the target network quality index value and the index weight value of the target application scenario. After obtaining the target network quality index value and the index weight value, the candidate network quality index value of the candidate network can be determined, and then the candidate network quality score value of the candidate network can be determined by combining the target network quality index value and the index weight value. Then, the target candidate network can be determined according to the candidate network quality score value, and switch to the target candidate network. After switching to the target candidate network, the process can end.
[0143] See Figure 4 , this application also provides a logic block diagram of a software installation device. In this embodiment, the device 400 includes:
[0144] The first determination module 401 is used to determine the network quality index difference between the first network quality index value corresponding to the candidate network and the target network quality index value of the target application scenario;
[0145] The second determination module 402 is used to determine the index weight value of the target network quality index value based on the target application scenario;
[0146] The third determination module 403 is used to determine the first network quality score value corresponding to each of the multiple candidate networks based on the target network quality index value, the network quality index difference, and the index weight value;
[0147] The first switching module 404 is used to determine the target candidate network from the multiple candidate networks based on the first network quality score value, and switch to the target candidate network.
[0148] Optionally, the target application scenario includes at least one independent application scenario. The second determination module 402 includes:
[0149] The first determination sub-module is used to determine the independent weight value corresponding to the independent application scenario;
[0150] The second determination sub-module is used to determine the index weight value of the target network quality index value based on the independent weight value.
[0151] Optionally, the second determination sub-module includes:
[0152] A first determination unit, configured to determine the application priorities of the multiple independent application scenarios when the target application scenario includes multiple independent application scenarios;
[0153] A second determination unit, configured to determine the index weight value of the target network quality index value based on the application priority and the independent weight value.
[0154] Optionally, the apparatus 400 further includes:
[0155] A fourth determination module, configured to determine the second network quality index values and independent weight values respectively corresponding to the multiple independent application scenarios when the target application scenario includes multiple independent application scenarios;
[0156] A fifth determination module, configured to perform weighted averaging on the second network quality index values based on the independent weight values to obtain the target network quality index value.
[0157] Optionally, the third determination module 403 includes:
[0158] A first calculation sub-module, configured to calculate the ratio of the network quality index difference to the target network quality index value to obtain the network quality index missing ratio of the candidate network;
[0159] A second calculation sub-module, configured to multiply the network quality index missing ratio by the index weight value correspondingly to obtain the index score value of the candidate network;
[0160] A third determination sub-module, configured to determine the first network quality score value of the candidate network based on the index score value.
[0161] Optionally, the third determination module 403 includes:
[0162] A fourth determination sub-module, configured to determine the candidate network corresponding to the maximum value of the first network quality score value as the target candidate network,
[0163] or, determine the candidate network corresponding to the first network quality score value greater than or equal to the first threshold as the target candidate network.
[0164] Optionally, the apparatus 400 further includes:
[0165] An execution module, configured to execute the step of determining the network quality metric differences between the first network quality metrics respectively corresponding to multiple candidate networks and the target network quality metric of a target application scenario when the first connection state of the current network is normal;
[0166] A second switching module, configured to perform network switching based on the user identification code type corresponding to the current network when the first connection state is abnormal.
[0167] Optionally, the second switching module includes:
[0168] A fifth determination sub-module, configured to determine the second connection state of the first network when the user identification code type corresponding to the current network is a first identification code type and there is a first network corresponding to the first identification code type among the multiple candidate networks;
[0169] A first switching sub-module, configured to switch to the first network when the second connection state is normal;
[0170] A sixth determination sub-module, configured to determine the third connection state of a second network corresponding to a second identification code type among the multiple candidate networks when the user identification code type corresponding to the current network is a first identification code type and there is no first network corresponding to the first identification code type among the multiple candidate networks; wherein, the second identification code type is different from the first identification code type;
[0171] A second switching sub-module, configured to switch to the second network when the third connection state is normal;
[0172] An initialization sub-module, configured to initialize the network connection of the current network based on the network configuration information and reconnect to the current network when the user identification code type corresponding to the current network is a second identification code type and the user identification code corresponding to the current network includes network configuration information.
[0173] In summary, a software installation device provided by an embodiment of the present application includes: a first determination module, configured to determine a network quality index difference between a first network quality index value corresponding to a candidate network and a target network quality index value of a target application scenario; a second determination module, configured to determine an index weight value of the target network quality index value based on the target application scenario; a third determination module, configured to determine a first network quality score value corresponding to each of the multiple candidate networks based on the target network quality index value, the network quality index difference, and the index weight value; a first switching module, configured to determine a target candidate network from the multiple candidate networks based on the first network quality score value, and switch to the target candidate network. It can calculate the first network quality score value of the candidate network according to the network quality index value of the candidate network and the target network quality index of the target application scenario, and screen out the target candidate network from the candidate networks according to the first network quality score value and switch to the target candidate network, which can automatically switch to the network with the highest adaptability to the target application scenario, and improve the network utilization rate and networking efficiency to a certain extent.
[0174] See Figure 5 , Figure 5 is a structural diagram of an electronic device M00 provided by an embodiment of the present application. In the figure, the electronic device M00 includes a processor M01 and a memory M02. A program or instruction that can run on the processor M01 is stored on the memory M02. When the program or instruction is executed by the processor M01, each step of the above-mentioned network switching method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.
[0175] In an embodiment of the present application, the memory M02 can be used to store software programs and various data. The memory M02 mainly includes a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area can store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory M02 can include a volatile memory or a non-volatile memory, or the memory M02 can include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory M02 in the embodiments of the present application includes but is not limited to these and any other suitable types of memories.
[0176] The processor M01 can include one or more processing units; optionally, the processor M01 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor M01.
[0177] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above embodiment of the network switching method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0178] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.
[0179] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above embodiment of the network switching method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0180] It should be understood that the chip involved in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.
[0181] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium. The program product is executed by at least one processor to implement each process of the above embodiment of the network switching method, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0182] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0183] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the related technology, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0184] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. A network switching method, characterized in that: The method comprises: Determine a network quality indicator difference between first network quality indicator values corresponding to a plurality of candidate networks and a target network quality indicator value of a target application scenario, wherein the target application scenario includes a plurality of independent application scenarios; Determining independent weight values corresponding to the independent application scenarios; Determining an index weight value of the target network quality index value based on the independent weight value; Calculating the ratio of the network quality index difference to the target network quality index value to obtain a network quality index missing ratio of each of the candidate networks; Multiply the missing ratio of the network quality indicator by the indicator weight value accordingly to obtain the indicator score value of each of the candidate networks; Based on the indicator score value, determining a first network quality score value of each of the candidate networks; Based on the first network quality score value, a target candidate network is determined from the multiple candidate networks, and switching is performed to the target candidate network.
2. The method according to claim 1, characterized in that The step of determining the index weight value of the target network quality index value based on the independent weight value includes: Determining application priorities of the multiple independent application scenarios; Based on the application priority and the independent weight value, an indicator weight value of the target network quality indicator value is determined.
3. The method according to claim 1, characterized in that The method further comprises: Determine second network quality indicator values and independent weight values corresponding to the multiple independent application scenarios respectively; The second network quality indicator value is weighted averaged based on the independent weight value to obtain the target network quality indicator value.
4. The method according to claim 1, characterized in that: The determining a target candidate network from the multiple candidate networks based on the first network quality score value includes: determining a candidate network corresponding to the maximum value of the first network quality score as a target candidate network, Or, a candidate network corresponding to a first network quality score value greater than or equal to a first threshold is determined as the target candidate network.
5. The method according to claim 1, characterized in that The method further comprises: When the first connection state of the current network is a normal connection, performing the step of determining a network quality indicator difference between the first network quality indicator values corresponding to the plurality of selected networks and the target network quality indicator of the target application scenario; When the first connection state is abnormal connection, network switching is performed based on the user identification code type corresponding to the current network.
6. The method according to claim 5, characterized in that The network switching based on the user identification code type corresponding to the current network includes: When the user identification code type corresponding to the current network is a first identification code type and there is a first network corresponding to the first identification code type among the multiple networks to be selected, determining a second connection state of the first network; When the second connection state is a normal connection, switching to the first network; When the user identification code type corresponding to the current network is a first identification code type and there is no first network corresponding to the first identification code type among the multiple networks to be selected, determining a third connection state of a second network corresponding to a second identification code type among the multiple networks to be selected; wherein the second identification code type is different from the first identification code type; When the third connection state is a normal connection, switching to the second network; When the user identification code type corresponding to the current network is the second identification code type and the user identification code corresponding to the current network includes network configuration information, a network connection of the current network is initialized based on the network configuration information, and the network is reconnected to the current network.
7. A network switching device, characterized in that: The device comprises: A first determination module is used to determine a network quality indicator difference between first network quality indicator values corresponding to a plurality of candidate networks and a target network quality indicator value of a target application scenario, wherein the target application scenario includes a plurality of independent application scenarios; A first determination submodule, used to determine an independent weight value corresponding to the independent application scenario; A second determination submodule, configured to determine an index weight value of the target network quality index value based on the independent weight value; A first calculation submodule is used to calculate the ratio of the network quality index difference value to the target network quality index value to obtain a network quality index missing ratio of each of the candidate networks; A second calculation submodule is used to multiply the network quality indicator missing ratio by the indicator weight value to obtain an indicator score value of each of the candidate networks; A third determination submodule, configured to determine a first network quality score value of each of the candidate networks based on the indicator score value; The first switching module is configured to determine a target candidate network from the plurality of candidate networks based on the first network quality score value, and switch to the target candidate network.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the network switching method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Wireless network switching method and device, equipment, storage medium and product
CN114867075A