CN108989240A - Method for controlling network flow, device, terminal device and storage medium - Google Patents

Method for controlling network flow, device, terminal device and storage medium Download PDF

Info

Publication number
CN108989240A
CN108989240A CN201810861592.4A CN201810861592A CN108989240A CN 108989240 A CN108989240 A CN 108989240A CN 201810861592 A CN201810861592 A CN 201810861592A CN 108989240 A CN108989240 A CN 108989240A
Authority
CN
China
Prior art keywords
client
flow
network
vector graphic
web vector
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
Application number
CN201810861592.4A
Other languages
Chinese (zh)
Inventor
雷辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810861592.4A priority Critical patent/CN108989240A/en
Publication of CN108989240A publication Critical patent/CN108989240A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the present application discloses a kind of method for controlling network flow and its relevant device.Wherein the method is applied to terminal device, terminal device has bridge module, for N number of client to be bridged to the network that terminal device provides, so that the network that client using terminal equipment provides, the described method includes: receiving and parsing through the network data request message that each client is sent, the purpose IP address in each network data request message is obtained;Each network data request message is sent to corresponding service server according to purpose IP address;The network packet that each service server is sent is received, and each network packet is counted with the Web vector graphic flow of each client of determination;According to the Web vector graphic flow of each client, flow control is carried out to each client.The embodiment of the present application can solve in the prior art since connection client device excessively consumes the problem of providing the flow of the terminal device of network and leading to user's economic damages of the terminal device.

Description

