CN113839822A - Network setting method, network setting device and electronic equipment - Google Patents
Network setting method, network setting device and electronic equipment Download PDFInfo
- Publication number
- CN113839822A CN113839822A CN202111254080.XA CN202111254080A CN113839822A CN 113839822 A CN113839822 A CN 113839822A CN 202111254080 A CN202111254080 A CN 202111254080A CN 113839822 A CN113839822 A CN 113839822A
- Authority
- CN
- China
- Prior art keywords
- bandwidth
- communication network
- real
- network
- communication
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000004891 communication Methods 0.000 claims abstract description 330
- 238000004590 computer program Methods 0.000 claims description 18
- 230000008859 change Effects 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 description 9
- 230000009286 beneficial effect Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0896—Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a network setting method, a network setting device, an electronic device and a computer readable storage medium. The method is applied to electronic equipment with at least two communication networks, and comprises the following steps: when a communication link is newly established, respectively acquiring real-time bandwidth margins of the at least two communication networks; determining a target communication network in the at least two communication networks, wherein the real-time bandwidth allowance of the target communication network meets a preset bandwidth condition; and setting the target communication network as an exit network of the communication link. Through the scheme, the outlet network can be intelligently and flexibly set.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network setting method, a network setting apparatus, an electronic device, and a computer-readable storage medium.
Background
At present, most gateway devices need to be networked in real time and upload acquired data to a cloud, which has a high requirement on continuous transmission of data, so that the current gateway devices need to be backed up by multiple internet access modes, otherwise, once the performance of an outlet network used by the gateway devices fluctuates or decreases (such as bandwidth becomes smaller), the data to be transmitted are frequently lost. The network switching mode of the existing gateway device is simple, and generally, parameters such as signal strength and speed of an interface are detected firstly, then whether the parameters meet a switching condition is judged according to a certain preset threshold value, and after the parameters meet the switching condition, all communication links are integrally switched to another outlet network. It is expected that all communication links need to be terminated first when switching the egress network, which still causes the loss of the data being transmitted, and causes great inconvenience to the user. That is, the current gateway device still has the problem of insufficient flexibility and intelligence in setting of the egress network.
Disclosure of Invention
The application provides a network setting method, a network setting device, an electronic device and a computer readable storage medium, which can intelligently and flexibly realize the setting of an exit network.
In a first aspect, the present application provides a network setting method, where the network setting method is applied to an electronic device in which at least two communication networks exist, and the network setting method includes:
when a communication link is newly established, respectively acquiring real-time bandwidth margins of the at least two communication networks;
determining a target communication network in the at least two communication networks, wherein the real-time bandwidth allowance of the target communication network meets a preset bandwidth condition;
and setting the target communication network as an exit network of the communication link.
In a second aspect, the present application provides a network setting apparatus, which is applied to an electronic device with at least two communication networks, and includes:
the acquisition module is used for respectively acquiring the real-time bandwidth margins of the at least two communication networks when a communication link is newly established;
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target communication network in the at least two communication networks, and the real-time bandwidth allowance of the target communication network meets a preset bandwidth condition;
and the setting module is used for setting the target communication network as an exit network of the communication link.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the method of the first aspect as described above.
Compared with the prior art, the application has the beneficial effects that: when a communication link is newly established, the electronic device firstly obtains real-time bandwidth margins of at least two communication networks respectively, then determines a target communication network in the at least two communication networks, wherein the real-time bandwidth margins of the target communication network meet a preset bandwidth condition, and finally sets the target communication network as an exit network of the communication link. According to the process, the outlet network of each newly-built communication link is independently set based on the real-time bandwidth allowance of each current communication network, so that the outlet network can be set under the condition that the original communication link is not influenced by each newly-built communication link, and the stability of the network is improved. In addition, compared with a network setting scheme that all communication links of the equipment are selected from one or N to set the same exit network in the prior art, the method and the device can utilize resources of each communication network to the maximum extent, and are beneficial to improving the whole bandwidth and the network throughput. It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating an implementation of a network setting method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an implementation of step 102 provided in an embodiment of the present application;
fig. 3 is a schematic diagram of a specific implementation process of acquiring, by an electronic device, a current real-time bandwidth margin of a communication network according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating a calculation flow of a real-time bandwidth margin according to an embodiment of the present application;
fig. 5 is a block diagram of a network setting apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution proposed in the present application, the following description will be given by way of specific examples.
The following is a description of a network setting method proposed in the embodiment of the present application. The network setting method is applied to electronic equipment with at least two communication networks. By way of example only, the electronic device may be an intelligent gateway and the communication network may include a wireless communication network and a wired communication network. The wireless communication network may include, but is not limited to, a WI-FI network, a 4G network, and a 5G network; the wired communication network may include, but is not limited to, an ethernet network, a serial port network, and a fiber optic network. It is understood that a network that is capable of accessing the internet can be considered a communication network. That is, the electronic device according to the embodiment of the present application should be equipped with at least two interfaces of different communication networks, so that the electronic device can access to the internet through the different communication networks.
Referring to fig. 1, the implementation flow of the network setting method is detailed as follows:
and step 101, respectively acquiring real-time bandwidth margins of the at least two communication networks when a communication link is newly established.
In this embodiment, the upper layer specific service of the electronic device determines whether to establish a new communication link according to the received communication request or the actual communication condition of each established communication link. Specifically, the communication link is mainly a data link encapsulated in the form of Internet Protocol (IP) packets, including but not limited to a Transmission Control Protocol (TCP) link and a User Datagram Protocol (UDP) link.
For example only, when the upper layer specific service receives a communication request sent by a user or other equipment, that is, when the upper layer specific service determines that a new communication requirement currently exists, a communication link can be newly established; or, when an exit network of an established communication link is disconnected, the communication link is newly established again for the upper layer specific service corresponding to the communication link to replace the communication link disconnected from the exit network.
It can be understood that, when the electronic device performs an action of newly establishing a communication link, each step of the embodiment of the present application is triggered. When a communication link is newly established, whether the communication link is a new communication link is identified according to whether the quintuple (source IP, destination IP, protocol type, source port and destination port) of the TCP or UDP data packet is consistent.
When a communication link is newly established, the electronic equipment can be automatically triggered to execute the operation of respectively acquiring the current real-time bandwidth margins of at least two communication networks. It will be appreciated that for each communication network, the current real-time bandwidth margin of the communication network may be determined based on the current operating state of the communication network and current network parameters.
And 102, determining a target communication network in the at least two communication networks, wherein the real-time bandwidth allowance of the target communication network meets a preset bandwidth condition.
In the embodiment of the present application, in order to ensure the service quality of the newly-built communication link and avoid the situation that the communication link is abnormal, a target communication network may be determined according to the current real-time bandwidth margin of each communication network. Specifically, the electronic device has a preset bandwidth condition, and only when the real-time bandwidth margin satisfies the bandwidth condition, the communication network corresponding to the real-time bandwidth margin may be determined as the target communication network.
In some embodiments, the electronic device may also preset the priority of each communication network according to the user's usage requirements; the electronic device may sequentially determine whether the communication network is the target communication network based on the order of the priorities from high to low, please refer to fig. 2, and step 102 may be embodied as:
and A1, respectively acquiring the priorities of the at least two communication networks.
And A2, sequentially judging whether the real-time bandwidth allowance of the communication network meets the preset bandwidth condition or not based on the sequence from high priority to low priority, and stopping judging until the communication network with the real-time bandwidth allowance meeting the preset bandwidth condition is obtained.
A3, determining the communication network with the real-time bandwidth margin meeting the preset bandwidth condition as the target communication network.
The above process may be understood as: the electronic equipment firstly determines the communication network with the highest priority as the communication network to be tested; then, whether the real-time bandwidth allowance of the communication network to be tested meets the preset bandwidth condition can be judged; if the real-time bandwidth allowance of the communication network to be tested meets the preset bandwidth condition, determining the communication network to be tested as a target communication network; otherwise, if the real-time bandwidth allowance of the communication network to be tested does not meet the preset bandwidth condition, determining a new communication network to be tested in the at least two communication networks based on the sequence of the priority from high to low, and returning to the step of judging whether the real-time bandwidth allowance of the communication network to be tested meets the preset bandwidth condition or not and the subsequent steps.
In some cases, the current real-time bandwidth margins of all the communication networks may not satisfy the preset bandwidth condition, and considering that there is a certain delay in the acquisition and determination of the real-time bandwidth margins, the real-time bandwidth margins of some communication networks may be improved after the delay. Based on this, at this time, the electronic device may re-trigger the operation of obtaining the real-time bandwidth allowances of the communication networks, that is, when the current real-time bandwidth allowances of all the communication networks do not satisfy the preset bandwidth condition, the electronic device may return to the operation of obtaining the current real-time bandwidth allowances of the at least two communication networks in step 101 and the subsequent operation, so as to search whether there is a target communication network again.
For example only, assume that the current electronic device is equipped with three communication networks A, B and C, where communication network a has the highest priority, communication network B has the next highest priority, and communication network C has the lowest priority. After obtaining the priorities of the communication networks A, B and C, the electronic device will first determine whether the current real-time bandwidth allowance of the communication network a meets the preset bandwidth condition because the priority of the communication network a is the highest.
If the current real-time bandwidth allowance of the communication network A meets the preset bandwidth condition, the communication network A can be determined as a target communication network, and the judgment on the communication networks B and C is not carried out any more. If the current real-time bandwidth allowance of the communication network A does not meet the preset bandwidth condition, the electronic equipment can continuously judge whether the current real-time bandwidth allowance of the communication network B meets the preset bandwidth condition.
If the current real-time bandwidth allowance of the communication network B meets the preset bandwidth condition, the communication network B can be determined as a target communication network, and the communication network C is not judged any more. If the current real-time bandwidth allowance of the communication network B does not meet the preset bandwidth condition, the electronic equipment can continuously judge whether the current real-time bandwidth allowance of the communication network C meets the preset bandwidth condition.
If the current real-time bandwidth margin of the communication network C meets the preset bandwidth condition, the communication network C can be determined as the target communication network. If the current real-time bandwidth allowance of the communication network C does not satisfy the preset bandwidth condition, the electronic device may obtain the current real-time bandwidth allowances of the communication network A, B and C again, and sequentially determine whether the current real-time bandwidth allowances of the communication network A, B and C satisfy the preset bandwidth condition based on the order of the priorities from high to low.
In some embodiments, for any communication network, it may be determined whether the current real-time bandwidth margin of the communication network meets a preset bandwidth condition by: judging whether the current real-time bandwidth allowance of the communication network is larger than a preset bandwidth allowance threshold value, and if the real-time bandwidth allowance of the communication network is larger than the bandwidth allowance threshold value, determining that the real-time bandwidth allowance of the communication network meets the preset bandwidth condition. The bandwidth margin threshold may be preset by the electronic device, for example, the bandwidth margin threshold may be set to a specific value (e.g., 5 Mbps); or, the bandwidth margin threshold may be set as a percentage of the actual bandwidth of the communication network (if the actual bandwidth of a certain communication network is 100Mbps, and the bandwidth margin threshold is 5%, the bandwidth margin threshold of the communication network after the conversion is specifically 5 Mbps); of course, the bandwidth margin threshold may be set to other values according to actual usage scenarios, and is not limited herein.
In the embodiment of the application, after the target communication network is determined, the communication network can be set as an exit network of the currently newly-built communication link. That is, for the data packets belonging to the communication link, the data packets are subsequently transmitted and received through the target communication network.
In some embodiments, referring to fig. 3, for any communication network equipped in the electronic device, the electronic device may obtain the current real-time bandwidth margin of the communication network by:
b1, detecting the working state of the communication network.
B2, if the operation status of the communication network indicates that the communication network is not in operation, determining that the current real-time bandwidth margin of the communication network is 0.
It can be understood that if the operation status of the communication network indicates that the communication network is disconnected or the communication network is manually closed, it can be directly determined that the current real-time bandwidth margin of the communication network is 0.
B3, if the operating status of the communication network indicates that the communication network is operating, calculating the current real-time bandwidth margin of the communication network based on the signal strength of the communication network, the real-time bandwidth, and the peak bandwidth when no packet loss occurs within a preset time period.
It can be understood that if the operating state of the communication network indicates that the communication network is in operation, that is, not disconnected or not manually closed, the network parameters of the communication network, including the signal strength, the real-time bandwidth, the peak bandwidth when no packet loss occurs within a preset time period, and the like, may be obtained, and the real-time bandwidth margin of the communication network may be calculated based on the network parameters.
In practice, the real-time bandwidth may be approximately equal to the real-time rate, and thus may be obtained by the electronic device by monitoring the real-time rate of the communication network.
The preset time period is understood to be a specific time window concept, for example, the last 24 hours, and is not limited herein. The electronic device monitors the real-time bandwidth of each time when no packet loss occurs, and determines the peak value of the real-time bandwidth when no packet loss occurs within the preset time period (i.e., within the specific time window, for example, within the last 24 hours) as the peak bandwidth. For ease of understanding, the peak bandwidth may be approximately considered to be the actual highest bandwidth of the communication network over a longer period of time.
Specifically, referring to fig. 4, the calculation flow of the real-time bandwidth margin is as follows:
c1, if the signal strength of the communication network is 0, determining the real-time bandwidth margin of the communication network to be 0.
And C2, if the signal intensity of the communication network is not 0, determining and calculating the weight according to the change trend of the signal intensity.
The electronic device can record the signal strength of the communication network at each moment. When the signal intensity of the communication network is not 0, the electronic device may compare the recorded signal intensity of the communication network at the previous time with the recorded signal intensity of the communication network at the current time. If the comparison shows that the signal strength at the current time is weaker than the signal strength at the previous time, it is determined that the change trend of the signal strength is weak, and at this time, the communication network has the possibility of network fluctuation, and the corresponding calculation weight can be determined to be a value smaller than 1, for example, 0.9. On the contrary, if the comparison shows that the signal strength at the current time is equal to or stronger than the signal strength at the previous time, it is determined that the variation trend of the signal strength is stable, and the corresponding calculation weight can be determined as 1. Of course, the specific values of the calculation weights corresponding to different variation trends may also be dynamically set by the electronic device through autonomous learning, which is not limited herein.
And C3, calculating the product of the peak bandwidth and the calculated weight.
And C4, determining the difference between the multiplication result and the real-time bandwidth as the real-time bandwidth margin of the communication network.
For ease of understanding, the peak bandwidth may be denoted as BWmaxThe real-time bandwidth is denoted as BWrtIf the calculated weight is denoted as w, the real-time bandwidth margin BW of the communication networkal=BWmax*w-BWrt。
In some embodiments, it may also occur that the peak bandwidth is smaller than the real-time bandwidth, which may result in the calculated real-time bandwidth margin not being fair. In contrast, before step C3, that is, after the peak bandwidth and the real-time bandwidth are obtained, the electronic device may compare the peak bandwidth with the real-time bandwidth, and if the peak bandwidth is found to be smaller than the real-time bandwidth, the peak bandwidth may be updated to a preset multiple (e.g., 1.2 times, 1.5 times, or 2 times) of the real-time bandwidth, and the updated peak bandwidth does not exceed the theoretical maximum bandwidth of the communication network. The theoretical maximum bandwidth can be obtained through network negotiation data of the communication network.
For example only, assume that the theoretical maximum bandwidth of the communication network is X, the currently recorded peak bandwidth is Y, the real-time bandwidth is Z, and the preset time is 1.2 times. If the electronic device finds that Y is less than Z by comparison, the peak bandwidth is updated to 1.2Y, and the electronic device compares the updated peak bandwidth 1.2Y with the theoretical maximum bandwidth X. If the electronic device finds that 1.2Y is not greater than X by comparison, the updated peak bandwidth remains 1.2Y, that is, the peak bandwidth 1.2Y is input to steps C3 and C4 for calculation. If the electronic device finds 1.2Y > X by comparison, the peak bandwidth is updated to X again, i.e., the peak bandwidth X is input to steps C3 and C4 for calculation.
Based on the network setting method provided by the embodiment of the application, different communication links can work on different communication networks and are kept independent from each other, so that the fluctuation of a single communication network cannot influence the communication links on other communication networks. And when the single communication network fluctuates, the communication link is newly established by the specific service of the upper layer, and the electronic equipment can select the currently optimal communication network as the outlet network for the newly established communication link based on the network setting method, so that the delayed switching is realized on the network switching effect.
Therefore, according to the embodiment of the application, the outlet network of each newly-built communication link is independently set based on the real-time bandwidth allowance of each current communication network, so that the outlet network can be set without influencing the original communication link of each newly-built communication link, and the stability of the network is improved. In addition, compared with a network setting scheme that all communication links of the equipment are selected from one or N to set the same exit network in the prior art, the method and the device can utilize resources of each communication network to the maximum extent, and are beneficial to improving the whole bandwidth and the network throughput. By setting the priority of the communication network, the data packet can be sent from the prior communication network, and the sending flexibility is improved. For example, the user may desire to transmit preferentially from the wired broadband network rather than the wireless mobile network, since the wired broadband network is generally less expensive to use than the wireless mobile network, thereby saving the user's cost.
Corresponding to the network setting method provided above, an embodiment of the present application further provides a network setting apparatus, which is applied to an electronic device having at least two communication networks. As shown in fig. 5, the network setting apparatus 500 includes:
an obtaining module 501, configured to obtain real-time bandwidth margins of the at least two communication networks when a communication link is newly established;
a determining module 502, configured to determine a target communication network among the at least two communication networks, where a real-time bandwidth margin of the target communication network meets a preset bandwidth condition;
a setting module 503, configured to set the target communication network as an egress network of the communication link.
Optionally, the determining module 502 includes:
a priority acquiring unit, configured to acquire priorities of the at least two communication networks respectively;
a network judging unit, configured to sequentially judge whether the real-time bandwidth allowance of the communication network meets the preset bandwidth condition based on the order from high priority to low priority, and stop the judgment until a communication network with the real-time bandwidth allowance meeting the preset bandwidth condition is obtained;
and a network determining unit, configured to determine, as the target communication network, a communication network in which the real-time bandwidth margin satisfies the preset bandwidth condition.
Optionally, the network determining unit includes:
a judging subunit, configured to judge whether a real-time bandwidth margin of the communication network is greater than a preset bandwidth margin threshold;
and a determining subunit, configured to determine that the real-time bandwidth headroom of the communication network meets the preset bandwidth condition if the real-time bandwidth headroom of the communication network is greater than the bandwidth headroom threshold.
Optionally, the obtaining module 501 is further configured to obtain the real-time bandwidth allowances of the at least two communication networks again when the real-time bandwidth allowances of all the communication networks do not satisfy the preset bandwidth condition.
Optionally, the obtaining module 501 includes:
a state detection unit for detecting the working state of the communication network for each communication network;
a margin determining unit, configured to determine that a real-time bandwidth margin of the communication network is 0 if the operating state of the communication network indicates that the communication network is not operating;
and the margin calculation unit is used for calculating the real-time bandwidth margin of the communication network based on the signal intensity, the real-time bandwidth and the peak bandwidth when packet loss does not occur in a preset time period of the communication network if the working state of the communication network indicates that the communication network is working.
Optionally, the remaining amount calculating unit includes:
a first determining subunit, configured to determine that a real-time bandwidth margin of the communication network is 0 if the signal strength of the communication network is 0;
a weight determining subunit, configured to determine a calculation weight based on a variation trend of the signal strength if the signal strength of the communication network is not 0;
a calculating subunit, configured to calculate a product result of the peak bandwidth and the calculated weight;
and a second determining subunit, configured to determine a difference between the multiplication result and the real-time bandwidth as a real-time bandwidth margin of the communication network.
Optionally, the remaining amount calculating unit further includes:
a comparison subunit, configured to compare the peak bandwidth with the real-time bandwidth;
and the updating subunit is configured to update the peak bandwidth to a preset time of the real-time bandwidth if the peak bandwidth is smaller than the real-time bandwidth, where the updated peak bandwidth does not exceed a theoretical maximum bandwidth of the communication network.
Therefore, according to the embodiment of the application, the outlet network of each newly-built communication link is independently set based on the real-time bandwidth allowance of each current communication network, so that the outlet network can be set without influencing the original communication link of each newly-built communication link, and the stability of the network is improved. In addition, compared with a network setting scheme that all communication links of the equipment are selected from one or N to set the same exit network in the prior art, the method and the device can utilize resources of each communication network to the maximum extent, and are beneficial to improving the whole bandwidth and the network throughput. By setting the priority of the communication network, the data packet can be sent from the prior communication network, and the sending flexibility is improved. For example, the user may desire to transmit preferentially from the wired broadband network rather than the wireless mobile network, since the wired broadband network is generally less expensive to use than the wireless mobile network, thereby saving the user's cost.
Corresponding to the network setting method provided above, an embodiment of the present application further provides an electronic device, where the electronic device has at least two communication networks. Referring to fig. 6, an electronic device 6 in the embodiment of the present application includes: a memory 601, one or more processors 602 (only one shown in fig. 6), and computer programs stored on the memory 601 and executable on the processors. Wherein: the memory 601 is used for storing software programs and units, and the processor 602 executes various functional applications and diagnoses by running the software programs and units stored in the memory 601, so as to obtain resources corresponding to the preset events. Specifically, the processor 602 implements the following steps by running the above-mentioned computer program stored in the memory 601:
when a communication link is newly established, respectively acquiring real-time bandwidth margins of the at least two communication networks;
determining a target communication network in the at least two communication networks, wherein the real-time bandwidth allowance of the target communication network meets a preset bandwidth condition;
and setting the target communication network as an exit network of the communication link.
Assuming that the above is the first possible implementation manner, in a second possible implementation manner provided on the basis of the first possible implementation manner, the determining a target communication network among the at least two communication networks includes:
respectively acquiring the priorities of the at least two communication networks;
and sequentially judging whether the real-time bandwidth allowance of the communication network meets the preset bandwidth condition or not based on the sequence of the priority from high to low, stopping judging until the communication network with the real-time bandwidth allowance meeting the preset bandwidth condition is obtained, and determining the communication network with the real-time bandwidth allowance meeting the preset bandwidth condition as the target communication network.
In a third possible implementation manner provided on the basis of the second possible implementation manner, the determining whether the real-time bandwidth margin of the communication network meets the preset bandwidth condition includes:
judging whether the real-time bandwidth allowance of the communication network is larger than a preset bandwidth allowance threshold value or not;
and if the real-time bandwidth allowance of the communication network is larger than the bandwidth allowance threshold, determining that the real-time bandwidth allowance of the communication network meets the preset bandwidth condition.
In a fourth possible implementation manner provided on the basis of the second possible implementation manner, after sequentially determining whether the real-time bandwidth margin of the communication network satisfies the preset bandwidth condition, the processor 602 further implements the following steps when executing the computer program stored in the memory 601:
and if the real-time bandwidth margins of all the communication networks do not meet the preset bandwidth condition, returning to execute the step of respectively acquiring the real-time bandwidth margins of the at least two communication networks and the subsequent steps.
In a fifth possible implementation based on the first possible implementation, the second possible implementation, the third possible implementation, or the fourth possible implementation, the obtaining the real-time bandwidth margins of the at least two communication networks respectively includes:
detecting the working state of each communication network;
if the working state of the communication network indicates that the communication network is not in work, determining that the real-time bandwidth allowance of the communication network is 0;
and if the working state of the communication network indicates that the communication network is in work, calculating the real-time bandwidth allowance of the communication network based on the signal intensity, the real-time bandwidth and the peak bandwidth when packet loss does not occur in a preset time period of the communication network.
In a sixth possible implementation manner provided based on the fifth possible implementation manner, the calculating a real-time bandwidth margin of the communication network based on the signal strength of the communication network, the real-time bandwidth, and a peak bandwidth when no packet loss occurs within a preset time period includes:
if the signal intensity of the communication network is 0, determining that the real-time bandwidth allowance of the communication network is 0;
if the signal intensity of the communication network is not 0, determining and calculating the weight based on the change trend of the signal intensity;
calculating the product of the peak bandwidth and the calculated weight;
and determining the difference between the multiplication result and the real-time bandwidth as the real-time bandwidth allowance of the communication network.
In a seventh possible implementation manner provided as the basis of the sixth possible implementation manner, before the step of calculating the result of multiplying the peak bandwidth by the calculated weight, the processor 602 further performs the following steps when executing the computer program stored in the memory 601:
comparing the peak bandwidth with the real-time bandwidth;
and if the peak bandwidth is smaller than the real-time bandwidth, updating the peak bandwidth to be a preset time of the real-time bandwidth, wherein the updated peak bandwidth does not exceed the theoretical highest bandwidth of the communication network.
It should be understood that in the embodiments of the present Application, the Processor 602 may be a Central Processing Unit (CPU), and the Processor may be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Therefore, according to the embodiment of the application, the outlet network of each newly-built communication link is independently set based on the real-time bandwidth allowance of each current communication network, so that the outlet network can be set without influencing the original communication link of each newly-built communication link, and the stability of the network is improved. In addition, compared with a network setting scheme that all communication links of the equipment are selected from one or N to set the same exit network in the prior art, the method and the device can utilize resources of each communication network to the maximum extent, and are beneficial to improving the whole bandwidth and the network throughput. By setting the priority of the communication network, the data packet can be sent from the prior communication network, and the sending flexibility is improved. For example, the user may desire to transmit preferentially from the wired broadband network rather than the wireless mobile network, since the wired broadband network is generally less expensive to use than the wireless mobile network, thereby saving the user's cost.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of external device software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the above-described computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer readable Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable storage medium may contain other contents which can be appropriately increased or decreased according to the requirements of the legislation and the patent practice in the jurisdiction, for example, in some jurisdictions, the computer readable storage medium does not include an electrical carrier signal and a telecommunication signal according to the legislation and the patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (10)
1. A network setting method applied to an electronic device in which at least two communication networks exist, the network setting method comprising:
when a communication link is newly established, respectively acquiring real-time bandwidth margins of the at least two communication networks;
determining a target communication network in the at least two communication networks, wherein the real-time bandwidth allowance of the target communication network meets a preset bandwidth condition;
and setting the target communication network as an exit network of the communication link.
2. The network provisioning method of claim 1 wherein said determining a target communications network among said at least two communications networks comprises:
respectively acquiring the priorities of the at least two communication networks;
and sequentially judging whether the real-time bandwidth allowance of the communication network meets the preset bandwidth condition or not based on the sequence of the priority from high to low, stopping judging until the communication network with the real-time bandwidth allowance meeting the preset bandwidth condition is obtained, and determining the communication network with the real-time bandwidth allowance meeting the preset bandwidth condition as the target communication network.
3. The network setting method of claim 2, wherein the determining whether the real-time bandwidth margin of the communication network satisfies the preset bandwidth condition comprises:
judging whether the real-time bandwidth allowance of the communication network is larger than a preset bandwidth allowance threshold value or not;
and if the real-time bandwidth allowance of the communication network is larger than the bandwidth allowance threshold, determining that the real-time bandwidth allowance of the communication network meets the preset bandwidth condition.
4. The network setting method according to claim 2, wherein after sequentially determining whether the real-time bandwidth margin of the communication network satisfies the preset bandwidth condition, the network setting method further comprises:
and if the real-time bandwidth margins of all the communication networks do not meet the preset bandwidth condition, returning to execute the step of respectively acquiring the real-time bandwidth margins of the at least two communication networks and the subsequent steps.
5. The network setting method according to any one of claims 1 to 4, wherein the respectively obtaining the real-time bandwidth margins of the at least two communication networks comprises:
detecting the working state of each communication network;
if the working state of the communication network indicates that the communication network is not in work, determining that the real-time bandwidth allowance of the communication network is 0;
and if the working state of the communication network indicates that the communication network is in work, calculating the real-time bandwidth allowance of the communication network based on the signal intensity of the communication network, the real-time bandwidth and the peak bandwidth when packet loss does not occur in a preset time period.
6. The network setting method of claim 5, wherein the calculating the real-time bandwidth margin of the communication network based on the signal strength of the communication network, the real-time bandwidth and the peak bandwidth when no packet loss occurs within a preset time period comprises:
if the signal intensity of the communication network is 0, determining that the real-time bandwidth allowance of the communication network is 0;
if the signal intensity of the communication network is not 0, determining and calculating the weight based on the change trend of the signal intensity;
calculating a product result of the peak bandwidth and the calculated weight;
and determining the difference value between the multiplication result and the real-time bandwidth as the real-time bandwidth allowance of the communication network.
7. The network provisioning method of claim 6 wherein prior to said calculating a result of multiplying said peak bandwidth by said calculated weight, said network provisioning method further comprises:
comparing the peak bandwidth with the real-time bandwidth;
and if the peak bandwidth is smaller than the real-time bandwidth, updating the peak bandwidth to be a preset time of the real-time bandwidth, wherein the updated peak bandwidth does not exceed the theoretical highest bandwidth of the communication network.
8. A network setting apparatus applied to an electronic device in which at least two communication networks exist, the network setting apparatus comprising:
the acquisition module is used for respectively acquiring the real-time bandwidth margins of the at least two communication networks when a communication link is newly established;
the determining module is used for determining a target communication network in the at least two communication networks, wherein the real-time bandwidth allowance of the target communication network meets a preset bandwidth condition;
and the setting module is used for setting the target communication network as an exit network of the communication link.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111254080.XA CN113839822A (en) | 2021-10-27 | 2021-10-27 | Network setting method, network setting device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111254080.XA CN113839822A (en) | 2021-10-27 | 2021-10-27 | Network setting method, network setting device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113839822A true CN113839822A (en) | 2021-12-24 |
Family
ID=78966370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111254080.XA Pending CN113839822A (en) | 2021-10-27 | 2021-10-27 | Network setting method, network setting device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113839822A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2245132A1 (en) * | 1997-09-23 | 1999-03-23 | Alcatel | Process for initializing link between a mobile terminal and a domestic base station |
CA2491560A1 (en) * | 2004-01-07 | 2005-07-07 | Research In Motion Limited | System and method for selecting a cellular network on a wireless local area network |
CN101626554A (en) * | 2009-08-13 | 2010-01-13 | 中兴通讯股份有限公司 | Multi-mode mobile terminal and resource downloading method thereof |
CN102149155A (en) * | 2011-02-12 | 2011-08-10 | 中兴通讯股份有限公司 | Method and device for dual-mode dual-standby terminal to implement communications |
CN105228208A (en) * | 2014-06-23 | 2016-01-06 | 北京邮电大学 | A kind of method that between Wireless Mesh network and Cellular Networks, business switches |
CN107454012A (en) * | 2016-06-01 | 2017-12-08 | 中兴通讯股份有限公司 | A kind of method and device for controlling up home gateway load balancing |
CN108023813A (en) * | 2017-11-16 | 2018-05-11 | 武汉钢铁工程技术集团通信有限责任公司 | A kind of method for routing, system and a kind of routing policy server |
CN110446198A (en) * | 2019-08-23 | 2019-11-12 | 北京美思特智能科技有限公司 | The more base station communication methods of electronic label |
-
2021
- 2021-10-27 CN CN202111254080.XA patent/CN113839822A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2245132A1 (en) * | 1997-09-23 | 1999-03-23 | Alcatel | Process for initializing link between a mobile terminal and a domestic base station |
CA2491560A1 (en) * | 2004-01-07 | 2005-07-07 | Research In Motion Limited | System and method for selecting a cellular network on a wireless local area network |
CN101626554A (en) * | 2009-08-13 | 2010-01-13 | 中兴通讯股份有限公司 | Multi-mode mobile terminal and resource downloading method thereof |
CN102149155A (en) * | 2011-02-12 | 2011-08-10 | 中兴通讯股份有限公司 | Method and device for dual-mode dual-standby terminal to implement communications |
CN105228208A (en) * | 2014-06-23 | 2016-01-06 | 北京邮电大学 | A kind of method that between Wireless Mesh network and Cellular Networks, business switches |
CN107454012A (en) * | 2016-06-01 | 2017-12-08 | 中兴通讯股份有限公司 | A kind of method and device for controlling up home gateway load balancing |
CN108023813A (en) * | 2017-11-16 | 2018-05-11 | 武汉钢铁工程技术集团通信有限责任公司 | A kind of method for routing, system and a kind of routing policy server |
CN110446198A (en) * | 2019-08-23 | 2019-11-12 | 北京美思特智能科技有限公司 | The more base station communication methods of electronic label |
Non-Patent Citations (2)
Title |
---|
苏开宇: "多出口网络链路负载均衡系统的研究", 《中国计量学院学报》, 31 March 2009 (2009-03-31), pages 65 - 70 * |
邝少斌: "基于策略路由的多链路出口网络设计与实现", 15 November 2020 (2020-11-15), pages 68 - 71 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20170195233A1 (en) | Methods and systems for evaluating network performance of an aggregated connection | |
US9602412B2 (en) | Methods and systems for transmitting data packets | |
US20150223160A1 (en) | Directing network association of a wireless client | |
CN104219174A (en) | System and method for providing dynamic QOS to maximize bandwidth utilization | |
CN108261763B (en) | Acceleration system of game running environment | |
CN110855741B (en) | Service self-adaptive access method and device, storage medium and electronic device | |
RU2008101646A (en) | BACKGROUND JOINT USE OF NETWORK BANDWAY AFTER GATEWAY DEVICES | |
CN102934403A (en) | Controlling data transmission over a network | |
US20090290491A1 (en) | End-Host Based Network Management System | |
WO2018001230A1 (en) | Dynamic link aggregation implementation method and device and computer storage medium | |
US20090207736A1 (en) | Constrained dynamic path selection among multiple communication interfaces | |
CN108476175B (en) | Transfer SDN traffic engineering method and system using dual variables | |
US20230224228A1 (en) | Method and System for Guaranteeing Service Application Experience | |
US20060156383A1 (en) | Smart buffering for policy enforcement | |
WO2021103706A1 (en) | Data packet sending control method, model training method, device, and system | |
US11929911B2 (en) | Shaping outgoing traffic of network packets in a network management system | |
Volpato et al. | An autonomic QoS management architecture for software-defined networking environments | |
CN116233018A (en) | Message processing method and device, electronic equipment and storage medium | |
US20240137327A1 (en) | Active queue management method for network device and network device | |
KR20140088097A (en) | Controlling transmission of data | |
CN113438169A (en) | Data scheduling method, electronic equipment and storage medium | |
CN113839822A (en) | Network setting method, network setting device and electronic equipment | |
Kanagarathinam et al. | Application prioritization engine for enhancing real-time performance in Smartphones | |
CN103107949A (en) | Network relay device, control method for network relay device | |
US7483371B2 (en) | Management module controlled ingress transmission capacity |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |