Multi-path internet access method and device

文档序号:409943 发布日期:2021-12-17 浏览:5次 中文

阅读说明:本技术 一种多路上网方法及装置 (Multi-path internet access method and device ) 是由 高飞 车忠辉 马小亮 郑宏涛 于 2020-06-12 设计创作,主要内容包括:本发明实施例提供了一种多路上网方法及装置,其中,该方法包括:从连网成功的M个上行WAN口中确定可用上行WAN口,其中,所述可用上行WAN口的数量为N个,所述M大于或等于所述N,所述M、所述N均为大于1的整数;根据预先设置的所述M个上行WAN口的分流策略确定所述可用上述WAN口的分流策略;根据所述可用上述WAN口的分流策略将上网数据流分配到所述可用上行WAN口中,可以解决相关技术中限定不同类型应用从不同上行接口路由出去,存在无法将流量自动分配到不同上行实现速率叠加的问题,可以满足多个上行同时工作实现带宽叠加,同时可以将带宽等比例或按照用户预设比例分摊到不同上行实现速率叠加。(The embodiment of the invention provides a multi-path internet access method and a device, wherein the method comprises the following steps: determining available uplink WAN ports from M uplink WAN ports which are successfully networked, wherein the number of the available uplink WAN ports is N, M is greater than or equal to N, and M and N are integers greater than 1; determining the shunting strategy of the available WAN ports according to preset shunting strategies of the M uplink WAN ports; the method can solve the problems that different types of applications are limited to be routed out from different uplink interfaces in the related technology, the flow cannot be automatically distributed to different uplinks to realize rate superposition, the requirement that multiple uplinks work simultaneously to realize bandwidth superposition can be met, and meanwhile, the bandwidth can be distributed to different uplinks to realize rate superposition in an equal proportion or according to a preset proportion of a user.)

1. A multi-path internet access method is characterized by comprising the following steps:

determining available uplink WAN ports from M uplink WAN ports which are successfully networked, wherein the number of the available uplink WAN ports is N, M is greater than or equal to N, and M and N are integers greater than 1;

determining the shunting strategy of the available WAN ports according to preset shunting strategies of the M uplink WAN ports;

and distributing the internet data flow to the available uplink WAN port according to the distribution strategy of the available WAN port.

2. The method of claim 1, wherein determining the available upstream WAN port from the M upstream WAN ports that are successfully networked comprises:

respectively detecting the patency of the M uplink WAN ports in a preset time period;

and determining the unobstructed uplink WAN port as the available uplink WAN port.

3. The method of claim 1, wherein determining the offloading policy for the available WAN ports according to the preset offloading policy for the M uplink WAN ports comprises:

if the shunting strategy is the proportion of the loaded data streams, determining the shunting strategy of the available uplink WAN ports according to the preset proportion of the M uplink WAN ports for loading the data streams;

and if the shunting strategy comprises the proportion of carrying data streams and target data streams distributed to part or all of the M uplink WAN ports, determining the shunting strategy of the available uplink WAN ports according to the preset proportion of carrying the data streams by the M uplink WAN ports and the target data streams distributed to part or all of the M uplink WAN ports.

4. The method of claim 3, wherein determining the offloading policy for the available upstream WAN ports according to a preset ratio of data flows carried by the M upstream WAN ports comprises:

if M is larger than N, distributing X unsmooth uplink WAN port load data streams to the available uplink WAN ports according to a preset proportion of the available WAN port load data streams to obtain a shunting strategy of the available uplink WAN ports, wherein X is a difference value between M and N;

and if the M is equal to the N, determining the proportion of the data streams carried by the M uplink WAN ports as the shunting strategy of the available uplink WAN ports.

5. The method of claim 3, wherein determining the offloading policy for the available upstream WAN ports according to a preset ratio of data streams carried by the M upstream WAN ports and target data streams allocated to some or all of the M upstream WAN ports comprises:

if M is larger than N, allocating X unsmooth uplink WAN port load data streams to the available uplink WAN ports according to a preset proportion of the available WAN port load data streams, and allocating some or all of the allocated target data streams to the X unsmooth uplink WAN ports to the available uplink WAN ports to obtain a shunting strategy of the available uplink WAN ports, wherein X is a difference value between M and N;

and if the M is equal to the N, determining the shunting strategy of the M uplink WAN ports as the shunting strategy of the available uplink WAN ports.

6. The method according to claim 3 or 5, wherein the target number of flows comprises data flows of a predetermined source address, data flows of a predetermined destination address, data flows of a predetermined traffic type.

