CN113271259B - Flow control system, method, device and equipment - Google Patents

Flow control system, method, device and equipment Download PDF

Info

Publication number
CN113271259B
CN113271259B CN202110630653.8A CN202110630653A CN113271259B CN 113271259 B CN113271259 B CN 113271259B CN 202110630653 A CN202110630653 A CN 202110630653A CN 113271259 B CN113271259 B CN 113271259B
Authority
CN
China
Prior art keywords
flow
module
data
user terminal
user
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.)
Active
Application number
CN202110630653.8A
Other languages
Chinese (zh)
Other versions
CN113271259A (en
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.)
Advanced New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN202110630653.8A priority Critical patent/CN113271259B/en
Publication of CN113271259A publication Critical patent/CN113271259A/en
Application granted granted Critical
Publication of CN113271259B publication Critical patent/CN113271259B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/391Modelling the propagation channel
    • H04B17/3912Simulation models, e.g. distribution of spectral power density or received signal strength indicator [RSSI] for a given geographic region
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • 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/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2475Traffic characterised by specific attributes, e.g. priority or QoS for supporting traffic characterised by the type of applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Electromagnetism (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the specification discloses a flow control system, a flow control method, a flow control device and flow control equipment. Aiming at user terminals of different operating systems (such as an iOS system or an Android system), according to the authority (such as Root authority and non-Root authority) of a user in the user terminal, a cross-platform support library adapts a corresponding flow acquisition module to the user terminal, and controls acquired flows (such as time delay, packet loss, disorder and the like).

Description

Flow control system, method, device and equipment
The application relates to a divisional application of Chinese patent application CN108011835A, the application date of the original application is as follows: 10 months and 30 days 2017; the application number is: 201711039848.5; the application is named as follows: flow control systems, methods, apparatus, and devices.
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a flow control system, a flow control method, a flow control device, and a flow control apparatus.
Background
The user terminal continuously receives or transmits data packets to form data traffic.
In the prior art, in order to ensure and improve user experience, a flow control tool is usually developed for a user system to obtain all the flows of a user terminal, and then flow control is performed to perform network environment simulation test.
Based on this, a more adaptable flow control scheme is needed.
Disclosure of Invention
The embodiments of the present disclosure provide a flow control system, method, apparatus, and device for solving the following problems: to provide a more adaptable flow control scheme.
Based on this, the embodiments of the present disclosure provide a flow control system, including an adaptation module, a flow acquisition module, and a flow control module,
the adaptation module adapts the corresponding flow acquisition module to the user terminal according to the authority of the user at the user terminal aiming at the user terminals of different operating systems, wherein the authority is Root authority or non-Root authority;
the flow acquisition module acquires the data flow of the user terminal;
the flow control module is used for controlling the acquired data flow and generating the controlled data flow, and the control comprises at least one of simulating data flow time delay, packet loss or disorder.
Meanwhile, the embodiment of the present disclosure further provides a flow control method, including:
aiming at user terminals of different operating systems, adapting corresponding flow acquisition modules to the user terminals according to the authority of a user in the user terminals, wherein the authority is Root authority or non-Root authority;
Acquiring the data traffic of the user terminal through the traffic acquisition mode;
and controlling the acquired data flow to generate the controlled data flow, wherein the control comprises at least one of simulating data flow time delay, packet loss or disorder.
Correspondingly, the embodiment of the present specification further provides a flow control device, including:
the adaptation module is used for adapting the corresponding flow acquisition module to the user terminal according to the authority of the user at the user terminal aiming at the user terminals of different operating systems, wherein the authority is Root authority or non-Root authority;
the flow acquisition module acquires the data flow of the user terminal;
and the flow control module is used for controlling the acquired data flow and generating the controlled data flow, wherein the control comprises at least one of simulating data flow time delay, packet loss or disorder.
Correspondingly, the embodiment of the present specification further provides a flow control device, including:
a memory storing a flow control program;
and a processor which calls a flow control program in the memory and executes:
aiming at user terminals of different operating systems, adapting corresponding flow acquisition modules to the user terminals according to the authority of a user in the user terminals, wherein the authority is Root authority or non-Root authority;
Acquiring the data traffic of the user terminal through the traffic acquisition mode;
and controlling the acquired data flow to generate the controlled data flow, wherein the control comprises at least one of simulating data flow time delay, packet loss or disorder.
Correspondingly, embodiments of the present specification also provide a non-volatile computer storage medium storing computer executable instructions arranged to:
aiming at user terminals of different operating systems, adapting corresponding flow acquisition modules to the user terminals according to the authority of a user in the user terminals, wherein the authority is Root authority or non-Root authority;
acquiring the data traffic of the user terminal through the traffic acquisition mode;
and controlling the acquired data flow to generate the controlled data flow, wherein the control comprises at least one of simulating data flow time delay, packet loss or disorder.
The above-mentioned at least one technical scheme that this description embodiment adopted can reach following beneficial effect:
aiming at user terminals of different operating systems (such as an iOS system or an Android system), according to the authority (such as Root authority and non-Root authority) of a user in the user terminal, a cross-platform support library adapts a corresponding flow acquisition module to the user terminal, and controls acquired flows (such as time delay, packet loss, disorder and the like).
The packet capturing modes with different authorities are adaptively accessed according to the types of the user terminal operating systems, so that the scheme can support user terminals with various different operating systems (such as an iOS or Android system) or different user authorities (such as Root authorities and non-Root authorities), and the acquired flow is subjected to various controls (such as time delay, disorder or packet loss simulation) by adopting a flow control model, so that the scheme has wider adaptability. In addition, the flow control parameters are used for controlling the flow control model, and various scenes are customized through the parameters, so that simulation tests are carried out on various weak network environments or actual scenes (such as scenes in an elevator, a moving train, a mountain and the like), and the simulation test is more accurate and convenient; and moreover, the flow control can be performed aiming at the APP appointed by the user, so that the purity of the flow is ensured, and the testing accuracy is improved.
Drawings
FIG. 1 is a schematic diagram of an architecture involved in a flow control system according to an embodiment of the present disclosure;
FIG. 2 is a modular schematic diagram of an exemplary cross-platform support library provided by embodiments of the present disclosure;
FIG. 3 is a schematic diagram of a flow control module according to an embodiment of the present disclosure;
Fig. 4 is a schematic diagram of a Root flow obtaining module provided in an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a non-Root flow obtaining module provided in an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating steps performed by the flow control system according to an embodiment of the present disclosure;
FIG. 7 is a schematic flow chart of a flow control method according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a flow control device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present application based on the embodiments herein.
The embodiments of the present specification will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic architecture diagram of a flow control system according to an embodiment of the present disclosure, including an adaptation module 101, a flow obtaining module 103, and a flow control module 105.
The adaptation module 101 adapts a corresponding flow acquisition module 103 to user terminals of different operating systems according to the authority of a user in the user terminals, and the flow acquisition module 103 acquires the data flow of the user terminals; the flow control module 105 controls the obtained data flow to generate a controlled data flow, where the control includes at least one of simulating data flow delay, packet loss or disorder.
The aforementioned different rights include at least having Root rights (super user rights) and not having Root rights. The user terminal may be a mobile terminal or a fixed terminal, and based on personal selection of a user, the operating system may include any one of iOS system, android system, linux system, unix system, windows system or MacOS system, and of course, may be extended to other types of systems as required, which are not listed here.
The corresponding flow obtaining module 103 includes a Root flow obtaining module and/or a non-Root flow obtaining module corresponding to the authority of the user. Specifically, according to different rights of a user on a user terminal, there are generally multiple preset packet capturing modes (when the object is obtained as data packets that appear one by one, the traffic obtaining mode may also be referred to as a packet capturing mode), where each packet capturing mode corresponds to one packet capturing module, and the packet capturing module is accessed into the user terminal in a modularized form for user selection. In the user terminal, the user rights are different, and a common situation is that the user has Root rights or non-Root rights.
As an exemplary embodiment, the aforementioned system is implemented in the form of a cross-platform support library, which may be used in user terminals of different operating systems. The embodiment of the present disclosure provides an architecture schematic of a cross-platform support library, as shown in fig. 2, and fig. 2 is a schematic modularized diagram of an exemplary cross-platform support library provided by the embodiment of the present disclosure.
When the user has Root rights, the flow obtaining module 103 intercepts data flow in series from the kernel protocol stack. For example, based on Netfilter module, detection points (for example, may be set by a HOOK function) are placed at some positions of the kernel protocol stack, and some processing functions are registered on each detection point to process, so that when the traffic passes through the detection point, the traffic can be obtained, i.e. the data traffic of the user terminal is obtained from the kernel protocol stack in a tandem manner.
When the user is a non-Root right, the traffic acquisition module 103 establishes a virtual private network (Virtual Private Network, VPN) and acquires data traffic through a port of the VPN. In other words, the traffic acquisition module 103 establishes a VPN at the user terminal, proxies the traffic interaction process between the user terminal and the outside, and performs proxy packet capturing through the port of the VPN.
For example, according to the type of the user terminal operating system (such as an iOS system or an Android system), adaptively accessing, establishing a VPN locally in the user terminal, acquiring external data traffic of each application program APP on the user terminal through a VPN port, and writing back data to each APP; meanwhile, the connection of the user terminal to the outside is established, the received data traffic of each APP to the outside is analyzed, and the data traffic is sent to the outside.
After the data flow is obtained, the flow control module 105 controls the data flow through a preset flow control algorithm. Specifically, the flow control module 105 includes an algorithm module and a control execution module. The algorithm module determines a control mode for each data packet according to an algorithm adopted by the algorithm module, wherein the algorithm comprises control parameters, and the control parameters comprise a time delay control parameter, a packet loss rate control parameter or a disorder rate control parameter. The control execution module executes the control mode of the data flow determined by the algorithm module, and comprises a time delay control module, a packet loss control module or an out-of-order control module which respectively execute operations such as time delay, discarding or out-of-order on the data packet.
For example, the algorithm module processes the data Traffic by using a Markov Chain (Markov Chain) probability model, or a Traffic Control (TC) model in a Linux kernel, determines whether each data packet of the data Traffic needs to be controlled, and how the data packet should be controlled to simulate the randomness of network transmission in a real network environment. The Markov chain probability model is a random simulation algorithm, in the algorithm, the future state distribution of the data packet only depends on the present and is irrelevant to the past, the control modes of time delay, packet loss rate, disorder and the like of the data packet are judged by adopting the algorithm, and the control modes are executed by an execution module, so that the network environment in reality can be simulated more truly. A TC model in a Linux operating system is mainly characterized in that a queue is established at a flow output port, and control such as flow limiting, scheduling, discarding and the like is performed on data packets in the queue so as to simulate phenomena such as time delay, packet loss, disorder and the like in a real environment.
Further, the system also comprises a user-defined module for users to specify the control parameters; and the control module executes the control mode of the algorithm module on the data flow according to the control parameters designated by the user. Namely, the user can define control parameters such as delay time, packet loss probability, disorder probability and the like to simulate various real network environments with different strengths, so that simulation tests such as delay or packet loss and the like can be more accurately performed according to service requirements.
Further, the system also comprises a scene simulation module, wherein the control mode of the algorithm module on the data flow is determined through preset control parameters; and the control execution module is used for executing the determined control mode of the algorithm module on the data flow.
In other words, the flow control algorithm is debugged by adjusting the parameters, so that the flow transmission result close to the actual specific network environment can be obtained, and the simulation can be realized by setting certain control parameters for each actual scene (such as valleys, elevators and the like). And displaying the control parameters corresponding to the scenes in a modularized form for selection by a user.
For example, by setting a large disorder probability, simulating a fast moving train environment; simulating the elevator environment in ascending or descending by setting larger time delay time; by setting a larger packet loss probability, weak network environments such as valleys or basements and the like are simulated. As an application example, the embodiment of the present disclosure provides a schematic diagram of a flow control module, as shown in fig. 3. Various scene modes are determined by manually specifying flow control parameters, so that various scene modes (such as mountains, valleys, moving trains and the like) are provided for network testing by a user, and the user only needs to select one key without wasting time to simulate various scenes. Therefore, the simulation test is more convenient, and the user experience is improved.
Further, the flow control module 105 controls the obtained data flow by adjusting a flow control parameter of a flow control algorithm, where the flow control parameter is obtained according to the flow control algorithm and is used for controlling the data flow by the flow control algorithm, and the flow control algorithm at least includes any one of a delay parameter, a packet loss probability parameter, or a disorder probability parameter.
Corresponding flow control parameters (at least comprising any one of time delay control parameters, packet loss probability control parameters or disorder probability control parameters) are obtained through a flow control algorithm, and further when the data flow is controlled through a flow control model, corresponding control can be achieved only by adjusting the parameters.
Further, the flow control module 105 controls the acquired data flow through a specific scene mode, wherein the specific scene mode is predetermined by a specified flow control parameter.
The flow control model can be obtained by adjusting parameters to debug the flow control model, and the flow control model is close to a specific scene mode in practice. That is, various scene modes are determined by manually specifying flow control parameters, and various scene modes (such as mountains, valleys, moving trains, etc.) are provided for the user to perform network test, and the user only needs to select one key without wasting time to simulate various scenes.
In the above examples, only the flow control parameters having a large influence on each scene are shown, and in practical application, a certain scene mode is generally determined by a plurality of flow control parameters, and the specific parameter values can be determined manually by adjusting the flow control parameters to change the simulation result of the flow control model, when the simulation result is compared with the experiment, the parameter values corresponding to the scene are determined manually.
Before the obtained data traffic is controlled by adopting a preset traffic control model, the obtained data traffic comprises all data packets generated when the user terminal interacts with the outside, obviously, the data traffic is usually mixed with data packets of a plurality of APP, and based on the data traffic, the related data packets of each APP are required to be separated to improve the purity degree of the data traffic, and only the traffic interested by the user is reserved.
Based on this, the flow control system further comprises a flow identification module: and acquiring data traffic belonging to the appointed APP according to the setting information of the user terminal, wherein the setting information of the user terminal comprises the information of the appointed APP. That is, the data traffic belonging to a given APP includes only the data packets generated when the APP interacts with the outside world, and does not include the data packets of other APPs.
The setting information of the user terminal may be default designation of one or more APP, or may provide a plurality of APP running on the user terminal for user selection designation. In other words, the obtained traffic is identified and filtered according to the setting information of the user terminal, and only the data traffic belonging to the specified application is reserved.
It should be noted that the designated application program APP may be one or more. When a user designates a plurality of APPs, each designated APP corresponds to a respective set of related data traffic. In addition, the process of specifying the APP and selecting the traffic acquisition module is typically performed prior to acquiring traffic. The user can specify the APP first and then select the flow acquisition module; or the flow acquisition module can be selected first, and then the APP is designated.
In a specific embodiment, the flow identification module may acquire, by means of port matching, a data flow related to the APP specified by the user. Specifically, a data packet containing a port number is acquired through a preset flow acquisition module; matching the port number with flow port information provided by an operating system of the user terminal to obtain an APP identifier corresponding to the port number, wherein the flow port information provided by the operating system of the user terminal comprises a corresponding relationship between the port number and the APP identifier; and determining the data flow related to the appointed APP according to the data packet containing the port number corresponding to the appointed APP identification.
For example, under a Linux/Unix system, a corresponding relationship between a port number and an APP unique identifier is stored in a tcp file under a "/proc/net" directory in the system; and storing the corresponding relation between the port number and the unique identifier of the APP in the Windows system through a flow port table. The port number of each data packet in the flow is obtained, namely, the APP identifier corresponding to the port number can be obtained in a matching mode, so that the data flow belonging to the APP is obtained.
In another specific embodiment, the flow identification module may obtain, by using a packet detection technology, a data flow related to the designated APP. Specifically, data traffic is acquired through a preset traffic acquisition mode; identifying the content of the data flow to obtain the data flow belonging to the appointed APP; the content of the data traffic includes one or more of a transport protocol, a port number, an IP address, a unique address identifier URL, or a data payload of the data traffic.
Since different APPs often rely on different protocols, the different protocols have their special features, which may be a specific port, a specific string or a specific server IP, the APP may also generate a uniform resource locator (Uniform Resource Locator, URL) and specific interaction content (e.g. when the APP requests a download from the server) during interaction with the outside world, etc. Based on this, feature recognition techniques may be employed to determine the application to which the data packet corresponds by detecting relevant features in the data traffic. For example, deep packet inspection (Deep Packet Inspection, DPI) is used to identify the data payload of a data packet to determine the application to which the data packet belongs.
Through identifying the flow of the user terminal, the specified packet grabbing can be carried out according to actual needs, only the data flow belonging to the APP interested by the user is reserved, the purity of the flow is improved, and more accurate basis is provided for subsequent work.
The foregoing method describes how to identify data traffic belonging to APP of interest to a user, and it should be noted that one APP may use multiple services at the same time, and the service of interest to the user can also be identified by the same principle (port number matching or deep packet identification), so that the attribution of the data traffic is further refined, and the specific method is similar to the foregoing method and will not be repeated.
When a user has previously designated a plurality of APPs, each APP has a respective associated set of data traffic. The flow is acquired through the appointed application, so that the purity of the flow is ensured, and the testing accuracy is improved. When the flow control is performed for the appointed application, the flow of other unspecified applications cannot change, and the comparison is convenient for the user.
In the process of flow acquisition, different flow acquisition modes can be combined with flow identification. As an exemplary implementation manner, the embodiment of the present disclosure provides a schematic diagram of a Root flow obtaining module, as shown in fig. 4; the embodiment of the present disclosure further provides a schematic diagram of a non-Root flow obtaining module, as shown in fig. 5.
The foregoing flow control system may be in the form of a plug-in or flow control tool, adaptable to access the user terminal platform. After having accessed the user terminal platform, as an exemplary implementation, in a practical application scenario, the flow control system may perform the following steps, as shown in fig. 6, where fig. 6 is a flow chart illustrating the steps performed by the flow control system provided in the embodiment of the present specification, including:
s601, opening a packet grabbing tool, initializing a system and prompting a flow acquisition mode;
s603, a user selects a flow acquisition mode and designates an application and a scene mode to be grabbed;
s605, according to the setting of a user, adapting to start a cross-platform support library;
s607, judging whether the local networking information file in the system can be read; if yes, identifying data traffic according to the port and the application UID; if not, carrying out DPI identification on the data flow;
s609, determining a control mode of the flow control model on the data packet according to the parameters of the scene mode;
s611, judging whether to control the data packet according to the attribution of the data packet identified in S607 and the application required to be grabbed specified in S603; if yes, executing the control mode determined in S609 on the data packet, and writing back to the network card; if not, directly writing back to the network card.
The packet grabbing modes with different authorities are adaptively accessed according to the types of the user terminal operating systems, so that the scheme can support user terminals with various different operating systems (such as an iOS or Android system) or different user authorities (such as Root authorities and non-Root authorities), and the acquired traffic is subjected to various controls (such as time delay, disorder or packet loss) by adopting a traffic control algorithm, so that the scheme has wider adaptability. In addition, the flow control parameters are used for controlling a flow control algorithm, and various scenes are customized through the parameters, so that simulation tests are carried out on various weak network environments or actual scenes (such as scenes in an elevator, a moving train, a mountain and the like), and the simulation test is more convenient; and moreover, the flow control can be performed aiming at the APP appointed by the user, so that the purity of the flow is ensured, and the testing accuracy is improved.
Based on the same concept, the present invention further provides a flow control method, as shown in fig. 7, where fig. 7 is a flow chart of the flow control method provided in the embodiment of the present specification, including:
s701, aiming at user terminals of different operating systems, adapting corresponding flow acquisition modes to the user terminals according to the authority of a user in the user terminals, wherein the authority is Root authority or non-Root authority;
S703, acquiring the data flow of the user terminal through the flow acquisition mode;
and S705, controlling the obtained data flow to generate the controlled data flow, wherein the control comprises at least one of simulating data flow time delay, packet loss or disorder.
Further, in S703, acquiring the data traffic of the user terminal in the traffic acquisition mode includes:
when the authority of the user at the user terminal is Root authority, acquiring data flow from a kernel protocol stack in a serial connection mode; or alternatively, the process may be performed,
when the authority of the user at the user terminal is a non-Root authority, a virtual private network VPN is established, data traffic is obtained through a port of the VPN, and the VPN is used for proxy traffic interaction between the user terminal and the outside world.
Further, the establishing a VPN, acquiring data traffic through a port of the VPN, includes: according to the type of the user terminal platform, adapting and establishing VPN; the method comprises the steps of obtaining external data flow of each application program APP on a user terminal through a VPN port, and writing data back to each APP; and establishing the connection of the user terminal to the outside, analyzing the received data traffic of each application program APP to the outside, and sending the data traffic to the outside through the VPN port.
Further, in S705, the step of controlling the obtained data traffic to generate a controlled data traffic includes: and controlling the acquired data flow by adjusting flow control parameters of a flow control algorithm, wherein the flow control parameters are obtained according to the flow control algorithm and are used for controlling the data flow by the flow control model, and at least comprise any one of delay parameters, packet loss probability parameters or disorder probability parameters.
Further, the controlling the obtained data flow by adjusting the flow control parameter of the flow control algorithm includes: and controlling the acquired data flow through a specific scene mode, wherein the specific scene mode is predetermined by a specified flow control parameter.
Further, before the obtained data traffic is controlled by adopting the preset traffic control model, the method further includes S707, according to the setting information of the user terminal, obtaining the data traffic belonging to the designated application program APP, where the setting information of the user terminal includes the information of the designated APP.
Further, the step S707 of obtaining, according to the instruction of the user, the data traffic related to the APP specified by the user includes: acquiring a data packet containing a port number through a preset flow acquisition mode; matching the port number with flow port information provided by an operating system of the user terminal to obtain an APP identifier corresponding to the port number, wherein the flow port information comprises a corresponding relation between the port number and the APP identifier; and determining the data flow belonging to the appointed sequence APP according to the data packet containing the port number corresponding to the appointed sequence APP identification.
Further, the step S707 of obtaining, according to the instruction of the user, the data traffic related to the APP specified by the user includes: acquiring data flow through a preset flow acquisition mode; identifying the content of the data traffic to acquire the data traffic belonging to the appointed APP; the content of the data traffic includes one or more of a transport protocol, a port number, an IP address, a unique address identifier URL, or a data payload of the data traffic.
Further, the method further includes S709, transmitting the controlled data traffic to a network card of the user terminal.
Based on the same concept, the present application further provides a flow control device, as shown in fig. 8, fig. 8 is a schematic structural diagram of the flow control device provided in the embodiment of the present specification, where the flow control device includes:
the adaptation module 801 adapts the corresponding flow acquisition module to the user terminal according to the authority of the user at the user terminal aiming at the user terminals of different operating systems, wherein the authority is Root authority or non-Root authority;
a flow obtaining module 803, configured to obtain a data flow of the user terminal;
the flow control module 805 controls the obtained data flow, and generates a controlled data flow, where the control includes at least one of simulating data flow delay, packet loss, or disorder.
Correspondingly, the embodiment of the application also provides flow control equipment, which comprises:
a memory storing a flow control program;
and a processor which calls a flow control program in the memory and executes:
aiming at user terminals of different operating systems, adapting corresponding flow acquisition modules to the user terminals according to the authority of a user in the user terminals, wherein the authority is Root authority or non-Root authority;
Acquiring the data traffic of the user terminal through the traffic acquisition mode;
and controlling the acquired data flow to generate the controlled data flow, wherein the control comprises at least one of simulating data flow time delay, packet loss or disorder.
Based on the same inventive concept, the embodiments of the present application further provide a corresponding nonvolatile computer storage medium, storing computer executable instructions, where the computer executable instructions are configured to:
aiming at user terminals of different operating systems, adapting corresponding flow acquisition modules to the user terminals according to the authority of a user in the user terminals, wherein the authority is Root authority or non-Root authority;
acquiring the data traffic of the user terminal through the traffic acquisition mode;
and controlling the acquired data flow to generate the controlled data flow, wherein the control comprises at least one of simulating data flow time delay, packet loss or disorder.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the method, apparatus, device and medium embodiments, since they are substantially similar to the system embodiments, the description is relatively simple, and the relevant parts will be referred to in the description of the system embodiments, which is not repeated herein.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps or modules recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of the units may be implemented in the same one or more pieces of software and/or hardware when implementing the embodiments of the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. The computer-readable medium, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signal numbers and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be apparent to one of ordinary skill in the art that one or more embodiments in the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, embodiments of the present description may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular transactions or implement particular abstract data types. Embodiments of the present description may also be practiced in distributed computing environments where transactions are performed by remote processing devices that are connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations of the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is made within the spirit and principle of the embodiments of the present specification, should be included in the scope of the claims of the present application.

Claims (19)

1. A flow control system comprises an adaptation module, a flow acquisition module and a flow control module,
the adaptation module adapts the corresponding flow acquisition module to the user terminal according to the authority of the user in the user terminal aiming at the user terminals of different operating systems, wherein the authority is Root authority or non-Root authority;
the flow acquisition module acquires the data flow of the user terminal;
the flow control module is used for controlling the acquired data flow and generating the controlled data flow;
the flow acquisition module comprises a Root flow acquisition module and a non-Root flow acquisition module, and the Root flow acquisition module and the non-Root flow acquisition module correspond to different flow acquisition modes according to different rights of a user at the user terminal;
the Root flow obtaining module is used for obtaining data flow from a kernel protocol stack in a serial connection mode when the authority of a user at the user terminal is the Root authority; the non-Root flow obtaining module is used for establishing a virtual private network VPN when the authority of the user at the user terminal is the non-Root authority, obtaining data flow through a port of the VPN, and the VPN is used for proxy flow interaction between the user terminal and the outside.
2. The system of claim 1, further comprising:
and the sending module is used for sending the controlled data flow to the network card of the user terminal.
3. The system of claim 1, the flow control module comprising an algorithm module and a control execution module;
the algorithm module determines a control mode of each data packet according to an algorithm adopted by the algorithm module, wherein the algorithm comprises control parameters, and the control parameters comprise a time delay control parameter, a packet loss rate control parameter or a disorder rate control parameter;
and the control execution module executes the control mode of the data flow determined by the algorithm module according to the control parameters, and comprises a time delay control module, a packet loss control module or an out-of-order control module.
4. The system of claim 3, wherein the flow control module,
the system also comprises a scene simulation module, wherein the control mode of the algorithm module on the data flow is determined through preset control parameters;
and the control execution module is used for executing the control mode of the algorithm module on the data flow.
5. The system of claim 3, wherein the flow control module,
the system also comprises a user-defined module, a control module and a control module, wherein the user-defined module is used for designating the control parameters by a user;
The algorithm module determines a control mode of data flow according to the control parameters appointed by the user;
and the control execution module is used for executing the control mode of the data flow determined by the algorithm module according to the control parameters specified by the user.
6. The system of claim 1, wherein the flow control module controls the acquired data flow by adjusting a flow control parameter of a flow control algorithm, where the flow control parameter is obtained according to the flow control algorithm and is used for controlling the data flow by the flow control algorithm, and the flow control module at least includes any one of a delay parameter, a packet loss probability parameter, or a disorder probability parameter.
7. The system of claim 6, the flow control module to control the acquired data flow through a particular scene mode, wherein the particular scene mode is predetermined by a specified flow control parameter.
8. The system of claim 1, wherein the non-Root flow obtaining module is adapted to establish a VPN according to the type of the user terminal operating system when the authority of the user at the user terminal is the non-Root authority, obtain the data flow of the application program APP on the user terminal to the outside, and write back the data to each APP; and establishing the connection of the user terminal to the outside, analyzing the received data traffic of each APP to the outside, and sending the data traffic to the outside.
9. The system of claim 1, further comprising a traffic identification module that obtains data traffic pertaining to a specified application APP based on user terminal setup information, wherein the user terminal setup information includes information of the specified APP.
10. The system of claim 9, wherein the flow identification module,
acquiring a data packet containing a port number through a preset flow acquisition module;
matching the port number with flow port information provided by an operating system of the user terminal to obtain an APP identifier corresponding to the port number, wherein the flow port information comprises a corresponding relation between the port number and the APP identifier;
and determining the data flow belonging to the appointed program APP according to the data packet containing the port number corresponding to the appointed program APP identification.
11. The system of claim 9, wherein the flow identification module,
acquiring data flow through a preset flow acquisition module;
identifying the content of the data traffic to acquire the data traffic belonging to the appointed APP;
the content of the data traffic includes one or more of a transport protocol, a port number, an IP address, a unique address identifier URL, or a data payload of the data traffic.
12. A flow control method, comprising:
aiming at user terminals of different operating systems, adapting corresponding flow acquisition modes to the user terminals according to the authority of a user in the user terminals, wherein the authority is Root authority or non-Root authority;
acquiring the data traffic of the user terminal through the traffic acquisition mode;
controlling the obtained data flow, and generating the controlled data flow;
the method comprises the steps of acquiring data flow of a user terminal through a flow acquisition mode, wherein the data flow of the user terminal is acquired through different flow acquisition modes according to the fact that the authority of the user at the user terminal is Root authority or non-Root authority; when the authority of the user at the user terminal is Root authority, acquiring data flow from a kernel protocol stack in a serial connection mode; when the authority of the user at the user terminal is a non-Root authority, a virtual private network VPN is established, data traffic is obtained through a port of the VPN, and the VPN is used for proxy traffic interaction between the user terminal and the outside world.
13. The method of claim 12, further comprising:
and sending the controlled data flow to the network card of the user terminal.
14. The method of claim 12, establishing a virtual private network VPN, obtaining data traffic through a port of the VPN, comprising:
according to the type of the user terminal platform, adapting and establishing VPN;
the method comprises the steps of obtaining external data flow of each application program APP on a user terminal through a VPN port, and writing data back to each APP;
and establishing the connection of the user terminal to the outside, analyzing the received data traffic of each application program APP to the outside, and sending the data traffic to the outside through the VPN port.
15. The method of claim 12, wherein the controlling the acquired data traffic using a preset algorithm to generate the controlled data traffic comprises:
and controlling the acquired data flow by adjusting flow control parameters of a flow control algorithm, wherein the flow control parameters are obtained according to the flow control algorithm and are used for controlling the data flow by the flow control algorithm, and at least comprise one of delay parameters, packet loss probability parameters or disorder probability parameters.
16. The method of claim 15, the controlling the acquired data flow by adjusting a flow control parameter of the flow control algorithm, comprising:
And controlling the acquired data flow through a specific scene mode, wherein the specific scene mode is predetermined by a specified flow control parameter.
17. The method of claim 12, further comprising, prior to controlling the acquired data flow using a preset flow control algorithm:
and acquiring data traffic belonging to a specified application program APP according to the setting information of the user terminal, wherein the setting information of the user terminal comprises the information of the specified APP.
18. The method of claim 17, acquiring data traffic associated with the user-specified APP according to the setting information of the user terminal, comprising:
acquiring a data packet containing a port number through a preset flow acquisition mode;
matching the port number with flow port information provided by an operating system of the user terminal to obtain an APP identifier corresponding to the port number, wherein the flow port information comprises a corresponding relation between the port number and the APP identifier;
and determining the data flow belonging to the appointed APP according to the data packet containing the port number corresponding to the appointed APP identification.
19. The method of claim 17, acquiring data traffic associated with the user-specified APP according to the setting information of the user terminal, comprising:
Acquiring data flow through a preset flow acquisition mode;
identifying the content of the data traffic to acquire the data traffic belonging to the appointed APP;
the content of the data traffic includes one or more of a transport protocol, a port number, an IP address, a unique address identifier URL, or a data payload of the data traffic.
CN202110630653.8A 2017-10-30 2017-10-30 Flow control system, method, device and equipment Active CN113271259B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110630653.8A CN113271259B (en) 2017-10-30 2017-10-30 Flow control system, method, device and equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110630653.8A CN113271259B (en) 2017-10-30 2017-10-30 Flow control system, method, device and equipment
CN201711039848.5A CN108011835B (en) 2017-10-30 2017-10-30 Flow control system, method, device and equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201711039848.5A Division CN108011835B (en) 2017-10-30 2017-10-30 Flow control system, method, device and equipment

Publications (2)

Publication Number Publication Date
CN113271259A CN113271259A (en) 2021-08-17
CN113271259B true CN113271259B (en) 2023-08-29

Family

ID=62051978

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201711039848.5A Active CN108011835B (en) 2017-10-30 2017-10-30 Flow control system, method, device and equipment
CN202110630653.8A Active CN113271259B (en) 2017-10-30 2017-10-30 Flow control system, method, device and equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201711039848.5A Active CN108011835B (en) 2017-10-30 2017-10-30 Flow control system, method, device and equipment

Country Status (1)

Country Link
CN (2) CN108011835B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120482A (en) * 2018-09-28 2019-01-01 北京小米移动软件有限公司 Monitor the method and device that application program uses flow

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404230A (en) * 2011-12-15 2012-04-04 杭州华三通信技术有限公司 Flow control method and device
CN102594675A (en) * 2012-02-10 2012-07-18 北京星网锐捷网络技术有限公司 Traffic control system and method
CN103763154A (en) * 2014-01-11 2014-04-30 浪潮电子信息产业股份有限公司 Network flow detection method
CN104468269A (en) * 2014-12-01 2015-03-25 郭丹 Directional traffic monitoring method based on Android terminal device
WO2016165505A1 (en) * 2015-04-16 2016-10-20 中兴通讯股份有限公司 Connection control method and apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4126928B2 (en) * 2002-02-28 2008-07-30 日本電気株式会社 Proxy server and proxy control program
CN102118320A (en) * 2011-04-18 2011-07-06 北京神州数码思特奇信息技术股份有限公司 Method for protocol identification and flow control
CN103618645A (en) * 2013-11-28 2014-03-05 武汉虹旭信息技术有限责任公司 Complex network environment test system and method with intelligent simulation function
CN106658589A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Method and device for detecting operation flow of software
CN107979506B (en) * 2017-10-30 2020-12-08 创新先进技术有限公司 Flow acquisition and cloud display system, method, device and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404230A (en) * 2011-12-15 2012-04-04 杭州华三通信技术有限公司 Flow control method and device
CN102594675A (en) * 2012-02-10 2012-07-18 北京星网锐捷网络技术有限公司 Traffic control system and method
CN103763154A (en) * 2014-01-11 2014-04-30 浪潮电子信息产业股份有限公司 Network flow detection method
CN104468269A (en) * 2014-12-01 2015-03-25 郭丹 Directional traffic monitoring method based on Android terminal device
WO2016165505A1 (en) * 2015-04-16 2016-10-20 中兴通讯股份有限公司 Connection control method and apparatus

Also Published As

Publication number Publication date
CN113271259A (en) 2021-08-17
CN108011835A (en) 2018-05-08
CN108011835B (en) 2021-04-20

Similar Documents

Publication Publication Date Title
CN107979506B (en) Flow acquisition and cloud display system, method, device and equipment
US20210203619A1 (en) Packet Forwarding Method, Apparatus, Device, and System
CN107133502B (en) A kind of processing method and processing device of application program
CN108345531A (en) A kind of test method, apparatus and system
CN108400902B (en) Method, device and equipment for gray level test
CN103177210A (en) Method of implanting dynamic stain analysis module in Android
CN109104327B (en) Service log generation method, device and equipment
CN111475142B (en) Method, device and equipment for generating applet file package
CN107741907A (en) With reference to bottom instruction and the simulator detection method and device of system information
CN103595770A (en) Method and device for achieving file downloading through SDK
CN103595769B (en) Method and device for achieving file uploading through SDK
CN113536174A (en) Interface loading method, device and equipment
CN114168114A (en) Operator registration method, device and equipment
CN113271259B (en) Flow control system, method, device and equipment
CN110427237A (en) A kind of method, apparatus and electronic equipment across application access target pages
CN117241276B (en) Detection tool, detection method, detection system and detection equipment for mobile application
US20190065075A1 (en) Method to improve mixed workload performance on storage devices that use cached operations
CN107908552A (en) A kind of test method based on link, device and equipment
CN107704760A (en) A kind of simulator detection method, device and equipment based on bottom instruction
CN108509255A (en) The treating method and apparatus of hardware interrupts
CN113626342B (en) Model online testing method and device
CN114745749A (en) Virtual network element testing method and device, electronic equipment and readable storage medium
CN110704742B (en) Feature extraction method and device
CN114510305A (en) Model training method and device, storage medium and electronic equipment
CN113411219B (en) Front-end service publishing method, device and 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
GR01 Patent grant
GR01 Patent grant