CN107888433A - A kind of method for simulating network and device - Google Patents
A kind of method for simulating network and device Download PDFInfo
- Publication number
- CN107888433A CN107888433A CN201711465530.3A CN201711465530A CN107888433A CN 107888433 A CN107888433 A CN 107888433A CN 201711465530 A CN201711465530 A CN 201711465530A CN 107888433 A CN107888433 A CN 107888433A
- Authority
- CN
- China
- Prior art keywords
- interface
- terminal
- mobile terminal
- address
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/06—Testing, supervising or monitoring using simulated traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiments of the invention provide a kind of method for simulating network and device, applied to target terminal, wherein, the first terminal interface wired connection that target terminal passes through first interface and the first mobile terminal, by second interface and the second terminal interface wired connection of the second mobile terminal, the above method includes:According to default configuration rule, the address of the first mobile terminal, the second mobile terminal, first interface, second interface, first terminal interface and second terminal interface is respectively configured, the communication data of the first mobile terminal transmission is received by first interface, according to default filtration parameter, communication data is filtered, target data is obtained, is sent target data to the second mobile terminal by second interface.Based on above-mentioned processing, it is possible to achieve the wire communication of the first mobile terminal and the second mobile terminal, and then reduce the difference of the analog network and anticipation network between the first mobile terminal and the second mobile terminal.
Description
Technical field
The present invention relates to network technique field, more particularly to a kind of method for simulating network and device.
Background technology
With the fast development of development of Mobile Internet technology, increasing user's selection is using mobile terminal (for example, hand
Machine, flat board) carry out voice call, video calling.The factors such as the difference of Virtual network operator, the region span of mobile terminal be big can be led
The unstable networks between mobile terminal are caused, the feelings such as packet loss, time delay or shake occur for the data for causing to send between mobile terminal
Condition, and then influence the communication quality between mobile terminal.In order to which the communication quality between mobile terminal is tested and improved,
User generally requires to simulate an accurate and controllable network.In network analog, user can be according to the communication of mobile terminal
Parameter, the communication quality between mobile terminal is determined, wherein, messaging parameter can send including mobile terminal/receive data
Speed and time.
Existing network analog step includes:User is in order to test the communication matter between mobile terminal A and mobile terminal B
Amount, can install Network Simulation Software, the Network Simulation Software can the number that sent to mobile terminal A on mobile terminal A
, can be with for example, user needs to simulate the anticipation network that packet loss is 20% according to carrying out the filtration treatments such as packet loss, time delay or shake
The packet loss that the data of mobile terminal A transmissions can be set using Network Simulation Software is 20%.
However, inventor has found that at least there are the following problems for prior art during the present invention is realized:
After the packet loss for the data that user's setting mobile terminal A is sent is 20%, the data that mobile terminal A is sent are also
Each nodes such as router, network base station, which can be passed through, can just reach mobile terminal B, and each between mobile terminal A and mobile terminal B
Node may all cause data packetloss, cause the packet loss for the data that mobile terminal B receives to be more than 20%.It is as can be seen that existing
There is differing greatly for the analog network in technology between mobile terminal and anticipation network.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of method for simulating network, device, system, electronic equipment and computer
Readable storage medium storing program for executing, to reduce the difference of analog network and anticipation network between mobile terminal.Concrete technical scheme is as follows:
In a first aspect, in order to achieve the above object, the embodiment of the invention discloses a kind of method for simulating network, methods described
Applied to target terminal, wherein, the target terminal is connect by the first terminal of the first interface and the first mobile terminal of local
Mouth wired connection, the target terminal pass through the second interface of local and the wired company of second terminal interface of the second mobile terminal
Connect, the above method includes:
According to default configuration rule, first mobile terminal, second mobile terminal, described first is respectively configured
Interface, the second interface, the address of the first terminal interface and the second terminal interface;
The communication data of the first mobile terminal transmission is received by the first interface;
According to default filtration parameter, the communication data is filtered, obtains target data;
The target data is sent to second mobile terminal by the second interface.
Optionally, it is described according to default configuration rule, first mobile terminal, second movement is respectively configured eventually
End, the first interface, the second interface, the address of the first terminal interface and the second terminal interface, including:
First terminal address is distributed for first mobile terminal, for second mobile terminal with distributing second terminal
Location;
First interface address is distributed for the first interface, by the first gateway address of first mobile terminal and described
The secondary route address of second terminal interface is arranged to the first interface address;For the second interface with distributing second interface
Location, the first routing address of the second gateway address of second mobile terminal and the first terminal interface is arranged to described
Second interface address.
Optionally, methods described also includes:
Obtain the messaging parameter of first mobile terminal and second mobile terminal;
The messaging parameter is inputted to default test model, determines first mobile terminal and the described second movement
Communication quality between terminal.
Second aspect, in order to achieve the above object, the embodiment of the invention discloses a kind of network analog device, described device
Applied to target terminal, wherein, the target terminal is connect by the first terminal of the first interface and the first mobile terminal of local
Mouth wired connection, the target terminal pass through the second interface of local and the wired company of second terminal interface of the second mobile terminal
Connect, said apparatus includes:
Configuration module, for according to default configuration rule, first mobile terminal, second movement to be respectively configured
Terminal, the first interface, the second interface, the address of the first terminal interface and the second terminal interface;
Receiving module, for receiving the communication data of the first mobile terminal transmission by the first interface;
Filtering module, for according to default filtration parameter, being filtered to the communication data, obtaining target data;
Sending module, for being sent the target data to second mobile terminal by the second interface.
Optionally, the configuration module, it is described specifically for distributing first terminal address for first mobile terminal
Second mobile terminal distribution second terminal address;
First interface address is distributed for the first interface, by the first gateway address of first mobile terminal and described
The secondary route address of second terminal interface is arranged to the first interface address;For the second interface with distributing second interface
Location, the first routing address of the second gateway address of second mobile terminal and the first terminal interface is arranged to described
Second interface address.
Optionally, described device also includes:
Acquisition module, for obtaining the messaging parameter of first mobile terminal and second mobile terminal;
Determining module, for the messaging parameter to be inputted to default test model, determine first mobile terminal
With the communication quality between second mobile terminal.
In the another aspect that the present invention is implemented, in order to achieve the above object, the embodiment of the invention also discloses a kind of network
Simulation system, the system include target terminal, the first mobile terminal and the second mobile terminal, wherein, the target terminal leads to
The first terminal interface wired connection of local first interface and first mobile terminal is crossed, the target terminal passes through local
Second interface and second mobile terminal second terminal interface wired connection:
First mobile terminal, for sending communication data to the target terminal by the first terminal interface;
The target terminal, for according to default configuration rule, first mobile terminal, described second to be respectively configured
Mobile terminal, the first interface, the second interface, the address of the first terminal interface and the second terminal interface;
The communication data is received by the first interface;
According to default filtration parameter, the communication data is filtered, obtains target data;
The target data is sent to second mobile terminal by the second interface;
Second mobile terminal, for passing through target data described in the second terminal interface.
In the another aspect that the present invention is implemented, in order to achieve the above object, the embodiment of the invention also discloses a kind of electronics
Equipment, the electronic equipment include processor, communication interface, memory and communication bus, wherein, the processor is described logical
Believe interface, the memory completes mutual communication by the communication bus;
The memory, for depositing computer program;
The processor, during for performing the program deposited on the memory, realize as described in above-mentioned first aspect
Method for simulating network.
At the another aspect that the present invention is implemented, a kind of computer-readable recording medium is additionally provided, it is described computer-readable
Instruction is stored with storage medium, when run on a computer, realizes the network analog side as described in above-mentioned first aspect
Method.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of computer program production comprising instruction
Product, when run on a computer so that computer performs the method for simulating network described in above-mentioned first aspect.
Method for simulating network provided in an embodiment of the present invention, applied to target terminal, wherein, target terminal passes through local
The first terminal interface wired connection of first interface and the first mobile terminal, the second interface and second that target terminal passes through local
The second terminal interface wired connection of mobile terminal, the above method include:According to default configuration rule, the first shifting is respectively configured
Dynamic terminal, the second mobile terminal, first interface, second interface, the address of first terminal interface and second terminal interface, by the
The communication data that one the first mobile terminal of interface is sent, according to default filtration parameter, filters to communication data, obtains
To target data, target data is sent to the second mobile terminal by second interface.Based on above-mentioned processing, target terminal is to logical
After letter data filtering, directly target data can be sent to the second mobile terminal, it is possible to achieve the first mobile terminal and second
The wire communication of mobile terminal, and then reduce analog network and anticipation network between the first mobile terminal and the second mobile terminal
Difference.
Certainly, any product or method for implementing the present invention must be not necessarily required to reach all the above excellent simultaneously
Point.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described.
Fig. 1 is a kind of scene graph of network analog system provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of method for simulating network provided in an embodiment of the present invention;
Fig. 3 is a kind of structure chart of network analog device provided in an embodiment of the present invention;
Fig. 4 is the structure chart of a kind of electronic equipment provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is described.
Existing network analog step includes:User is in order to test the communication matter between mobile terminal A and mobile terminal B
Amount, can install Network Simulation Software, the Network Simulation Software can the number that sent to mobile terminal A on mobile terminal A
According to filtration treatments such as progress packet loss, time delay or shakes.However, the data that mobile terminal A is sent can also pass through router, net
Each node such as network base station can just reach mobile terminal B, and each node between mobile terminal A and mobile terminal B may all cause
Data packetloss.Therefore, the analog network between mobile terminal and anticipation network differ greatly in the prior art.
Based on above-mentioned consideration, the present patent application provides a kind of method for simulating network, device, system, electronic equipment and calculating
Machine readable storage medium storing program for executing, the above method can apply to target terminal, wherein, target terminal passes through the first interface of local and the
The first terminal interface wired connection of one mobile terminal, the of second interface and the second mobile terminal that target terminal passes through local
Two terminal interface wired connections, the above method include:The first shifting can be respectively configured according to default configuration rule in target terminal
Move the network address of terminal, the second mobile terminal, first interface, second interface, first terminal interface and second terminal interface.So
Afterwards, target terminal can receive the communication data that the first mobile terminal is sent by first interface, can be according to default filtering
Parameter filters to communication data, obtains target data, is sent target data to the second mobile terminal by second interface.
Based on above-mentioned processing, target terminal directly can send target data to the second mobile terminal after being filtered to communication data,
And then reduce the difference of the analog network and anticipation network between the first mobile terminal and the second mobile terminal.
The present patent application is described in detail with specific embodiment below.
Referring to Fig. 1, Fig. 1 is a kind of scene graph of network analog system provided in an embodiment of the present invention.
The first terminal interface 1021 that target terminal 101 passes through the mobile terminal 102 of first interface 1011 and first of local
Wired connection, pass through the wired connection of second terminal interface 1031 of the mobile terminal 103 of second interface 1012 and second of local.The
One mobile terminal 102 is communication data transmitting terminal, and the second mobile terminal 103 is target data receiving terminal, is pacified on target terminal 101
Equipped with NistNet network media managements 1013.First mobile terminal 102 can be by first terminal interface 1021 by communication data
Send to first interface 1011.Target terminal 101 can receive the logical of the first mobile terminal 102 transmission by first interface 1011
Letter data, communication data is inputted to NistNet network media managements 1013, obtains target data, target data is passed through
Two interfaces 1012 are sent to second terminal interface 1031.Second mobile terminal 103 can be received by second terminal interface 1031
The target data that target terminal 101 is sent.
Referring to Fig. 2, Fig. 2 is a kind of flow chart of method for simulating network provided in an embodiment of the present invention, including:
S201:According to default configuration rule, the first mobile terminal, the second mobile terminal, first interface, is respectively configured
The address of two interfaces, first terminal interface and second terminal interface.
Wherein, default configuration rule can be rule of thumb configured by technical staff.Target terminal connects by first
Mouthful with the first terminal interface wired connection of the first mobile terminal, target terminal pass through second interface and the second mobile terminal the
Two terminal interface wired connections.Above-mentioned wired connection mode can pass through USB (Un iversal Serial Bus, general serial
Bus) data wire connection realization.Target terminal can send first to the first mobile terminal by first interface and set message, with
Complete the configuration of the first mobile terminal and first terminal interface IP address.Wherein, target end can be carried in the first setting message
Hold the network address for the distribution of the first mobile terminal, and the routing address for first terminal interface assignment.Target terminal can be with
Second is sent to the second mobile terminal message is set, to complete the configuration of the second mobile terminal and second terminal interface IP address.The
The network address that target terminal is the distribution of the second mobile terminal can be carried in two setting message, and is second terminal interface
The routing address of distribution.Target terminal can be corresponding to first interface and second interface distribution according to default configuration rule
Network address.
Based on above-mentioned processing, the first mobile terminal can carry out wire communication by first terminal interface and target terminal,
Second mobile terminal can carry out wire communication by second terminal interface and target terminal, and then can realize the first movement end
Wire communication between end and the second mobile terminal.
S202:The communication data of the first mobile terminal transmission is received by first interface.
In force, when being needed using the user of the first mobile terminal with being communicated using the user of the second mobile terminal,
The first mobile terminal can be used to send communication data to target terminal.Target terminal can then be received by first interface
Communication data is stated, wherein, communication data can be voice communication data or video communication data.Communication data is passing
During defeated, it will usually be divided into multiple data blocks, these data blocks are properly termed as packet, and each packet can include
The transmitting terminal of the packet and the address information of receiving terminal.Wherein, the ground of transmitting terminal in the data block that the first mobile terminal is sent
Location can be the network address of the first mobile terminal, and the address of receiving terminal can be the network address of the second mobile terminal.
S203:According to default filtration parameter, communication data is filtered, obtains target data.
Wherein, default filtration parameter can include:Data packetloss rate, data delay duration and data jitter rate.Specifically
, default filtration parameter can be configured by user according to anticipation network.
In force, user can input the setting comprising anticipation network parameter to target terminal and instruct.Target terminal is then
Setting instruction can be received, communication data is filtered according to anticipation network parameter, obtains target data.Exemplary,
User needs to build the analog network that data packetloss rate is 20%, can be inputted to target terminal and set instruction, wherein, setting refers to
The anticipation network parameter that data packetloss rate is 20% can be carried in order.Target terminal can then receive setting instruction, right
Communication data is filtered, and obtains the target data that packet loss is 20%.Specifically, user can select to pacify on a target terminal
Dress network media management realizes the filtering of communication data.Exemplary, above-mentioned network media management can be NistNet, IP
The network media managements such as Cloud or WANemu.
S204:Target data is sent to the second mobile terminal by second interface.
In force, target terminal can parse the packet of the communication data of the first mobile terminal transmission, according to data
The network address (network address of the second mobile terminal) of receiving terminal in bag, the target data after filtering is sent to second and moved
Dynamic terminal.
From above-mentioned, the method for simulating network based on the embodiment of the present invention, can after target terminal filters to communication data
So that directly target data is sent to the second mobile terminal.Based on above-mentioned processing, it is possible to achieve the first mobile terminal and second moves
The wire communication of dynamic terminal, and reduce the node between the first mobile terminal and the second mobile terminal, and then the can be reduced
The difference of analog network and anticipation network between one mobile terminal and the second mobile terminal.
In embodiments of the present invention, target terminal configures the first mobile terminal, the second mobile terminal, first interface, second
The step of address of interface, first terminal interface and second terminal interface, can include:
First terminal address is distributed for the first mobile terminal, second terminal address is distributed for the second mobile terminal.For first
Interface assignment first interface address, by the secondary route address of the first gateway address of the first mobile terminal and second terminal interface
It is arranged to first interface address.Distribute second interface address for second interface, by the second gateway address of the second mobile terminal and
First routing address of first terminal interface is arranged to second interface address.
In force, target terminal can set the first mobile terminal to open USB and (Universal Serial B us, lead to
With universal serial bus) binding, new local interface (i.e. first interface) connection is created, first interface address is distributed for first interface,
First terminal address is distributed for the first mobile terminal.First interface address can be arranged to the first mobile terminal by target terminal
Gateway address (i.e. the first gateway address).Accordingly, target terminal can set the second mobile terminal to open USB bindings, create
New local interface (i.e. second interface) connection, second interface address is distributed for second interface, for the second mobile terminal distribution the
Two terminal address.Second interface address can be arranged to gateway address (i.e. the second gateway of the second mobile terminal by target terminal
Address).The secondary route address of second terminal interface can be arranged to first interface address by target terminal, can be by first eventually
First routing address of end interface is arranged to second interface address.
Exemplary, target terminal can be computer end, and the first mobile terminal and the second mobile terminal can be Android hand
Machine.First interface address can be arranged to " 192.168.42.253 " by target terminal, and by " 192.168.42.253 " conduct
First gateway address.Second interface address can be arranged to " 192.168.42.254 " by target terminal, and will
" 192.168.42.254 " is used as the second gateway address.Then, target terminal can by busybox softwares by the first via by ground
Location is arranged to " 192.168.42.254 ", and first terminal address is arranged to " 192.168.42.1 ".Accordingly, target terminal can
So that secondary route address is arranged into " 192.168.42.253 " by busybox softwares, second terminal address is arranged to
“192.168.42.2”。
From above-mentioned, the method for simulating network based on the embodiment of the present invention, target terminal can be by the first gateway address
First interface address is arranged to secondary route address, by the second gateway address and the first routing address with being arranged to second interface
Location.Based on above-mentioned processing, it is possible to achieve the first mobile terminal is communicated with the second mobile terminal by wired mode, reduces the
The difference of analog network and anticipation network between one mobile terminal and the second mobile terminal.
In the present invention is implemented, it can also realize that target terminal according to default test model, determines communication quality.Specifically
, above-mentioned steps can include:Messaging parameter is inputted to default test model, determines the first mobile terminal and the second movement
Communication quality between terminal.
Wherein, default test model can contrast the first messaging parameter and second mobile terminal of the first mobile terminal
Second messaging parameter, determines communication quality.Specifically, above-mentioned test model can send communication data according to the first mobile terminal
Time and the second mobile terminal receive target data time, obtain the reality to be communicated between the first mobile terminal and second terminal
Border time delay duration;Test model the speed of communication data can also be sent according to the first mobile terminal and the second mobile terminal receives
The speed of target data, obtain the actual packet loss to be communicated between the first mobile terminal and second terminal.Then, test model can
With the actual time delay duration of synthesis and actual packet loss, the communication quality between the first mobile terminal and the second mobile terminal is determined.
Exemplary, delay is long when practical is less than the first preset duration, and when actual packet loss is less than the first default packet loss, tests
Model can determine that communication quality is " communication quality is excellent ";Delay is long not less than the first preset duration and less than second when practical
Preset duration, or when actual packet loss is not less than the first default packet loss and less than the second default packet loss, test model can be with
It is " communication quality is good " to determine communication quality;Delay, which is grown, when practical is not less than the second preset duration, or actual packet loss is not small
When the second default packet loss, test model can determine that communication quality is " communication quality is qualified ";Delay is long not when practical
Less than the second preset duration, and when actual packet loss is not less than the second default packet loss, test model can determine communication quality
For " communication quality is unqualified ".Communication quality can be shown to user by target terminal.Or technical staff can also be according to
Voice call effect or video calling effect between one mobile terminal and the second mobile terminal, determine the first mobile terminal and
Communication quality between two mobile terminals.
From above-mentioned, the method for simulating network based on the embodiment of the present invention, target terminal can determine the first movement end
Communication quality between end and the second mobile terminal, and then Consumer's Experience can be improved.
Corresponding with above method embodiment, referring to Fig. 3, Fig. 3 is a kind of network analog dress provided in an embodiment of the present invention
The structure chart put, including:
Configuration module 301, for according to default configuration rule, first mobile terminal, described second to be respectively configured
Mobile terminal, the first interface, the second interface, the address of the first terminal interface and the second terminal interface;
Receiving module 302, for receiving the communication data of the first mobile terminal transmission by the first interface;
Filtering module 303, for according to default filtration parameter, being filtered to the communication data, obtaining number of targets
According to;
Sending module 304, for being sent the target data to second mobile terminal by the second interface.
Optionally, the configuration module 301, specifically for distributing first terminal address for first mobile terminal, it is
The second mobile terminal distribution second terminal address;
First interface address is distributed for the first interface, by the first gateway address of first mobile terminal and described
The secondary route address of second terminal interface is arranged to the first interface address;For the second interface with distributing second interface
Location, the first routing address of the second gateway address of second mobile terminal and the first terminal interface is arranged to described
Second interface address.
Optionally, described device can also include:
Acquisition module, for obtaining the messaging parameter of first mobile terminal and second mobile terminal;
Determining module, for the messaging parameter to be inputted to default test model, determine first mobile terminal
With the communication quality between second mobile terminal.
The embodiment of the present invention additionally provides a kind of network analog system, and the system includes target terminal, the first movement eventually
End and the second mobile terminal, wherein, the first interface and the first of first mobile terminal that the target terminal passes through local
Terminal interface wired connection, the target terminal are connect by the second interface and the second terminal of second mobile terminal of local
Mouth wired connection:
First mobile terminal, for sending communication data to the target terminal by the first terminal interface;
The target terminal, for according to default configuration rule, first mobile terminal, described second to be respectively configured
Mobile terminal, the first interface, the second interface, the address of the first terminal interface and the second terminal interface;
The communication data is received by the first interface;
According to default filtration parameter, the communication data is filtered, obtains target data;
The target data is sent to second mobile terminal by the second interface;
Second mobile terminal, for passing through target data described in the second terminal interface.
, can be with after target terminal filters to communication data by running network analog system provided in an embodiment of the present invention
Directly target data is sent to the second mobile terminal, and then reduces the simulation between the first mobile terminal and the second mobile terminal
The difference of network and anticipation network.
The embodiment of the present invention additionally provides a kind of electronic equipment, as shown in figure 4, including processor 401, communication interface 402,
Memory 403 and communication bus 404, wherein, processor 401, communication interface 402, memory 403 is complete by communication bus 404
Into mutual communication;
Memory 403, for depositing computer program;
Processor 401, during for performing the program deposited on memory 403, realize following steps:
According to default configuration rule, first mobile terminal, second mobile terminal, described first is respectively configured
Interface, the second interface, the address of the first terminal interface and the second terminal interface;
The communication data of the first mobile terminal transmission is received by the first interface;
According to default filtration parameter, the communication data is filtered, obtains target data;
The target data is sent to second mobile terminal by the second interface.
The communication bus 404 that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral
Component Interconnect, abbreviation PCI) bus or EISA (Extended Industry
Standard Architecture, abbreviation EISA) bus etc..The communication bus 404 can be divided into address bus, data/address bus,
Controlling bus etc..For ease of representing, only represented in figure with a thick line, it is not intended that an only bus or a type of
Bus.
The communication that communication interface 402 is used between above-mentioned electronic equipment and other equipment.
Memory 403 can include random access memory (Random Access Memory, abbreviation RAM), can also
Including nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory
403 can also be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor 401 can be general processor, including central processing unit (Central Processing
Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor
(Digital Signal Processing, abbreviation DSP), application specific integrated circuit (Application Specific
Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array,
Abbreviation FPGA) either other PLDs, discrete gate or transistor logic, discrete hardware components.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium, is stored in the computer-readable recording medium
There is instruction, when run on a computer so that computer performs method for simulating network provided in an embodiment of the present invention.
Specifically, above-mentioned method for simulating network, including:
According to default configuration rule, first mobile terminal, second mobile terminal, described first is respectively configured
Interface, the second interface, the address of the first terminal interface and the second terminal interface;
The communication data of the first mobile terminal transmission is received by the first interface;
According to default filtration parameter, the communication data is filtered, obtains target data;
The target data is sent to second mobile terminal by the second interface.
It should be noted that other implementations of above-mentioned method for simulating network are identical with preceding method embodiment part,
Here repeat no more.
By running the instruction stored in computer-readable recording medium provided in an embodiment of the present invention, target terminal is to logical
After letter data filtering, directly target data can be sent to the second mobile terminal, and then reduce the first mobile terminal and second
The difference of analog network and anticipation network between mobile terminal.
The embodiment of the present invention additionally provides another computer program product for including instruction, when it runs on computers
When so that computer performs method for simulating network provided in an embodiment of the present invention.
Specifically, above-mentioned method for simulating network, including:
According to default configuration rule, first mobile terminal, second mobile terminal, described first is respectively configured
Interface, the second interface, the address of the first terminal interface and the second terminal interface;
The communication data of the first mobile terminal transmission is received by the first interface;
According to default filtration parameter, the communication data is filtered, obtains target data;
The target data is sent to second mobile terminal by the second interface.
It should be noted that other implementations of above-mentioned method for simulating network are identical with preceding method embodiment part,
Here repeat no more.
, can after target terminal filters to communication data by running computer program product provided in an embodiment of the present invention
Directly to send target data to the second mobile terminal, and then reduce the mould between the first mobile terminal and the second mobile terminal
Intend the difference of network and anticipation network.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its any combination real
It is existing.When implemented in software, can realize in the form of a computer program product whole or in part.The computer program
Product includes one or more computer instructions.When loading on computers and performing the computer program instructions, all or
Partly produce according to the flow or function described in the embodiment of the present invention.The computer can be all-purpose computer, special meter
Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer-readable recording medium
In, or the transmission from a computer-readable recording medium to another computer-readable recording medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, numeral from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer-readable recording medium can be any usable medium that computer can access or
It is the data storage devices such as server, the data center integrated comprising one or more usable mediums.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disc
Solid State Disk (SSD)) etc..
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality
Body or operation make a distinction with another entity or operation, and not necessarily require or imply and deposited between these entities or operation
In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those
Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Other identical element also be present in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment
Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Especially for device,
For system, electronic equipment, computer-readable recording medium, computer program product embodiments, due to its side of being substantially similar to
Method embodiment, so description is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
Claims (9)
- A kind of 1. method for simulating network, it is characterised in that methods described is applied to target terminal, wherein, the target terminal leads to Cross the first terminal interface wired connection of local first interface and the first mobile terminal, the target terminal pass through local the The second terminal interface wired connection of two interfaces and the second mobile terminal, methods described include:According to default configuration rule, first mobile terminal, second mobile terminal is respectively configured, described first connects Mouth, the second interface, the address of the first terminal interface and the second terminal interface;The communication data of the first mobile terminal transmission is received by the first interface;According to default filtration parameter, the communication data is filtered, obtains target data;The target data is sent to second mobile terminal by the second interface.
- 2. according to the method for claim 1, it is characterised in that it is described according to default configuration rule, it is respectively configured described First mobile terminal, second mobile terminal, the first interface, the second interface, the first terminal interface and institute The address of second terminal interface is stated, including:First terminal address is distributed for first mobile terminal, second terminal address is distributed for second mobile terminal;First interface address is distributed for the first interface, by the first gateway address of first mobile terminal and described second The secondary route address of terminal interface is arranged to the first interface address;Second interface address is distributed for the second interface, First routing address of the second gateway address of second mobile terminal and the first terminal interface is arranged to described Two interface IP addresses.
- 3. according to the method for claim 1, it is characterised in that methods described also includes:Obtain the messaging parameter of first mobile terminal and second mobile terminal;The messaging parameter is inputted to default test model, determines first mobile terminal and second mobile terminal Between communication quality.
- A kind of 4. network analog device, it is characterised in that described device is applied to target terminal, wherein, the target terminal leads to Cross the first terminal interface wired connection of local first interface and the first mobile terminal, the target terminal pass through local the The second terminal interface wired connection of two interfaces and the second mobile terminal, described device include:Configuration module, for according to default configuration rule, first mobile terminal, second movement to be respectively configured eventually End, the first interface, the second interface, the address of the first terminal interface and the second terminal interface;Receiving module, for receiving the communication data of the first mobile terminal transmission by the first interface;Filtering module, for according to default filtration parameter, being filtered to the communication data, obtaining target data;Sending module, for being sent the target data to second mobile terminal by the second interface.
- 5. device according to claim 4, it is characterised in thatThe configuration module, specifically for distributing first terminal address for first mobile terminal, for the described second movement eventually End distribution second terminal address;First interface address is distributed for the first interface, by the first gateway address of first mobile terminal and described second The secondary route address of terminal interface is arranged to the first interface address;Second interface address is distributed for the second interface, First routing address of the second gateway address of second mobile terminal and the first terminal interface is arranged to described Two interface IP addresses.
- 6. device according to claim 4, it is characterised in that described device also includes:Acquisition module, for obtaining the messaging parameter of first mobile terminal and second mobile terminal;Determining module, for the messaging parameter to be inputted to default test model, determine first mobile terminal and institute State the communication quality between the second mobile terminal.
- 7. a kind of network analog system, it is characterised in that the system includes target terminal, the first mobile terminal and the second movement Terminal, wherein, the target terminal is wired by the first terminal interface of the first interface and first mobile terminal of local Connection, the target terminal pass through the second interface of local and the second terminal interface wired connection of second mobile terminal:First mobile terminal, for sending communication data to the target terminal by the first terminal interface;The target terminal, for according to default configuration rule, first mobile terminal, second movement to be respectively configured Terminal, the first interface, the second interface, the address of the first terminal interface and the second terminal interface;The communication data is received by the first interface;According to default filtration parameter, the communication data is filtered, obtains target data;The target data is sent to second mobile terminal by the second interface;Second mobile terminal, for passing through target data described in the second terminal interface.
- 8. a kind of electronic equipment, it is characterised in that including processor, communication interface, memory and communication bus, wherein, it is described Processor, the communication interface, the memory complete mutual communication by the communication bus;The memory, for depositing computer program;The processor, during for performing the program deposited on memory, realize any described method steps of claim 1-3 Suddenly.
- 9. a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium internal memory contains computer Program, the computer program realize claim 1-3 any described method and steps when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711465530.3A CN107888433A (en) | 2017-12-28 | 2017-12-28 | A kind of method for simulating network and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711465530.3A CN107888433A (en) | 2017-12-28 | 2017-12-28 | A kind of method for simulating network and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107888433A true CN107888433A (en) | 2018-04-06 |
Family
ID=61770588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711465530.3A Pending CN107888433A (en) | 2017-12-28 | 2017-12-28 | A kind of method for simulating network and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107888433A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110569134A (en) * | 2019-08-30 | 2019-12-13 | 北京电子工程总体研究所 | method and system for simulating target time delay based on normal distribution |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101796882A (en) * | 2007-05-04 | 2010-08-04 | 株式会社东芝 | Be used for using simultaneously the intelligent connectivity framework (INTELICON) of a plurality of interfaces |
CN103546344A (en) * | 2013-10-22 | 2014-01-29 | 上海斐讯数据通信技术有限公司 | Wireless router performance testing system and method |
CN103841275A (en) * | 2013-07-24 | 2014-06-04 | 同济大学 | Interactive audio experience quality evaluation platform and method based on QoS |
-
2017
- 2017-12-28 CN CN201711465530.3A patent/CN107888433A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101796882A (en) * | 2007-05-04 | 2010-08-04 | 株式会社东芝 | Be used for using simultaneously the intelligent connectivity framework (INTELICON) of a plurality of interfaces |
CN103841275A (en) * | 2013-07-24 | 2014-06-04 | 同济大学 | Interactive audio experience quality evaluation platform and method based on QoS |
CN103546344A (en) * | 2013-10-22 | 2014-01-29 | 上海斐讯数据通信技术有限公司 | Wireless router performance testing system and method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110569134A (en) * | 2019-08-30 | 2019-12-13 | 北京电子工程总体研究所 | method and system for simulating target time delay based on normal distribution |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20110122776A1 (en) | Method, Apparatus, and Computer Program Product for Traffic Simulation Tool for Networks | |
US10136345B2 (en) | Testing a mobile application | |
CN104184617A (en) | Method, device and system for configuring pre-emphasis for interconnection equipment and network device | |
US20150281072A1 (en) | Link aggregation group (lag) support on a software-defined network (sdn) | |
CN108363583A (en) | A kind of chip update method, equipment and storage medium based on BMC | |
CN106664584A (en) | Synthetic transactions between communication endpoints | |
CN108092856A (en) | Network quality optimization method, system and electronic equipment based on SDN | |
CN104852828B (en) | A kind of network delay detection method, apparatus and system | |
CN104079445A (en) | Distributed type pressure testing system and method | |
CN109768879A (en) | The determination method, apparatus and server of target service server | |
EP3923549A1 (en) | Data downloading method and related apparatus | |
CN106326062B (en) | The operating status control method and device of application program | |
CN105099803B (en) | A kind of method for recognizing flux, application server and network element device | |
CN107222560A (en) | A kind of multinode Hui Yuan method, device and storage medium | |
CN108141409A (en) | Communication system, address notice device, communication control unit, terminal, communication means and program | |
CN112994981B (en) | Method and device for adjusting time delay data, electronic equipment and storage medium | |
CN108366012A (en) | A kind of social networks method for building up, device and electronic equipment | |
CN110069288A (en) | USB device sharing method, apparatus and system | |
CN109120483B (en) | Firewall equipment performance test method and device | |
CN107888433A (en) | A kind of method for simulating network and device | |
CN103684925A (en) | Performance test method based on simulation terminal | |
CN101834679B (en) | Port test method, device and system | |
CN110113269A (en) | A kind of method and relevant apparatus of the flow control based on middleware | |
CN106375155B (en) | The control method and control system of MAC simulating, verifying model | |
CN113656152B (en) | Local simulation method, system, medium and electronic equipment based on container cloud environment |
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 |
Application publication date: 20180406 |
|
RJ01 | Rejection of invention patent application after publication |