7. A multi-channel internet access device is characterized by comprising:

a first determining module, configured to determine available upstream WAN ports from M upstream WAN ports that are successfully networked, where the number of the available upstream WAN ports is N, M is greater than or equal to N, and both M and N are integers greater than 1;

a second determining module, configured to determine, according to a preset offloading policy for the M uplink WAN ports, an offloading policy for the available WAN ports;

and the distribution module is used for distributing the internet data flow to the available uplink WAN port according to the distribution strategy of the available WAN port.

8. The apparatus of claim 7, wherein the first determining module comprises:

the branch detection submodule is used for detecting the patency of the M uplink WAN ports respectively in a preset time period;

and the first determining submodule is used for determining the unobstructed uplink WAN port as the available uplink WAN port.

9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.

10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.

Technical Field

The embodiment of the invention relates to the field of communication, in particular to a multi-path internet access method and device.

Background

Data products (mobile phones, CPE, data cards and the like) generally only have one uplink WAN port, the uplink WAN port can be a network card enumerated after data dialing, a connected fixed network router can be used as uplink, an uplink hotspot connected through Wi-Fi can be used as uplink and the like. Although one WAN port can meet the internet access requirement of a user, a single uplink bandwidth is limited and cannot meet the application with a requirement for a high bandwidth, and on the other hand, the single WAN port cannot provide internet access service for the user when an uplink fault (such as disconnection of data connection, shutdown of an uplink router, and the like) occurs. Therefore, the need to provide multiple upstream WAN ports for users to meet the internet surfing needs is urgent.

In the related technology, mutual backup between two uplinks is realized through link detection, only one uplink is still available at the same time, compared with the traditional method, the method only increases the detection of the link smoothness, and when the first uplink cannot surf the internet, the second uplink is switched to, so that the user can surf the internet. But only solve the problem of uninterrupted internet access but not the problem of bandwidth superposition.

The related art also proposes to limit different types of applications to be routed out from different uplink interfaces, and although multiple uplinks are realized, the problem that the traffic cannot be automatically distributed to different uplinks to realize rate superposition exists.

Disclosure of Invention

The embodiment of the invention provides a multi-path internet access method and a multi-path internet access device, which are used for at least solving the problem that in the related technology, different types of applications are limited to be routed from different uplink interfaces, and the flow cannot be automatically distributed to different uplinks to realize rate superposition.

According to an embodiment of the present invention, a multi-access method is provided, including:

determining available uplink WAN ports from M uplink WAN ports which are successfully networked, wherein the number of the available uplink WAN ports is N, M is greater than or equal to N, and M and N are integers greater than 1;

determining the shunting strategy of the available WAN ports according to preset shunting strategies of the M uplink WAN ports;

and distributing the internet data flow to the available uplink WAN port according to the distribution strategy of the available WAN port.

In an exemplary embodiment, determining the available upstream WAN port from the M upstream WAN ports that are successfully networked comprises:

respectively detecting the patency of the M uplink WAN ports in a preset time period;

and determining the unobstructed uplink WAN port as the available uplink WAN port.

In an exemplary embodiment, determining the offloading policy of the available WAN port according to the preset offloading policy of the M uplink WAN ports includes:

if the shunting strategy is the proportion of the loaded data streams, determining the shunting strategy of the available uplink WAN ports according to the preset proportion of the M uplink WAN ports for loading the data streams;

and if the shunting strategy comprises the proportion of carrying data streams and target data streams distributed to part or all of the M uplink WAN ports, determining the shunting strategy of the available uplink WAN ports according to the preset proportion of carrying the data streams by the M uplink WAN ports and the target data streams distributed to part or all of the M uplink WAN ports.

In an exemplary embodiment, determining the offloading policy of the available uplink WAN ports according to a preset ratio of the M uplink WAN ports carrying data streams includes:

if M is larger than N, distributing X unsmooth uplink WAN port load data streams to the available uplink WAN ports according to a preset proportion of the available WAN port load data streams to obtain a shunting strategy of the available uplink WAN ports, wherein X is a difference value between M and N;

and if the M is equal to the N, determining the proportion of the data streams carried by the M uplink WAN ports as the shunting strategy of the available uplink WAN ports.

In an exemplary embodiment, determining the offloading policy of the available uplink WAN ports according to a preset ratio of data streams carried by the M uplink WAN ports and target data streams allocated to part or all of the M uplink WAN ports includes:

if M is larger than N, allocating X unsmooth uplink WAN port load data streams to the available uplink WAN ports according to a preset proportion of the available WAN port load data streams, and allocating some or all of the allocated target data streams to the X unsmooth uplink WAN ports to the available uplink WAN ports to obtain a shunting strategy of the available uplink WAN ports, wherein X is a difference value between M and N;

and if the M is equal to the N, determining the shunting strategy of the M uplink WAN ports as the shunting strategy of the available uplink WAN ports.

In an exemplary embodiment, the target number of flows includes a data flow of a predetermined source address, a data flow of a predetermined destination address, and a data flow of a predetermined traffic type.

According to another embodiment of the present application, there is provided a multi-access network device, including:

a first determining module, configured to determine available upstream WAN ports from M upstream WAN ports that are successfully networked, where the number of the available upstream WAN ports is N, M is greater than or equal to N, and both M and N are integers greater than 1;

a second determining module, configured to determine, according to a preset offloading policy for the M uplink WAN ports, an offloading policy for the available WAN ports;

and the distribution module is used for distributing the internet data flow to the available uplink WAN port according to the distribution strategy of the available WAN port.

In an exemplary embodiment, the first determining module includes:

the branch detection submodule is used for detecting the patency of the M uplink WAN ports respectively in a preset time period;

and the first determining submodule is used for determining the unobstructed uplink WAN port as the available uplink WAN port.

In an exemplary embodiment, the second determining module includes:

a second determining submodule, configured to determine, if the offloading policy is a ratio of carrying data streams, an offloading policy of the available uplink WAN port according to a preset ratio of carrying data streams by the M uplink WAN ports;

and a third determining submodule, configured to determine, if the offloading policy includes a ratio of carrying data streams and target data streams allocated to part or all of the M uplink WAN ports, an offloading policy of the available uplink WAN port according to a preset ratio of carrying data streams by the M uplink WAN ports and target data streams allocated to part or all of the M uplink WAN ports.

In an exemplary embodiment, the second determination submodule includes:

a first allocation unit, configured to allocate, according to a preset proportion of data streams carried by the available WAN ports, X unsmooth upstream WAN port-carried data streams to the available upstream WAN ports to obtain a splitting policy of the available upstream WAN ports, where X is a difference between M and N, if M is greater than N;

a first determining unit, configured to determine, if M is equal to N, a ratio of data streams carried by the M uplink WAN ports as a offloading policy of the available uplink WAN ports.

In an exemplary embodiment, the third determining sub-module includes:

a second determining unit, configured to, if M is greater than N, allocate, according to a preset proportion of data flows carried by the available WAN ports, X obstructed upstream WAN port-carried data flows to the available upstream WAN ports, and allocate, according to the allocation to the available upstream WAN ports, some or all of the target data flows allocated to the X obstructed upstream WAN ports, to obtain a splitting policy of the available upstream WAN ports, where X is a difference between M and N;

a second determining unit, configured to determine, if M is equal to N, the offloading policy of the M uplink WAN ports as the offloading policy of the available uplink WAN port.

In an exemplary embodiment, the target number of flows includes a data flow of a predetermined source address, a data flow of a predetermined destination address, and a data flow of a predetermined traffic type.

According to a further embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.

According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.

According to the invention, the available uplink WAN port is determined from the uplink WAN ports, the shunting strategy of the available WAN port is determined according to the preset shunting strategy of the uplink WAN ports, and the Internet data stream is distributed to the available uplink WAN ports according to the shunting strategy of the available WAN ports, so that the problems that different types of applications are limited to be routed from different uplink interfaces in the related technology, the flow cannot be automatically distributed to different uplinks to realize rate superposition can be solved, the requirement of realizing bandwidth superposition by simultaneously working the uplinks can be met, and simultaneously, the bandwidth can be distributed to different uplinks in equal proportion or according to the preset proportion of a user to realize rate superposition.

Drawings

Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a multi-path internet access method according to an embodiment of the present invention;

fig. 2 is a flow chart of a multi-way networking method according to an embodiment of the invention;

fig. 3 is a flowchart of multiple uplink simultaneous access to the internet according to an embodiment of the present invention;

fig. 4 is a block diagram of a multi-access device according to an embodiment of the present invention.

Detailed Description

Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.

It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.

The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a hardware structure block diagram of a mobile terminal of a multi-access network method according to an embodiment of the present invention, and as shown in fig. 1, the mobile terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, where the mobile terminal may further include a transmission device 106 for a communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.

The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the multi-access method in the embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to execute various functional applications and data processing, i.e., to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.

In this embodiment, a multi-access method operating in the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of the multi-access method according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:

step S202, determining available uplink WAN ports from M uplink WAN ports which are successfully networked, wherein the number of the available uplink WAN ports is N, M is greater than or equal to N, and M and N are integers greater than 1;

in an exemplary embodiment, the step S202 may specifically include: respectively detecting the patency of the M uplink WAN ports in a preset time period; and determining the unobstructed uplink WAN port as the available uplink WAN port.

Step S204, determining the shunting strategy of the available WAN ports according to the preset shunting strategies of the M uplink WAN ports;

and step S206, distributing the internet data flow to the available uplink WAN port according to the shunting strategy of the available WAN port.

Through the steps S202 to S204, an available uplink WAN port is determined from the plurality of uplink WAN ports, a offloading policy of the available WAN port is determined according to a preset offloading policy of the plurality of uplink WAN ports, and an internet data stream is allocated to the available uplink WAN port according to the offloading policy of the available WAN port, so that a problem that different types of applications are limited to be routed out from different uplink interfaces in the related art, and the traffic cannot be automatically allocated to different uplink ports to achieve rate superposition can be solved, thereby satisfying the requirement that the plurality of uplink ports simultaneously operate to achieve bandwidth superposition, and simultaneously allocating the bandwidth to different uplink ports to achieve rate superposition according to an equal proportion or a preset proportion of a user.

In an exemplary embodiment, the step S204 may specifically include:

if the splitting strategy is the proportion of carrying data streams, determining the splitting strategy of the available uplink WAN port according to the preset proportion of carrying data streams by the M uplink WAN ports, and further, if the M is larger than the N, distributing X unsmooth uplink WAN port carrying data streams to the available uplink WAN ports according to the preset proportion of carrying data streams by the available WAN ports to obtain the splitting strategy of the available uplink WAN ports, wherein the X is the difference value of the M and the N; if M is equal to N, determining the proportion of the data streams carried by the M uplink WAN ports as the shunting strategy of the available uplink WAN ports;

if the splitting strategy comprises a ratio of carrying data streams and target data streams distributed to part or all of the M uplink WAN ports, determining a splitting strategy of the available uplink WAN ports according to a preset ratio of carrying data streams of the M uplink WAN ports and the target data streams distributed to part or all of the M uplink WAN ports, and further, if the M is larger than the N, distributing X unsmooth uplink WAN port carrying data streams to the available uplink WAN ports according to a preset ratio of carrying data streams of the available WAN ports, and distributing the target data streams distributed to part or all of the X unsmooth uplink WAN ports to the available uplink WAN ports to obtain the splitting strategy of the available uplink WAN ports, wherein the X is a difference value between the M and the N; and if the M is equal to the N, determining the shunting strategy of the M uplink WAN ports as the shunting strategy of the available uplink WAN ports.

In an exemplary embodiment, the target number of flows includes a data flow of a predetermined source address, a data flow of a predetermined destination address, and a data flow of a predetermined traffic type.

Collecting a shunting strategy set by a user on a webUI, and satisfying different WAN ports to bear data streams in different proportions according to a strategy adding rule; after connecting different uplinks, adding corresponding rules such as a route, a firewall and the like according to a shunting strategy set by a user; sending different data streams to different WAN side outlets according to the added shunting rules; and the system is responsible for periodically detecting the smoothness of each uplink WAN port and reporting the detection result to the shunting module to realize dynamic control.

This embodiment realizes that multichannel goes up the net simultaneously, specifically includes:

and (3) uplink flow distribution, wherein two or more uplink WAN ports can exist at the same time, the WAN ports can be the WAN ports after LTE dialing, a connected fixed network router can be used as uplink, an uplink hotspot connected through Wi-Fi can be used as uplink, and the like. In addition, a specific application can be set to access the internet from a specific upstream WAN port, all traffic can be divided into a plurality of WAN ports (for example, each WAN port bears 25% of traffic by taking 4 WAN ports as an example), and different WAN ports can be set to bear different proportions of traffic (for example, WAN1: WAN2: WAN3: WAN 4: 4:2:1:1 by taking 4 WAN ports as an example). The method realizes the flow superposition.

And uplink smoothness detection, namely periodically detecting whether each uplink can be accessed to the internet at present, wherein the detection method can be that the equipment interacts with a certain server at the network side once through the WAN port (wide area network) for example, ping or http access and the like. If the link is detected to be unobstructed, the uplink on the road is continuously kept to bear the internet surfing service, if the link is detected to be obstructed, the uplink on the road does not bear the internet surfing service for the moment, and the proportion of the internet surfing flow borne by different WAN ports needs to be recalculated. Such as: taking the system with 4 network ports and the initial ratio of WAN1: WAN2: WAN3: WAN4 to 4:2:1:1 as an example, assuming that it is detected that the current WAN1 cannot surf the internet, the network traffic on the current WAN1 needs to be shared by the other three WAN ports, and after the shared network traffic ratio borne by the different WAN ports is WAN2: WAN3: WAN4 to 5:2.5: 2.5. Different strategies can be provided for the method for sharing the internet traffic. The link smoothness detection of all WAN ports is periodic, the WAN1 port is further detected after the WAN1 is detected to be unsmooth, and the WAN1 port continues to bear the internet traffic after the WAN1 port is detected to be normal and the uplink is detected to be unobstructed.

The present embodiment may also implement cascade connection, that is: two uplink WAN ports exist in one internet device, and the internet devices corresponding to the two uplink WAN ports can be continuously connected with the plurality of uplink WAN ports, so that bandwidth superposition is realized.

Taking the example that the client a is connected to a certain router R1, the client has 4 applications and each application has only one data stream, and the router R currently has 4 uplinks: the uplink WAN1 after data dialing is respectively connected with uplink WANs 2 and WAN3 generated by the other two uplink routers R2/R3, and is connected with the uplink WAN4 generated by the uplink hotspot router R4 through Wi-Fi, and the current router R1 is assumed to equally divide four uplink flows (namely, WAN1: WAN2: WAN3: WAN 4: 1:1:1), so that the flows applied by 4 clients are equally divided into four uplink flows.

Collecting a shunting strategy set by a user on a webUI, and satisfying different WAN ports to bear data streams in different proportions according to a strategy adding rule; after connecting different uplinks, adding corresponding rules such as a route, a firewall and the like according to a shunting strategy set by a user; sending different data streams to different WAN side outlets according to the added shunting rules; and periodically detecting the smoothness of each uplink WAN port, and reporting the detection result to realize dynamic control. Fig. 3 is a flowchart of a multi-path uplink simultaneous network access according to an embodiment of the present invention, as shown in fig. 3, including:

step S301, a shunting strategy is set, specifically, the shunting strategy can be set on the webUI, and the requirement of different WAN ports for carrying flow in different proportions is met according to strategy adding rules added by a user after corresponding uplink dialing of different WAN ports is successful;

step S302, dialing is carried out on each road from the 1 st road to the nth road, and step 3 is executed after the dialing is successful. Here, it should be noted that there are many existing uplink modes, and the wireless network can serve as uplink after LTE dialing; if the uplink is a DHCP server or a PPPoE server, the network where the wired Ethernet card is located can serve as the uplink; if the uplink is the Wi-Fi hotspot, the network where the Wi-Fi network card is located can serve as the uplink; if the USB interface is connected, the network where the USB is located can act as an uplink. Practical use of upstream includes, but is not limited to, the above-described upstream connection manner.

Step S303, periodically detecting the link smoothness and reporting the smoothness state, wherein the detection method can be a certain server of the ping public network, or a complete http or https message interaction with a certain server of the public network, or other modes.

Step S304, counting the number of the current available uplink channels.

Step S305, judging whether the upward movement is not allowed, if so, returning to the step S304, otherwise, executing the step S306;

step S306, judging whether the available uplink is more than 1 path, if not, executing step S307, otherwise, executing step S308;

step S307, the WAN port of the path bears all internet traffic;

and step S308, shunting according to the set strategy shunting strategy.

Specifically, if there is no smooth uplink, that is, each uplink cannot access the internet, at this time, no configuration is made because the internet service cannot be provided for the user, but the user waits until the internet can be accessed on a certain path or a plurality of paths; if the uplink quantity capable of surfing the Internet is 1, only one path of uplink is smooth, and the WAN port bears all Internet surfing flow at the moment; if the uplink number of the accessible network is greater than 1, it indicates that a plurality of uplink paths are unobstructed, and at this time, the offloading is performed according to the policy offloading policy set in step S301. It is to be noted here that: assuming that four uplink paths are set and the offloading policy set by the user is WAN1: WAN2: WAN3: WAN4 is 4:2:1:1, but the current detection result shows that WAN1 is not smooth, the offloading policy needs to be modified to WAN2: WAN3: WAN4 is 5:2.5:2.5, namely: the flow bearing rate of WAN2 port is changed from 20% to 50%, and the flow bearing rate of WAN3 and WAN4 port is changed from 10% to 25%. It is also noted here that: if the user sets the uplink of the message of the specific type to be WAN1 in step 1, but the message is shared among WAN2, WAN3 and WAN4 under the condition that the WAN1 port is not on the Internet. The specific allocation strategy is subject to actual needs.

Taking the example that the client a is connected to a certain router R1, the client has 4 applications and each application has only one data stream, and the router R currently has 4 uplinks: the data-dialed uplink WAN1 is respectively connected with uplink WANs 2 and 3 generated by the other two uplink routers R2/R3, the Wi-Fi is connected with the uplink WAN4 generated by the uplink hotspot router R4, a user sets the current router R1 to equally divide the four uplink traffic flows (namely, WAN1: WAN2: WAN3: WAN 4: 1:1:1), all the 4 uplink flows are successfully connected and all the link detections can be on-line in an initial state, and at this time, the 4 application traffic flows of the client are equally divided into four uplink flows. The reason that the uplink of the WAN2 cannot be accessed to the internet is found through periodic detection, and the reason that the internet cannot be accessed to the internet may be that the connection between the R1 and the R2 is disconnected or the R2 cannot be accessed to the internet, and at this time, the update traffic allocation policy is as follows: WAN1, WAN3, WAN 4-33.3%: 33.3%: 33.3 percent. The periodic detection continues, and subsequent detection that WAN2 can surf the internet normally updates the WAN again with the traffic allocation policy: WAN1: WAN2: WAN3: WAN 4: 1: 1.

Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.

In this embodiment, a multi-channel internet access device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.

Fig. 4 is a block diagram of a multi-access device according to an embodiment of the present invention, and as shown in fig. 4, the device includes

A first determining module 42, configured to determine available upstream WAN ports from M upstream WAN ports that are successfully networked, where the number of the available upstream WAN ports is N, M is greater than or equal to N, and both M and N are integers greater than 1;

a second determining module 44, configured to determine, according to the preset offloading policy for the M uplink WAN ports, the offloading policy for the available WAN ports;

and the distribution module 46 is configured to distribute the internet data stream to the available uplink WAN port according to the offloading policy of the available WAN port.

In an exemplary embodiment, the first determining module 42 includes:

the branch detection submodule is used for detecting the patency of the M uplink WAN ports respectively in a preset time period;

and the first determining submodule is used for determining the unobstructed uplink WAN port as the available uplink WAN port.

In an exemplary embodiment, the second determining module 44 includes:

a second determining submodule, configured to determine, if the offloading policy is a ratio of carrying data streams, an offloading policy of the available uplink WAN port according to a preset ratio of carrying data streams by the M uplink WAN ports;

and a third determining submodule, configured to determine, if the offloading policy includes a ratio of carrying data streams and target data streams allocated to part or all of the M uplink WAN ports, an offloading policy of the available uplink WAN port according to a preset ratio of carrying data streams by the M uplink WAN ports and target data streams allocated to part or all of the M uplink WAN ports.

In an exemplary embodiment, the second determination submodule includes:

a first allocation unit, configured to allocate, according to a preset proportion of data streams carried by the available WAN ports, X unsmooth upstream WAN port-carried data streams to the available upstream WAN ports to obtain a splitting policy of the available upstream WAN ports, where X is a difference between M and N, if M is greater than N;

a first determining unit, configured to determine, if M is equal to N, a ratio of data streams carried by the M uplink WAN ports as a offloading policy of the available uplink WAN ports.

In an exemplary embodiment, the third determining sub-module includes:

a second determining unit, configured to, if M is greater than N, allocate, according to a preset proportion of data flows carried by the available WAN ports, X obstructed upstream WAN port-carried data flows to the available upstream WAN ports, and allocate, according to the allocation to the available upstream WAN ports, some or all of the target data flows allocated to the X obstructed upstream WAN ports, to obtain a splitting policy of the available upstream WAN ports, where X is a difference between M and N;

a second determining unit, configured to determine, if M is equal to N, the offloading policy of the M uplink WAN ports as the offloading policy of the available uplink WAN port.

In an exemplary embodiment, the target number of flows includes a data flow of a predetermined source address, a data flow of a predetermined destination address, and a data flow of a predetermined traffic type.

It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.

Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.

In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.

Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.

In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.

For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.

It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.

The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:无线通信方法及相关无线通信装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类