Network switching method and device, terminal and storage medium
By monitoring network status and user-defined configuration rules, combined with weighted evaluation model, network switching is carried out intelligently, which solves the problem of inflexible network switching in the existing technology and improves the stability and efficiency of network connections.
Patent Information
- Application Number
- CN202411350853.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-10
AI Technical Summary
The existing technology lacks flexibility during network use, resulting in network switching that is not intelligent enough and cannot make reasonable and stable switching based on specific application scenarios and network environments.
By monitoring the network status, combining user-defined network configuration rules and weighted evaluation models, the target network for switching is determined to ensure that the network switching meets the needs of application scenarios and improves the stability and efficiency of network connections.
It realizes the flexibility and intelligence of network switching, improves user experience, ensures the stability and efficiency of network connections, and reduces the cost of network usage.
Smart Images

Figure CN119109784A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a network switching method, device, terminal and storage medium. Background Art
[0002] At present, in the process of using the network, problems such as freezing and unsmoothness often occur, so it is often necessary to switch the network used. However, in the existing technology, the switch is only performed after a preset standard is reached, which lacks flexibility. Summary of the invention
[0003] In view of this, embodiments of the present application provide a network switching method, device, terminal, and storage medium to achieve reasonable and stable network switching.
[0004] In a first aspect, an embodiment of the present application provides a network switching method, including:
[0005] Monitor the network status of the currently used network;
[0006] Based on the network configuration rules of the current application scenario, determine whether various parameters of the current network state are within the preset threshold range of each rule of the corresponding network configuration rules;
[0007] If not, the target network to be switched is determined based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario.
[0008] In some embodiments, the network status includes at least one parameter of speed, stability, signal strength, and cost;
[0009] Before monitoring the network status of the currently used network, the method further includes:
[0010] Receiving the network configuration rule for each of the application scenarios through a target page;
[0011] Based on the network configuration rules, the network switching conditions for each of the application scenarios are determined; wherein the network switching conditions are determined according to the preset threshold range of the network configuration rules; the network configuration rules include at least one of speed rules, stability rules, signal rules, time rules, cost rules and specific application rules.
[0012] In some embodiments, if the network configuration rule does not include a specific application rule, the network configuration rule based on the current application scenario determines whether each parameter of the current network state is within a preset threshold range of the corresponding network configuration rule, including:
[0013] The network status of the currently used network is monitored according to the corresponding monitoring time strategy, and each parameter of the monitored network status is compared with the preset threshold range in the network configuration rules of the current application scenario to determine whether each parameter of the network status is within the preset threshold range in the network configuration rules of the current application scenario.
[0014] In some embodiments, if the network configuration rule includes a specific application rule, the network configuration rule based on the current application scenario determines whether each parameter of the current network state is within a preset threshold range of the corresponding network configuration rule, including:
[0015] Monitoring the network state of the currently used network according to the corresponding monitoring time strategy, and determining whether various parameters of the current network state are within a preset threshold range of the network configuration rule of the application scenario;
[0016] If so, determining the target specific application currently running in the application scenario;
[0017] The various parameters of the monitored network state are compared with the preset threshold range in the specific application rule corresponding to the target specific application to determine whether the various parameters of the current network state are within the preset threshold range in the current specific application rule.
[0018] In some embodiments, before determining the target network to be switched based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario, the method further includes:
[0019] Obtaining weight values of various parameters of the network state corresponding to each application scenario set by the user through the target page;
[0020] Acquire various parameters of the network status of each network according to the corresponding monitoring time strategy;
[0021] The various parameters of the network status of each network obtained through monitoring are mapped into corresponding scores according to the corresponding preset score mapping rules, and the evaluation result of each network for the current application scenario is determined in combination with the weight values of the various parameters of the network status corresponding to the current application scenario.
[0022] In some embodiments, mapping each parameter of the network state of each network acquired through monitoring to a corresponding score according to a corresponding preset score mapping rule, and combining the weight values of each parameter of the network state corresponding to the current application scenario to determine the evaluation result of each network for the current application scenario includes:
[0023] Mapping each parameter of the network state of each network into a corresponding score according to a corresponding preset score mapping rule;
[0024] Multiplying the score mapped to each parameter corresponding to the network state by the weight value of the corresponding parameter of the network state corresponding to the current application scenario to obtain the product of each parameter;
[0025] The products of the parameters of the same network are added together to obtain the evaluation result of each network for the current application scenario.
[0026] In some embodiments, the method further includes: switching the network used in the current application scenario according to a preset interval time and in combination with the evaluation results of each network in the current application scenario.
[0027] In a second aspect, an embodiment of the present application provides a network switching device, including:
[0028] A monitoring module, used to monitor the network status of the currently used network;
[0029] A judgment module, used to judge whether various parameters of the current network state are within the preset threshold range of each rule of the corresponding network configuration rule based on the network configuration rule of the current application scenario;
[0030] The switching module is used to determine the target network to be switched based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario if no.
[0031] In a third aspect, an embodiment of the present application provides a network switching platform, wherein the network switching system includes a target page, a processor, and a memory;
[0032] The target page is used to input the network configuration rules for each application scenario;
[0033] The memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned network switching method.
[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the above-mentioned network switching method when executed on a processor.
[0035] The embodiments of the present application have the following beneficial effects: the present application allows the user to flexibly set network configuration rules according to their own needs and network environment on the target page of the network switching terminal; this highly customized network configuration not only improves the user experience, but also makes the network switching more in line with the user's actual usage, thereby improving the stability and efficiency of the network connection. In addition, the present application can also monitor the network used in real time or according to a preset monitoring strategy to obtain the network status of each network interface, and perform a comprehensive score through a weighted evaluation model, and then determine the target network to be switched based on the comprehensive score of each network. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A schematic diagram of the structure of a network switching terminal according to an embodiment of the present application is shown;
[0038] Figure 2 A first flow chart of the network switching method according to an embodiment of the present application is shown;
[0039] Figure 3 A second flow chart of the network switching method according to an embodiment of the present application is shown;
[0040] Figure 4 A third flow chart of the network switching method according to an embodiment of the present application is shown;
[0041] Figure 5 A fourth flow chart of the network switching method according to an embodiment of the present application is shown;
[0042] Figure 6 A schematic diagram of the structure of a network switching device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0044] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0045] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0046] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0047] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0048] There are many types of networks that can be used at present, such as local area network, wide area network, wireless network (wifi, Bluetooth, cellular network, Zigbee, etc.), mobile network (2G, 3G, 4G, 5G, etc.), optical network, satellite network, etc. These networks may be configured in the same venue, but when there are multiple networks configured, which network to use or which network to switch to when the currently used network is not applicable. At present, if the currently used network cannot meet the needs of the current application scenario, it is usually directly switched to another network for use, which is not targeted and lacks uniformity.
[0049] Based on this, the present application proposes a network switching method, device, terminal and storage medium to achieve reasonable and stable network switching.
[0050] The following first describes the network switching terminal in an embodiment of the present application.
[0051] Figure 1 A schematic diagram of a network switching terminal according to an embodiment of the present application is shown. Exemplarily, the network switching terminal includes a target page 10, a processor 20, and a memory 30. The memory 30 stores a computer program, and the processor 20 runs the computer program to enable the network switching terminal to execute the network switching method.
[0052] The network switching terminal can be a mobile phone, computer, notebook, iPad, etc. with a visualization page.
[0053] Among them, the target page 10 is a visualization page, which is used to display the setting interface. The user can set the network configuration rules corresponding to each application scenario through the visualization page; among them, the network configuration rules include but are not limited to speed rules, stability rules, signal rules, time rules, cost rules and specific application rules.
[0054] The speed rule is the speed threshold corresponding to the application scenario. Users can set the minimum threshold of the download speed and upload speed of the corresponding application scenario through this visualization page.
[0055] Stability rules include delay and packet loss rate thresholds. Users can set the maximum delay and acceptable maximum packet loss rate for the corresponding application scenario through this visualization page.
[0056] The signal rule refers to the signal strength. Users can set the minimum signal strength threshold for the corresponding application scenario through this visualization page.
[0057] Time rules allow users to set network usage preferences during specific time periods. For example, wired networks are preferred during working hours to ensure a stable connection, while wireless networks are automatically switched to more economical wireless networks at night.
[0058] The cost rule is the cost threshold. Users can set the cost value of each network through this visualization page.
[0059] Specific application rules allow users to set specific network configuration rules for different applications in the current application scenario. For example, in an office scenario, video conferencing applications may require higher bandwidth and stability, while email clients have a higher tolerance for delays. In this case, you can set characteristic rules for video conferencing programs and email programs.
[0060] In addition, in order to visualize the evaluation results of each network in subsequent application scenarios, in this embodiment, the weight value of each network status in each application scenario can also be set through the visualization page, that is, the weight value of speed, stability, signal strength, cost, etc. is set for each application scenario. For example, in the application scenario of smart home, the weight value of speed is 0.4, the weight value of stability is 0.3, the weight value of signal strength is 0.3, and the weight value of cost is 0; in the application scenario of office, the weight value of speed is 0.3, the weight value of stability is 0.3, the weight value of signal strength is 0.3, the weight value of cost is 0.1, etc. It can be understood that the above description of the weight value of each network status parameter is only exemplary, and the weight value of each network parameter in each application scenario can be set according to user needs.
[0061] Furthermore, in order to visualize the evaluation results of each network in each subsequent application scenario, in this embodiment, the target page can also be used to set the values of the scores of each network status parameter corresponding to each application scenario. For example, for the speed parameter, the minimum speed threshold and the maximum speed threshold can be set in a certain application scenario. The minimum speed threshold corresponds to 0 points, and the maximum speed threshold corresponds to 10 points. Then, after monitoring the speed parameters of each network in a certain application scenario, linear interpolation can be performed according to the speed thresholds (minimum and full score thresholds) to calculate the scores corresponding to the monitored speed parameters. For the stability parameter, the score of the maximum delay can be set, and then after monitoring the delay parameters of each network in a certain application scenario, the actual delay is compared with the maximum delay, and the score corresponding to the monitored delay parameter can be calculated through an inverse proportional function or a piecewise function. In addition, the score corresponding to the maximum packet loss rate can be set, and then after monitoring the delay parameters of each network in a certain application scenario, the actual packet loss rate is compared with the maximum packet loss rate, and the score corresponding to the monitored packet loss rate parameter can be calculated through an inverse proportional function or a piecewise function. In addition, the total stability score can be obtained by calculating the delay and packet loss rate scores according to a preset calculation method (such as a weighted sum); similarly, the signal strength can also map the signal strength in each application scenario to a range of 0-10 points in a preset manner (such as it can be set to be 1 when the signal strength is in range A; when the signal strength is in range B, the mapped score is 2... When the signal strength is in range D, the mapped score is 10); for the cost parameter, it can be used according to the cost score configured by the user (such as it can be set to be 2 for WiFi, 8 for cellular, 7 for 5G, etc.). It should be noted that when setting the scores corresponding to the network parameters of each application scenario, the scores are all set within the same score range, such as 0-10 points, or 0-20 points, etc.; in addition, the score calculation method for the above-mentioned network parameters is only exemplary, and the calculation method may not be limited to the above-mentioned method.
[0062] It can be understood that in this embodiment, the network configuration rules for each application scenario can be set through a visualization page, and different weights can be set for each application scenario according to different parameters of the network status, that is, in this embodiment, customized network configuration can be implemented through a visualization page, which is highly flexible and meets the actual network needs of users.
[0063] The memory of the network switching terminal of this embodiment stores a computer program, and the processor is used to execute the following network switching method.
[0064] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.
[0065] The memory may be, but is not limited to, a random access memory (RAM), 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), etc. Among them, the memory is used to store a computer program, and the processor can execute the computer program accordingly after receiving an execution instruction.
[0066] The network switching method is described below in conjunction with some specific embodiments.
[0067] Figure 2 A schematic diagram of a flow chart of a network switching method according to an embodiment of the present application is shown. Exemplarily, the network switching method comprises the following steps:
[0068] Step S100, monitoring the network status of the currently used network.
[0069] In this embodiment, in the current application scenario, the network status of the currently used network is monitored in real time, and the monitored parameters include but are not limited to speed, stability, signal strength, etc.
[0070] Among them, for speed monitoring, you can integrate speedtest-cli or iperf as a bandwidth speed test tool, perform speed test operations regularly according to the configuration, and then record the speed test results, including download speed, upload speed, etc. For stability monitoring, it can be implemented through network monitoring tools such as Wireshark, Nagios, Zabbix, etc.; for signal strength, you can use the iwconfig command to regularly obtain the RSSI value or use the AT command to obtain the signal strength. It can be understood that the above tools and methods for monitoring network status parameters are only exemplary, and any tools and methods that can monitor these parameters can be used.
[0071] Step S200: Based on the network configuration rules of the current application scenario, it is determined whether various parameters of the current network state are within the preset threshold range of each rule of the corresponding network configuration rules.
[0072] The network configuration rules for each application scenario are configured in advance by the user through the visualization page. The network configuration rules include at least one of the speed rules, stability rules, signal rules, time rules and cost rules; the network configuration rules set the minimum threshold for the network required for the application scenario, such as the speed rule, which defines the minimum threshold for the download speed and upload speed of the network required for the application scenario, and the stability rule defines the maximum delay and the maximum acceptable packet loss rate of the network required for the application scenario; the signal rule defines the minimum signal strength threshold for the network required for the application scenario; in addition, the time rule specifies the network that the application scenario needs to use or cannot use within a certain period of time; the cost rule limits the cost of using the network for the application scenario; it should be noted that not all application scenarios need to set all network configuration rules, and they can selectively set one, two... or more of them; of course, the above network configuration rules are only exemplary, and users can set them as needed when they are used in specific situations.
[0073] In step S200, the various parameters of the network status of the network used in the current application scenario monitored in real time or at preset intervals in step S100 are compared with the network configuration rules configured by the user. If the various parameters of the network status currently used in the current application scenario are within the corresponding preset threshold range of the network configuration rules, step S400 is executed to continue using the current network.
[0074] If one or more of the parameters of the network status currently used in the current application scenario are not within the corresponding preset threshold range of the network configuration rule, step S300 is executed to determine the target network for switching based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario.
[0075] It can be understood that if one or more of the parameters of the network status currently used in the current application scenario are not within the corresponding preset threshold range of the network configuration rule, it means that the current network is not suitable for the current application scenario, so the network needs to be switched. Since each application scenario corresponds to a preset weighted evaluation rule, before switching the network, in step S300, each network is evaluated according to the preset weighted evaluation rule corresponding to the current application scenario, and the evaluation result of each network in the current application scenario is calculated, and the target network that can be switched is determined according to the evaluation result.
[0076] In some embodiments, Figure 3 As shown, before step S100, the following steps are also included:
[0077] Step S500: receiving network configuration rules for each application scenario through a target page.
[0078] In a network environment, multiple networks may be set up, such as wifi, cellular data network, wired network, etc. In order to enable each application scenario to realize network switching intelligently and efficiently, users can configure the network configuration rules for each application scenario through the visual configuration page and save the configured network configuration rules in the memory.
[0079] For example, in a smart home system, the user's home is equipped with a variety of network devices, including high-performance Wi-Fi routers, cellular data modules, and a variety of smart home appliances (such as smart TVs, smart speakers, smart cameras, etc.). In order to ensure that smart home devices can be intelligently and efficiently connected to the network that best suits current needs, the user uses the network switching terminal of this embodiment. The user can enter the configuration page of the network switching terminal through a smart phone, or through a computer or iPad. The user can configure the following parameters for the smart home application scenario through the configuration page: In the speed setting, the user defines the minimum threshold of the download speed not less than 5Mbps (the full score threshold is set to 10 points) and the upload speed not less than 2Mbps (the full score threshold is set to 10 points), and the platform scores 0-10 points based on the real-time speed. For signal strength, the user sets the minimum signal strength threshold of the Wi-Fi network to -70dBm (full signal strength is 10 points). In the cost setting, the user configures the cost score of the cellular data module to 8 points (indicating high cost), and the cost score of Wi-Fi is set to 0 points (indicating low cost). In terms of weight distribution, users set the cost to 0.2, speed to 0.3, signal strength to 0.2, and stability (including delay and packet loss rate) to 0.3 according to their needs. If a specific application is included in the smart home application scenario, such as a smart TV, the user can configure the specific application through the target page of the network switching terminal, such as configuring a smart battery with stricter bandwidth (such as a minimum of 8Mbps) and stability (such as a maximum delay of no more than 50ms and a packet loss rate of no more than 1%) requirements. It can be understood that other smart homes can also be set as specific applications, which will not be explained one by one here. In addition, the above configuration instructions for smart home application scenarios are only exemplary, and can be set specifically according to user needs.
[0080] For another example, in a mobile office scenario, users may frequently travel between various mobile office scenarios, such as cafes, airport terminals, and hotel rooms. To ensure an efficient and seamless online work experience, the network switching terminal of this embodiment is configured in the laptop computer. Users can configure the network parameters they need to use through the target page of the network switching terminal. For example, for the speed threshold, the download speed can be set to no less than 8Mbps and the upload speed can be set to no less than 2Mbps to meet the needs of video conferencing, large file transfer, and high-definition video streaming; for delay and packet loss rate, the maximum delay can be set to 50ms and the maximum acceptable packet loss rate can be set to 0.5% to ensure the smoothness of video conferencing and real-time communication; for signal strength, for Wi-Fi networks, the minimum signal strength threshold is set to -65dBm to ensure the stability of wireless connections; for cost thresholds, considering mobile data charges, the mobile network cost can be set to a higher value, giving priority to free or low-cost Wi-Fi networks; for specific application rules, video conferencing software and cloud office platforms (such as Zoom, Teams, Office 365) to set high-priority network usage rules to ensure that these applications obtain the best network resources; for time rules, you can set priority to use the wired network during working hours (such as 9:00-18:00), and automatically switch to available Wi-Fi hotspots or mobile hotspots during non-working hours. It can be understood that the above network configuration rules for this office scenario are only exemplary, and the specific situation is subject to user settings.
[0081] Step S600: determining a network switching condition for each application scenario based on a network configuration rule.
[0082] In this step, the network switching condition is determined according to the preset threshold range of the network configuration rule, that is, if any parameter of the monitored network is not in the network configuration rule set by the user, the network switching is triggered.
[0083] In some implementations, if the network configuration rule does not include a specific application rule, step S200 includes:
[0084] Monitor the network status of the currently used network according to the corresponding monitoring time strategy, and compare the parameters of the monitored network status with the preset threshold range in the network configuration rules of the current application scenario to determine whether the parameters of the network status are within the preset threshold range in the network configuration rules of the current application scenario.
[0085] Among them, the monitoring time strategy can be a user-defined monitoring strategy. If the user customizes the monitoring time strategy, the user can set it through the target page of the network switching terminal, or it can be a monitoring time strategy preset by the platform; its monitoring time strategy can be real-time monitoring, monitoring once at a preset interval, or monitoring at a specific time point, etc. Users can set different monitoring time strategies for different application scenarios. For example, for application scenarios with low network requirements, monitoring can be set once at a certain interval, or monitoring can be performed only at a specific time point. For application scenarios with high network requirements, real-time monitoring can be set, etc. In this way, different monitoring frequencies can be provided for different application scenarios, thereby realizing the rational use of the network.
[0086] In some embodiments, Figure 4 As shown, if the network configuration rule includes a specific application rule, step S200 includes:
[0087] Step S210, monitoring the network status of the currently used network according to the corresponding monitoring time strategy, and determining whether various parameters of the current network status are within a preset threshold range of other network configuration rules of the application scenario except for the specific application rules.
[0088] If the parameters of the current network status are within the preset threshold range of the network configuration rule of the application scenario, step S220 is executed to determine the target specific application running in the current application scenario.
[0089] Step S230, comparing each parameter of the monitored network state with a preset threshold range in a specific application rule corresponding to the target specific application to determine whether each parameter of the current network state is within the preset threshold range in the current specific application rule.
[0090] It can be understood that if the network configuration rules of the current application scenario include specific application rules, the parameters of the network used in the monitored current application scenario are first compared with the preset threshold ranges in other network configuration rules except the current specific application rules. If the parameters of the current network status are not within the preset threshold range of the network configuration rules of the application scenario, step S300 is directly executed; if the parameters of the current network status are within the preset threshold range of the network configuration rules of the application scenario, the target specific application currently running is determined, and the target specific application currently running may be one or more; if there is one, it is only necessary to compare the parameters of the monitored network status with the preset threshold range in the specific application rules corresponding to the target specific application. If there are multiple target specific applications, the parameters of the monitored network status are compared with the preset threshold range in the specific application rules corresponding to each target specific application. As long as one parameter does not meet the rules of one of the target specific applications, it means that the parameters of the current network status are not within the preset threshold range in the current specific application rules, and step S300 is executed.
[0091] In some embodiments, Figure 5 As shown, before step S300 (determining the target network to be switched based on the evaluation result of the network status of each network according to the preset weighted evaluation rule corresponding to the current application scenario), it also includes: step S700, obtaining the weight values of various parameters of the network status corresponding to each application scenario set by the user through the target page.
[0092] Step S800: Acquire various parameters of the network status of each network according to the corresponding monitoring time strategy.
[0093] Step S900, mapping each parameter of the network status of each network obtained through monitoring into a corresponding score according to a corresponding preset score mapping rule, and combining the weight values of each parameter of the network status corresponding to the current application scenario to determine the evaluation result of each network for the current application scenario.
[0094] Among them, steps S700-S900 can be executed at any time when the network is used in the current application scenario, as long as the user has set the network configuration rules for the current application scenario.
[0095] It can be understood that when the user sets the network configuration rules for the application scenario, the user can also set the weight values of the parameters of each network status to illustrate the importance of each network status parameter to the current application scenario. When setting the weight value, the sum of the weight values of multiple network status parameters should be 1 to ensure the normalization of subsequent scores (evaluation results). The setting of the weight has been explained above and will not be repeated here.
[0096] After obtaining the various parameters of the network status of each network according to the monitoring time strategy, each parameter of the network status is mapped to a corresponding score according to the preset score mapping rules, where the score of each parameter is between 0 and 10. The score mapping rules have been explained above and will not be repeated here.
[0097] Then, the score mapped to each parameter corresponding to the network state is multiplied by the weight value of the corresponding parameter of the network state corresponding to the current application scenario to obtain the product of each parameter; finally, the products of the parameters of the same network are added together to obtain the evaluation result of each network for the current application scenario, that is, to obtain the corresponding comprehensive score of each network.
[0098] The calculation of the evaluation result is expressed in the formula, which can be:
[0099] y=a1×w1+a2×w2+···+a n × n
[0100] Where y is the score result (comprehensive score) of a network, n is the number of network status parameters of the current application scenario configured by the user, a1, a2, ···a n The scores mapped by various parameters representing the network status, w1, w2, ···w n The weight values of various parameters that represent the network status.
[0101] In some implementations, this embodiment further includes: switching the network used in the current application scenario according to a preset interval time and in combination with the evaluation results of each network in the current application scenario.
[0102] It can be understood that in the process of using the network, each network can be scored in the current application scenario in real time or at a preset interval. Then, after the preset interval is reached, if the score of the currently used network is not the highest, the network switching is triggered to switch to the network with the highest current score. Even if the current network can be used, the network switching can be performed according to the scoring results.
[0103] In some implementations, if a network interface is found to be completely unavailable (eg, not connected, driver problem, etc.), its score is set to the lowest or excluded from the evaluation, thereby avoiding unnecessary calculations.
[0104] In some embodiments, when performing a network switch, in order to avoid data loss or temporary network disconnection during the switching process between two networks, the present embodiment also includes pre-configuration and data buffering, wherein the pre-configuration means that before officially disconnecting the current network, the network switching terminal should pre-configure the connection parameters of the new network (such as IP address, subnet mask, gateway, DNS, etc.), and try to establish a preliminary connection with the new network (such as obtaining an IP address assigned by DHCP); data buffering means that for key applications (such as video conferencing, online games, etc.), the network switching terminal can enable a data buffering mechanism before switching, temporarily store the data to be sent or received locally, and transmit it after the new network connection is stable. In addition, the network switching terminal of this embodiment is also embedded with smooth transition technology, which includes traffic scheduling, TCP connection maintenance and application layer support; among them, traffic scheduling means that during the switching process, the network switching terminal should gradually reduce the traffic load of the current network and increase the traffic load of the new network at the same time, and achieve smooth transition through the traffic scheduling algorithm; TCP connection maintenance means that for TCP connection, the network switching terminal can try to use technologies such as TCP Keepalive or TCP Fast Open to keep the connection active during the switching process and reduce the delay in re-establishing the connection; application layer support means that for supported applications, seamless switching can be achieved through application layer protocols. For example, video streaming applications can use technologies such as HTTP Live Streaming (HLS) or Dynamic Adaptive Streaming over HTTP (DASH) to seamlessly switch video stream sources during the switching process.
[0105] In addition, in this embodiment, the switching process needs to be monitored in real time during the network switching process, that is, during the switching process, the system should monitor the connection status of the new network in real time, including IP address acquisition, DNS resolution, network delay, etc., to ensure the smooth progress of the switching process. After the switching is completed, the network switching terminal can also feedback the switching results to the user, including the name, speed, delay and other information of the new network, and provide simple confirmation or adjustment options. Furthermore, if the new network connection fails or the performance is poor, the system should automatically roll back to the original network to ensure the continuity of user services. At the same time, the network switching terminal also provides user intervention options, allowing users to manually select other networks or reconfigure the switching strategy when the automatic rollback fails.
[0106] For example, in the above-mentioned smart home application scenario, when the user is watching a high-definition video on a smart TV, the network switching terminal detects that the bandwidth of the current Wi-Fi network suddenly drops below the preset threshold, which cannot meet the requirements for smooth playback of the video stream. The system immediately triggers the intelligent switching process, first trying to connect to other available Wi-Fi networks (if any), and evaluates their comprehensive scores. If the requirements cannot be met, it automatically disconnects from the current Wi-Fi and tries to connect to the cellular data module. During the switching process, the network switching terminal uses pre-configuration and buffering mechanisms to ensure that the video stream is not interrupted during the switching process. For example, TCP Fast Open is used to keep the TCP connection active, or HLS / DASH and other technologies are used to achieve seamless switching of video streams. After the switching is completed, the network switching terminal updates the routing table in real time and feeds back the switching results to the user through the smart home APP, including the name, speed, delay and cost information of the new network. Users can view detailed switching logs on the APP, including a comparison of network status before and after the switching; if the performance of the new network is poor or the connection fails after the switch, the network switching terminal has an automatic rollback mechanism to ensure the continuity of user services. At the same time, users can also manually select other networks or reconfigure the switching strategy on the APP.
[0107] This application allows users to flexibly set network configuration rules according to their own needs and network environment on the target page of the network switching terminal, including speed threshold, delay and packet loss rate, signal strength, cost threshold, application-specific rules and time rules, etc.; this highly customized network configuration not only improves the user experience, but also makes the network switching more in line with the user's actual usage, thereby improving the stability and efficiency of the network connection. In addition, this application can also monitor the network used in real time or according to a preset monitoring strategy to obtain the network status of each network interface, including key indicators such as signal strength, bandwidth, delay and packet loss rate, and perform a comprehensive score through a weighted evaluation model; this application uses this intelligent monitoring and evaluation mechanism to enable the network switching terminal to grasp the network status in real time, and trigger the switching process in time when the network quality deteriorates, effectively avoiding connection interruption or performance degradation caused by network fluctuations. In this application, by monitoring the network status of the network and combining the network configuration rules set by the user, the automatic switching of the network can be realized when the switching conditions are triggered. During the switching process, the platform can automatically select the optimal network for connection and configure the corresponding network parameters to ensure the smooth switching; at the same time, by testing the connectivity and performance of the new network, the platform can ensure that the switching results meet the expected requirements, further improving the reliability and stability of the network switching. Furthermore, by setting the cost threshold, the user can give priority to the lower-cost network for connection while ensuring the quality of the network. This cost-saving design not only reduces the user's network usage cost, but also promotes the rational use of resources.
[0108] Figure 6 A schematic diagram of the structure of a network switching device according to an embodiment of the present application is shown. Exemplarily, the network switching device includes:
[0109] The monitoring module 100 is used to monitor the network status of the currently used network.
[0110] The judgment module 200 is used to judge whether various parameters of the current network state are within the preset threshold range of each rule of the corresponding network configuration rule based on the network configuration rule of the current application scenario.
[0111] The switching module 300 is used to determine the target network to be switched based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario if no.
[0112] It can be understood that the device of this embodiment corresponds to the network switching method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.
[0113] The present application also provides a computer-readable storage medium for storing the computer program used in the above-mentioned network switching terminal. For example, the computer-readable storage medium may include but is not limited to: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0114] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0116] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
[0117] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A network switching method, characterized in that: include: Monitor the network status of the currently used network; Based on the network configuration rules of the current application scenario, determining whether various parameters of the current network state are within the preset threshold range of each rule corresponding to the network configuration rules; If not, the target network to be switched is determined based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario.
2. The network switching method according to claim 1, characterized in that: Before monitoring the network status of the currently used network, the method further includes: Receiving the network configuration rule for each of the application scenarios through a target page; Determining a network switching condition for each of the application scenarios based on the network configuration rule; wherein the network switching condition is determined according to the preset threshold range of the network configuration rule; The network configuration rules include at least one of speed rules, stability rules, signal rules, time rules, cost rules and specific application rules; Accordingly, the network status includes at least one parameter of speed, stability, signal strength and cost.
3. The network switching method according to claim 2, characterized in that: If the network configuration rule does not include the specific application rule, the network configuration rule based on the current application scenario determines whether each parameter of the current network state is within a preset threshold range of the corresponding network configuration rule, including: The network status of the currently used network is monitored according to the corresponding monitoring time strategy, and each parameter of the monitored network status is compared with the preset threshold range of the network configuration rule of the current application scenario to determine whether each parameter of the network status is within the preset threshold range in the network configuration rule of the current application scenario.
4. The network switching method according to claim 2, characterized in that: If the network configuration rule includes the specific application rule, the network configuration rule based on the current application scenario determines whether each parameter of the current network state is within a preset threshold range of the corresponding network configuration rule, including: Monitoring the network state of the currently used network according to the corresponding monitoring time strategy, and determining whether various parameters of the current network state are within the preset threshold range of the network configuration rule of the application scenario; If so, determining the target specific application currently running in the application scenario; The various parameters of the monitored network state are compared with the preset threshold range in the specific application rule corresponding to the target specific application to determine whether the various parameters of the current network state are within the preset threshold range in the current specific application rule.
5. The network switching method according to claim 2, characterized in that: Before determining the target network to be switched based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario, the method further includes: Obtaining weight values of various parameters of the network state corresponding to each application scenario set by the user through the target page; Acquire various parameters of the network status of each network according to the corresponding monitoring time strategy; The various parameters of the network status of each network obtained through monitoring are mapped into corresponding scores according to the corresponding preset score mapping rules, and the evaluation result of each network for the current application scenario is determined in combination with the weight values of the various parameters of the network status corresponding to the current application scenario.
6. The network switching method according to claim 5, characterized in that: The monitoring and obtaining of each parameter of the network state of each network is mapped into a corresponding score according to a corresponding preset score mapping rule, and the evaluation result of each network for the current application scenario is determined in combination with the weight value of each parameter of the network state corresponding to the current application scenario, including: Mapping each parameter of the network state of each network into a corresponding score according to a corresponding preset score mapping rule; Multiplying the score mapped to each parameter corresponding to the network state by the weight value of the corresponding parameter of the network state corresponding to the current application scenario to obtain the product of each parameter; The products of the parameters of the same network are added together to obtain the evaluation result of each network for the current application scenario.
7. The network switching method according to claim 6, characterized in that: The method further comprises: According to the preset interval time, combined with the evaluation results of each network in the current application scenario, the network used in the current application scenario is switched.
8. A network switching device, characterized in that: include: A monitoring module, used to monitor the network status of the currently used network; A judgment module, used to judge whether various parameters of the current network state are within the preset threshold range of each rule of the corresponding network configuration rule based on the network configuration rule of the current application scenario; The switching module is used to determine the target network to be switched based on the evaluation result of each network according to the preset weighted evaluation rule corresponding to the current application scenario if no.
9. A network switching terminal, characterized in that: The network switching terminal includes a target page, a processor and a memory; The target page is used to input the network configuration rules for each application scenario; The memory stores a computer program, and the processor is configured to execute the computer program to implement the network switching method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed on a processor, the network switching method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Communication transmission management method and system for heterogeneous network, and storage medium
CN119316863A
Communication transmission management method, system and storage medium for heterogeneous networks
CN119316863B
Satellite communication application processing system suitable for sea surface buoy
CN120074635A
Bluetooth 4G dual-mode communication method of Internet of Things equipment
CN120358563A
Multi-module collaborative seamless connection method for network switching of Internet of Things equipment
CN120935690A