Method for controlling network flow, device, terminal device and storage medium
Technical field
This application involves network communication technology field more particularly to a kind of method for controlling network flow, device, terminal devices And computer readable storage medium.
Background technique
With the continuous development of mobile network and terminal device, more and more terminal devices can provide WiFi bridge at present Connection function will use terminal device as WiFi bridge, provide in the case where user can not get the preferable network condition of router Network is used to more equipment.After terminal device is connected using WiFi bridge joint by other equipment, can inevitably it encounter various each The problem of sample, such as: when connection equipment is more, since the network demand of each connection equipment is different, for example, have browsing webpage, Chat, see video or downloading etc., the flow due to seeing video or downloading consumption is larger, may result in and provides the end of network End equipment is because of increase or connection device network of the flow using excessively economic loss is caused, additionally, due to connection equipment Resource occupation is excessive, may will have a direct impact on and provide network equipment Internet normal use.
Summary of the invention
The embodiment of the present application proposes a kind of method for controlling network flow, device, terminal device and computer-readable storage medium Matter, can solve causes since connection client device excessively consumes the flow of the terminal device of offer network in the prior art The problem of user's economic damages of the terminal device.
In a first aspect, the embodiment of the present application proposes a kind of method for controlling network flow, it is applied to terminal device, the terminal Equipment has bridge module, and the bridge module is used to N number of client bridging to the network that the terminal device provides, with The network for providing N number of client using the terminal device, N are positive integer, and the method for controlling network flow includes: The network data request message that each client is sent is received and parsed through, the destination IP in each network data request message is obtained Address;Each network data request message is sent to corresponding service server according to the destination IP address, wherein The service server feeds back corresponding network packet according to the network data request message received;Receive each business service The network packet that device is sent, and the network packet sent to each service server is counted described every to determine The Web vector graphic flow of a client;And the Web vector graphic flow according to each client, to each client Carry out flow control.
According to the method for controlling network flow of the embodiment of the present application, the network data that each client is sent is received and parsed through Request message, obtains the purpose IP address in each network data request message, and according to purpose IP address by each network number It is sent to corresponding service server according to request message, and receives the network packet that each service server is sent, and to each industry The network packet that business server is sent is counted the Web vector graphic flow to determine each client, and according to each The Web vector graphic flow of client carries out flow control to each client, thus when terminal device is as bridge, respectively Traffic statistics are carried out to each connection client, and flow control is carried out to each connection client according to statistical result, to reach To the purpose of reasonable distribution network flow, it is ensured that the current network flow of terminal device does not exceed limitation, and terminal is avoided to set It is standby to use the generation for excessively leading to economic loss problem because of flow.
Second aspect, the embodiment of the present application propose a kind of control of network flow quantity device, are applied to terminal device, the terminal Equipment has bridge module, and the bridge module is used to N number of client bridging to the network that the terminal device provides, with The network for providing N number of client using the terminal device, N are positive integer, and the control of network flow quantity device includes: Network data request message processing module, the network data request message sent for receiving and parsing through each client, obtains Purpose IP address in each network data request message;Network data request message sending module, for according to the purpose Each network data request message is sent to corresponding service server by IP address, wherein the service server root Corresponding network packet is fed back according to the network data request message received;Packet-receiving module, for receiving each business The network packet that server is sent;Flow statistical module, network packet for being sent to each service server into Row counts the Web vector graphic flow to determine each client;And flow-control module, for according to described each The Web vector graphic flow of client carries out flow control to each client.
According to the control of network flow quantity device of the embodiment of the present application, the network that each client is sent is can receive and parsed Request of data message, obtains the purpose IP address in each network data request message, and according to purpose IP address by each net Network request of data message is sent to corresponding service server, and receives the network packet that each service server is sent, and right The network packet that each service server is sent is counted the Web vector graphic flow to determine each client, and according to The Web vector graphic flow of each client carries out flow control to each client, thus when terminal device is as bridge, Traffic statistics are carried out to each connection client respectively, and flow control is carried out to each connection client according to statistical result, To achieve the purpose that reasonably to distribute network flow, it is ensured that the current network flow of terminal device does not exceed limitation, avoids end End equipment is because flow uses the generation for excessively leading to economic loss problem.
The third aspect, the embodiment of the present application propose a kind of terminal device, including memory, processor and are stored in memory Computer program that is upper and can running on a processor, when the processor executes described program, realizes the application first aspect Method for controlling network flow described in embodiment.
Fourth aspect, the embodiment of the present application propose a kind of non-transitorycomputer readable storage medium, are stored thereon with meter Calculation machine program realizes control of network flow quantity side described in the application first aspect embodiment when described program is executed by processor Method.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow chart according to the method for controlling network flow of the application one embodiment;
Fig. 2 is the Application Scenarios-Example figure according to the method for controlling network flow of the embodiment of the present application;
Fig. 3 is the flow chart according to the method for controlling network flow of one specific embodiment of the application;
Fig. 4 is the structural schematic diagram of control of network flow quantity device according to an embodiment of the invention;
Fig. 5 is the structural schematic diagram of control of network flow quantity device accord to a specific embodiment of that present invention;
Fig. 6 is the structural schematic diagram of terminal device according to an embodiment of the invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings method for controlling network flow, device, terminal device and the computer of the embodiment of the present invention are described Readable storage medium storing program for executing.
Fig. 1 is the flow chart according to the method for controlling network flow of the application one embodiment.It should be noted that this hair The method for controlling network flow of bright embodiment is applied to terminal device, which can have bridge module, the bridge module It can be used for being bridged to N number of client on the network that the terminal device provides, so that N number of client is set using the terminal The standby network provided, wherein N is positive integer.Optionally, in an embodiment of the present invention, the terminal device can be movement Terminal, such as mobile phone, tablet computer, personal digital assistant etc. have the hardware device of various operating systems.
As shown in Fig. 2, the Application Scenarios-Example figure of the method for controlling network flow for the embodiment of the present invention.Wherein, terminal Equipment A can be used as WiFi bridge, is supplied to more equipment and uses WiFi networks.For example, connection equipment (such as mobile phone B, Plate C and computer D) it is linked on the wireless network of terminal device A offer, so that mobile phone B, plate C and computer D use the nothing Gauze network.It is appreciated that terminal device is allowing client (such as mobile phone B, plate C and computer D) connection to set using the terminal After the standby wireless network provided, need to be managed control using flow to client, to ensure the terminal device Flow avoids the terminal device because flow leads to economic loss using excessive in controlled range.For this purpose, this Shen Please embodiment propose a kind of method for controlling network flow.
As shown in Figure 1, the method for controlling network flow may include:
S110 receives and parses through the network data request message that each client is sent, and obtains each network data request Purpose IP address in message.
Optionally, terminal device (such as mobile terminal) can be used as WiFi bridge, so that other clients use the terminal The network that equipment provides.It is corresponding to be sent to that the network request that client is shared by WLAN bridge can be carried out transfer by terminal device Service server.Therefore, some application program in client or client sends net to service server by WLAN bridge When network request of data, client can carry out packet encapsulation to the request, and the data packet after encapsulation is asked as network data It seeks message and is put into the data packet generation hair queue of kernel (kernel) layer, and sent by the network interface card of client, eventually End equipment can receive the network data request message of client transmission by the network that itself is provided.Wherein, client is right When the request carries out packet encapsulation, packet encapsulation can be carried out to the request according to sk_buff structural body.
Terminal device, can be based on network protocol to receiving when receiving the network data request message of client transmission Network data request message parsed, obtain the purpose IP address in each network data request message received.
Each network data request message is sent to corresponding service server according to purpose IP address by S120, wherein Service server feeds back corresponding network packet according to the network data request message received.
Optionally, terminal device can be according to the purpose IP address in the network data request message each received, by institute Each network data request message is stated to be sent in corresponding service server.Service server is receiving network data request When message, corresponding network packet can be fed back, wherein may include sending the network data request report in the network packet The IP address of the client of text, so that terminal device understands which client is the network packet should be sent to.
S130 receives the network packet that each service server is sent, and to the network data that each service server is sent Packet is counted the Web vector graphic flow to determine each client.
Optionally, terminal device can receive the network packet that each service server is sent, and the network packet is put Enter in the generation hair queue in inner nuclear layer, and corresponding client is sent to by network port equipment.It for example, can be to each industry The network packet that business server is sent is parsed, and obtains the IP address information of client in each network packet, and divide Safety pin carries out the statistics of data packet number and size to the IP address information of client in each network packet, obtains institute State the Web vector graphic flow of each client.
For example, by taking network packet is made of sk_buff structural body as an example, terminal device is whenever receiving a net When network data packet, the network packet being currently received can be parsed, from the sk_buff structural body pair of the network packet As the middle IP address information for obtaining client, the IP address of the client is to be transmitted across network data to the terminal device to ask Seek the IP address of the client of message.Terminal device can carry out the number of network packet for the IP address of each client respectively With the statistics of size, to obtain the Web vector graphic flow of each client.
It is appreciated that since terminal device can support various network communications mode, for example, wireless WiFi communication mode, Mobile data communication mode, Blue-tooth communication method etc., so types of network equipment used in every kind of network communication mode is (such as indigo plant Tooth port, personal hot spot port etc.) it can be not identical.In order to the client of cordless communication network to using terminal equipment Flow is counted, and the flow packet of destination network device type can be sent to by counting, to realize the system to client traffic Meter.As an example, the network packet that can be sent to each service server parses, and obtains each network data To indicate the field of types of network equipment in packet, and judge whether the content of the field is destination network device type, when When the content of the field is the destination network device type, the IP address of client in each network packet is obtained Information.
For example, by taking network packet is made of sk_buff structural body as an example, terminal device is whenever receiving a net When network data packet, the network packet being currently received can be parsed, be obtained from the sk_buff structural body of the network packet The field of element net_device is taken, which indicates types of network equipment, the content in the field can be read, and judge the word Whether the content of section is destination network device type, such as the port softap0, if so, from the sk_buff of the network packet The IP address information of client is obtained in structural body object, so that the IP address that terminal device is directed to each client respectively carries out net The number of network data packet and the statistics of size, to obtain the Web vector graphic flow of each client.
S140 carries out flow control to each client according to the Web vector graphic flow of each client.
Optionally, terminal device can carry out flow control to each client according to the Web vector graphic flow of each client System.
As a kind of example of possible implementation, institute can be judged according to the Web vector graphic flow of each client The client for being greater than or equal to preset threshold in N number of client with the presence or absence of Web vector graphic flow is stated, the network makes if it exists It is greater than or equal to the client of preset threshold with flow, then is greater than or equal to the client of preset threshold to the Web vector graphic flow End carries out flow restriction.
For example, a preset threshold can be preset, when judging that there are Web vector graphic flows to be greater than in N number of client Or equal to the preset threshold client when, can by the Web vector graphic flow be greater than or equal to preset threshold client flow Amount limitation.For example, the Web vector graphic flow can be greater than or equal to the flow restriction of the client of preset threshold to small Mr. Yu A threshold value, the threshold value are less than the preset threshold.For another example, the Web vector graphic flow can be greater than or equal to the visitor of preset threshold Family end disconnects the network connection with the terminal device, even if the Web vector graphic flow is greater than or equal to the client of preset threshold End cannot reuse network provided by the terminal device.As a result, when terminal device uses wifi bridging functionality, unite respectively Each client traffic is counted, is more than limitation when some client uses flow, reaches the purpose of temporal limitation client connection.
As the example of alternatively possible implementation, determine that the maximum stream flow of preset each client disappears Consumption value, and according to the maximum stream flow consumption value and Web vector graphic flow of each client, judge be in N number of client The no client there are Web vector graphic flow more than or equal to its maximum stream flow consumption value, the Web vector graphic flow is big if it exists In or equal to its maximum stream flow consumption value client, then to the Web vector graphic flow more than or equal to its maximum stream flow consume The client of value carries out flow restriction.
For example, a maximum stream flow consumption value can be arranged to each client respectively, when judging to deposit in N number of client When Web vector graphic flow is greater than or equal to the client of its maximum stream flow consumption value, which can be greater than Or flow restriction is carried out equal to the client of its maximum stream flow consumption value.For example, can the Web vector graphic flow be greater than or be waited In its maximum stream flow consumption value client flow restriction to be less than some threshold value, the threshold value be less than the client it is corresponding most Big flow consumption value.For another example, the client that the Web vector graphic flow can be greater than or equal to its maximum stream flow consumption value disconnects With the network connection of the terminal device, even if the Web vector graphic flow be greater than or equal to its maximum stream flow consumption value client End cannot reuse network provided by the terminal device.As a result, when terminal device uses wifi bridging functionality, unite respectively Each client traffic is counted, is more than limitation when some client uses flow, reaches the purpose of temporal limitation client connection.
In order to enable those skilled in the art clearly understand the present invention, will be exemplified below.
It for example, can be by as net as shown in figure 3, when client connects the WLAN bridge that upper terminal device provides The terminal device of bridge distributes IP address by DHCP protocol, and the letters such as the device identification of client can also be obtained by DHCP protocol Breath, terminal device can record the IP address and client identification information (S310) that terminal device distributes to each client.Work as end When end equipment receives the network data request message of client transmission, the network data request message received can be solved Each network data to obtain the purpose IP address in network data request message, and is requested to report by analysis according to purpose IP address Text is sent to corresponding service server, wherein service server is corresponded to according to the network data request message feedback received Network packet.When receiving the network packet of service server transmission, the network packet received can be joined the team Into the generation hair queue of inner nuclear layer network interface card (S320).Judge whether current network packet to be sent is sent to target network in queue Device type (such as port softap0) (S330), is sent to the client if so, counting respectively according to the IP address of client The size and number (S340) of network packet, to complete the statistics to the Web vector graphic flow of each client.By what is counted on The Web vector graphic traffic timing of each client is stored, so that other node devices are inquired, for example, other node devices It can know which current client is most using flow by the Web vector graphic flow of the stored each client of reading, which Client is minimum etc. using flow.
Method for controlling network flow according to an embodiment of the present invention receives and parses through the network data that each client is sent Request message, obtains the purpose IP address in each network data request message, and according to purpose IP address by each network number It is sent to corresponding service server according to request message, and receives the network packet that each service server is sent, and to each industry The network packet that business server is sent is counted the Web vector graphic flow to determine each client, and according to each The Web vector graphic flow of client carries out flow control to each client, thus when terminal device is as bridge, respectively Traffic statistics are carried out to each connection client, and flow control is carried out to each connection client according to statistical result, to reach To the purpose of reasonable distribution network flow, it is ensured that the current network flow of terminal device does not exceed limitation, and terminal is avoided to set It is standby to use the generation for excessively leading to economic loss problem because of flow.
Corresponding with the method for controlling network flow that above-mentioned several embodiments provide, a kind of embodiment of the invention also provides A kind of control of network flow quantity device, since control of network flow quantity device provided in an embodiment of the present invention and above-mentioned several embodiments mention The method for controlling network flow of confession is corresponding, therefore is also applied for this implementation in the embodiment of aforementioned network flow control methods The control of network flow quantity device that example provides, is not described in detail in the present embodiment.Fig. 4 is according to an embodiment of the invention The structural schematic diagram of control of network flow quantity device.It should be noted that the control of network flow quantity device of the embodiment of the present invention can answer For terminal device, the terminal device has bridge module, and the bridge module is used to N number of client bridging to the end On the network that end equipment provides, so that the network that N number of client is provided using the terminal device, N are positive integer.Its In, in an embodiment of the present invention, the terminal device can be mobile terminal, such as mobile phone, tablet computer, individual digital help The hardware device with various operating systems such as reason.
As shown in figure 4, the control of network flow quantity device 400 may include: network data request message processing module 410, Network data request message sending module 420, packet-receiving module 430, flow statistical module 440 and flow-control module 450。
Specifically, network data request message processing module 410 is used to receive and parse through the network that each client is sent Request of data message obtains the purpose IP address in each network data request message.
Network data request message sending module 420 is for asking each network data according to the destination IP address Message is asked to be sent to corresponding service server, wherein the service server is according to the network data request message received Feed back corresponding network packet.
Packet-receiving module 430 is used to receive the network packet that each service server is sent.
Flow statistical module 440 is used to count to determine the network packet that each service server is sent The Web vector graphic flow of each client.As an example, as shown in figure 5, the flow statistical module 440 can include: Resolution unit 441 and traffic statistics unit 442.Wherein, resolution unit 441 is used for the network sent to each service server Data packet is parsed, and the IP address information of client in each network packet is obtained.Traffic statistics unit 442 is for distinguishing The statistics that data packet number and size are carried out for the IP address information of client in each network packet obtains described The Web vector graphic flow of each client.
It is appreciated that since terminal device can support various network communications mode, for example, wireless WiFi communication mode, Mobile data communication mode, Blue-tooth communication method etc., so types of network equipment used in every kind of network communication mode is (such as indigo plant Tooth port, personal hot spot port etc.) it can be not identical.In order to the client of cordless communication network to using terminal equipment Flow is counted, and the flow packet of destination network device type can be sent to by counting, to realize the system to client traffic Meter.As an example, resolution unit 441 is specifically used for: the network packet sent to each service server solves Analysis, obtains the field in each network packet to indicate types of network equipment;Whether the content for judging the field is mesh Mark types of network equipment;When the content of the field is the destination network device type, each network data is obtained The IP address information of client in packet.
Flow-control module 450 is used for the Web vector graphic flow according to each client, to each client Carry out flow control.
As a kind of example of possible implementation, flow-control module 450 is specifically used for: according to each client Web vector graphic flow, judge in N number of client with the presence or absence of Web vector graphic flow be greater than or equal to preset threshold visitor Family end;The Web vector graphic flow is greater than or equal to the client of preset threshold if it exists, then big to the Web vector graphic flow In or equal to preset threshold client carry out flow restriction.
As the example of alternatively possible implementation, flow-control module 450 is specifically used for: determining preset institute State the maximum stream flow consumption value of each client;According to the maximum stream flow consumption value and Web vector graphic stream of each client Amount judges the client for being greater than or equal to its maximum stream flow consumption value in N number of client with the presence or absence of Web vector graphic flow; The Web vector graphic flow is greater than or equal to the client of its maximum stream flow consumption value if it exists, then to the Web vector graphic flow Client more than or equal to its maximum stream flow consumption value carries out flow restriction.
Control of network flow quantity device according to an embodiment of the present invention receives and parses through the network data that each client is sent Request message, obtains the purpose IP address in each network data request message, and according to purpose IP address by each network number It is sent to corresponding service server according to request message, and receives the network packet that each service server is sent, and to each industry The network packet that business server is sent is counted the Web vector graphic flow to determine each client, and according to each The Web vector graphic flow of client carries out flow control to each client, thus when terminal device is as bridge, respectively Traffic statistics are carried out to each connection client, and flow control is carried out to each connection client according to statistical result, to reach To the purpose of reasonable distribution network flow, it is ensured that the current network flow of terminal device does not exceed limitation, and terminal is avoided to set It is standby to use the generation for excessively leading to economic loss problem because of flow.
In order to realize above-described embodiment, the invention also provides a kind of terminal devices.
Fig. 6 is the structural schematic diagram of terminal device according to an embodiment of the invention.As shown in fig. 6, the terminal device 600 may include: memory 610, processor 620 and be stored in the calculating that can be run on memory 610 and on processor 620 Machine program 630 when processor 620 executes described program 630, realizes network flow described in any of the above-described a embodiment of the present invention Control method.
In order to realize above-described embodiment, the invention also provides a kind of non-transitorycomputer readable storage mediums, thereon It is stored with computer program, network flow described in any of the above-described a embodiment of the present invention is realized when described program is executed by processor Amount control method.
In the description of the present invention, it is to be understood that, term " first ", " second " are used for description purposes only, and cannot It is interpreted as indication or suggestion relative importance or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In the description of the present invention, " multiple " It is meant that at least two, such as two, three etc., unless otherwise specifically defined.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention Type.

Claims (12)

1. a kind of method for controlling network flow, which is characterized in that be applied to terminal device, the terminal device has bridge joint mould Block, the bridge module is used to N number of client bridging to the network that the terminal device provides, so that N number of client The network provided using the terminal device is held, N is positive integer, and the method for controlling network flow includes:
The network data request message that each client is sent is received and parsed through, the mesh in each network data request message is obtained IP address;
Each network data request message is sent to corresponding service server according to the destination IP address, wherein The service server feeds back corresponding network packet according to the network data request message received;
The network packet that each service server is sent is received, and the network packet sent to each service server carries out Count the Web vector graphic flow to determine each client;And
According to the Web vector graphic flow of each client, flow control is carried out to each client.
2. method for controlling network flow as described in claim 1, which is characterized in that described to be sent to each service server Network packet counted the Web vector graphic flow to determine each client, comprising:
The network packet sent to each service server parses, and obtains the IP of client in each network packet Address information;
The statistics of data packet number and size is carried out for the IP address information of client in each network packet respectively, Obtain the Web vector graphic flow of each client.
3. method for controlling network flow as claimed in claim 2, which is characterized in that described to be sent to each service server Network packet parsed, obtain the IP address information of client in each network packet, comprising:
The network packet sent to each service server parses, and obtains in each network packet to indicate net The field of network device type;
Whether the content for judging the field is destination network device type;
When the content of the field is the destination network device type, client in each network packet is obtained IP address information.
4. method for controlling network flow as described in claim 1, which is characterized in that the net according to each client Network uses flow, carries out flow control to each client, comprising:
According to the Web vector graphic flow of each client, judge in N number of client with the presence or absence of Web vector graphic flow More than or equal to the client of preset threshold;
The Web vector graphic flow is greater than or equal to the client of preset threshold if it exists, then is greater than to the Web vector graphic flow Or flow restriction is carried out equal to the client of preset threshold.
5. method for controlling network flow as described in claim 1, which is characterized in that the net according to each client Network uses flow, carries out flow control to each client, comprising:
Determine the maximum stream flow consumption value of preset each client;
According to the maximum stream flow consumption value and Web vector graphic flow of each client, judge in N number of client whether There are the clients that Web vector graphic flow is greater than or equal to its maximum stream flow consumption value;
The Web vector graphic flow is greater than or equal to the client of its maximum stream flow consumption value if it exists, then to the Web vector graphic The client that flow is greater than or equal to its maximum stream flow consumption value carries out flow restriction.
6. a kind of control of network flow quantity device, which is characterized in that be applied to terminal device, the terminal device has bridge joint mould Block, the bridge module is used to N number of client bridging to the network that the terminal device provides, so that N number of client The network provided using the terminal device is held, N is positive integer, and the control of network flow quantity device includes:
Network data request message processing module, the network data request message sent for receiving and parsing through each client, Obtain the purpose IP address in each network data request message;
Network data request message sending module, for according to the destination IP address by each network data request message It is sent to corresponding service server, wherein the service server is according to the network data request message feedback pair received The network packet answered;
Packet-receiving module, the network packet sent for receiving each service server;
Flow statistical module, the network packet for sending to each service server are counted described every to determine The Web vector graphic flow of a client;And
Flow-control module flows each client for the Web vector graphic flow according to each client Amount control.
7. control of network flow quantity device as claimed in claim 6, which is characterized in that the flow statistical module includes:
Resolution unit, the network packet for sending to each service server parse, and obtain each network data The IP address information of client in packet;
Traffic statistics unit, the IP address information for being directed to client in each network packet respectively carry out data packet The statistics of number and size obtains the Web vector graphic flow of each client.
8. control of network flow quantity device as claimed in claim 7, which is characterized in that the resolution unit is specifically used for:
The network packet sent to each service server parses, and obtains in each network packet to indicate net The field of network device type;
Whether the content for judging the field is destination network device type;
When the content of the field is the destination network device type, client in each network packet is obtained IP address information.
9. control of network flow quantity device as claimed in claim 6, which is characterized in that the flow-control module is specifically used for:
According to the Web vector graphic flow of each client, judge in N number of client with the presence or absence of Web vector graphic flow More than or equal to the client of preset threshold;
The Web vector graphic flow is greater than or equal to the client of preset threshold if it exists, then is greater than to the Web vector graphic flow Or flow restriction is carried out equal to the client of preset threshold.
10. control of network flow quantity device as claimed in claim 6, which is characterized in that the flow-control module is specifically used for:
Determine the maximum stream flow consumption value of preset each client;
According to the maximum stream flow consumption value and Web vector graphic flow of each client, judge in N number of client whether There are the clients that Web vector graphic flow is greater than or equal to its maximum stream flow consumption value;
The Web vector graphic flow is greater than or equal to the client of its maximum stream flow consumption value if it exists, then to the Web vector graphic The client that flow is greater than or equal to its maximum stream flow consumption value carries out flow restriction.
11. a kind of terminal device including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, which is characterized in that when the processor executes described program, realize the net as described in any one of claims 1 to 5 Network flow control methods.
12. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the journey The method for controlling network flow as described in any one of claims 1 to 5 is realized when sequence is executed by processor.
CN201810861592.4A 2018-08-01 2018-08-01 Method for controlling network flow, device, terminal device and storage medium Pending CN108989240A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810861592.4A CN108989240A (en) 2018-08-01 2018-08-01 Method for controlling network flow, device, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810861592.4A CN108989240A (en) 2018-08-01 2018-08-01 Method for controlling network flow, device, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN108989240A true CN108989240A (en) 2018-12-11

Family

ID=64551989

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810861592.4A Pending CN108989240A (en) 2018-08-01 2018-08-01 Method for controlling network flow, device, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN108989240A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109889401A (en) * 2019-01-22 2019-06-14 金蝶软件(中国)有限公司 Flow statistical method, device, computer equipment and storage medium
CN110475133A (en) * 2019-08-15 2019-11-19 天脉聚源(杭州)传媒科技有限公司 A kind of authority distributing method, device and storage medium
CN111356166A (en) * 2018-12-20 2020-06-30 福建雷盾信息安全有限公司 Flow monitoring method
CN111404774A (en) * 2020-03-11 2020-07-10 腾讯云计算(北京)有限责任公司 Data monitoring method, device, equipment and storage medium
CN112751781A (en) * 2019-10-31 2021-05-04 阿里巴巴集团控股有限公司 Method, device and equipment for processing flow data and computer storage medium
CN113890896A (en) * 2021-09-24 2022-01-04 中移(杭州)信息技术有限公司 Network access method, communication device, and computer-readable storage medium
CN114567600A (en) * 2022-01-27 2022-05-31 深圳市潮流网络技术有限公司 Traffic management method and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060198383A1 (en) * 2005-03-04 2006-09-07 Delta Network, Inc. Wireless adaptor and method for transmitting and receiving message
US20080225737A1 (en) * 2007-03-15 2008-09-18 Cisco Technology, Inc. Dynamic Rate Limiting in Wireless Mesh Networks
CN103945410A (en) * 2014-03-28 2014-07-23 宇龙计算机通信科技(深圳)有限公司 Terminal device and flow control method thereof
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN105516026A (en) * 2015-11-20 2016-04-20 小米科技有限责任公司 Hot spot networking control method and device
CN106162594A (en) * 2015-04-20 2016-11-23 Tcl集团股份有限公司 WIFI hot spot flow statistical method and system based on IPtables
CN108092911A (en) * 2017-11-07 2018-05-29 深圳市金立通信设备有限公司 A kind of method, terminal and computer-readable medium for managing data traffic

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060198383A1 (en) * 2005-03-04 2006-09-07 Delta Network, Inc. Wireless adaptor and method for transmitting and receiving message
US20080225737A1 (en) * 2007-03-15 2008-09-18 Cisco Technology, Inc. Dynamic Rate Limiting in Wireless Mesh Networks
CN103945410A (en) * 2014-03-28 2014-07-23 宇龙计算机通信科技(深圳)有限公司 Terminal device and flow control method thereof
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN106162594A (en) * 2015-04-20 2016-11-23 Tcl集团股份有限公司 WIFI hot spot flow statistical method and system based on IPtables
CN105516026A (en) * 2015-11-20 2016-04-20 小米科技有限责任公司 Hot spot networking control method and device
CN108092911A (en) * 2017-11-07 2018-05-29 深圳市金立通信设备有限公司 A kind of method, terminal and computer-readable medium for managing data traffic

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111356166A (en) * 2018-12-20 2020-06-30 福建雷盾信息安全有限公司 Flow monitoring method
CN109889401A (en) * 2019-01-22 2019-06-14 金蝶软件(中国)有限公司 Flow statistical method, device, computer equipment and storage medium
CN109889401B (en) * 2019-01-22 2021-03-16 金蝶软件(中国)有限公司 Flow statistical method, device, computer equipment and storage medium
CN110475133A (en) * 2019-08-15 2019-11-19 天脉聚源(杭州)传媒科技有限公司 A kind of authority distributing method, device and storage medium
CN110475133B (en) * 2019-08-15 2023-11-03 北京拉近众博科技有限公司 Authority distribution method, device and storage medium
CN112751781A (en) * 2019-10-31 2021-05-04 阿里巴巴集团控股有限公司 Method, device and equipment for processing flow data and computer storage medium
CN111404774A (en) * 2020-03-11 2020-07-10 腾讯云计算(北京)有限责任公司 Data monitoring method, device, equipment and storage medium
CN113890896A (en) * 2021-09-24 2022-01-04 中移(杭州)信息技术有限公司 Network access method, communication device, and computer-readable storage medium
CN114567600A (en) * 2022-01-27 2022-05-31 深圳市潮流网络技术有限公司 Traffic management method and related equipment
CN114567600B (en) * 2022-01-27 2024-04-16 深圳市潮流网络技术有限公司 Traffic management method and related equipment

Similar Documents

Publication Publication Date Title
CN108989240A (en) Method for controlling network flow, device, terminal device and storage medium
CN109150997A (en) Internet behavior monitoring method, device, terminal device and storage medium
CN103036926B (en) Business push system and method
CN103634224B (en) The method and system of data transmission in network
CN108667861A (en) By browser to the method, system and server of device real-time monitoring
CN109684111A (en) Information push method, message push system and computer readable storage medium
CN109743142A (en) Information communication method and device
CN106549878A (en) A kind of service shunting method and device
CN102231739B (en) To code method and device
CN109769023A (en) A kind of data transmission method, associated server and storage medium
EP3310093B1 (en) Traffic control method and apparatus
CN109194578B (en) Method and device for opening private line service
CN104363257B (en) A kind of user interface data method for refreshing and equipment
CN107959696A (en) A kind of daily record bill processing method and system
CN105745911B (en) For using subscription profile repository to provide method, system and the computer-readable medium of real-time data network use information
CN109120541A (en) Limit method, apparatus, terminal device and the storage medium of network speed
CN101472290B (en) Flow control method and apparatus for mobile data business platform performance test
AU2020318892B2 (en) Systems and methods for providing bidirectional forwarding detection with performance routing measurements
CN109729016A (en) A kind of file transmitting method, equipment and computer readable storage medium
CN111431921B (en) Configuration synchronization method
CN105024920B (en) A kind of transmission method and equipment of group chat information
CN110401643A (en) Publish synchronous method, device, electronic equipment and the storage medium of behavior
CN108595370A (en) A kind of multi-core processor and message processing method
CN105704057B (en) The method and apparatus for determining the type of service of burst port congestion packet loss
CN109005122A (en) File transmitting method, device and the network equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181211