A kind of complex network general purpose simulation system
Technical field
The present invention relates to a kind of complex network general purpose simulation system, belong to computer software technical field.
Background technology
Major part complication system can be abstracted into complex network to study, and complex network is that we study an important tool of complication system.Late nineteen nineties, the discovery of scales-free network and small-world network accelerates the research of people to complex network, meanwhile, also started one upsurge to network research, its research range relates to and comprises physics, medicine and pharmacology, sociology and the every subjects such as biology, engineering science field.
Current complex network becomes a research field got most of the attention in the world already, and occurred some analysis software for complex network abroad, as Network, Pajek, Matlab etc., domestic researchist is also that enthusiasm is surging to the research of complex network.But, current most researchers can only utilize external research platform or software to carry out the modeling and simulation of complex network, and by the Comprehensive Comparison to external each research platform and software, find that researcher is when applying external research platform or software, there is some deficiency following:
1) because Network software Python is write, cause it to use threshold higher, impracticable for the complex network researcher of specialty, the researcher of this software of domestic application is also less;
2) Pajek is the complex network simulation software of a comparative maturity, but due to its interface hard to understand, and several networks of less type can only be generated, so be not easy to study large scale network;
3) although domestic complex network researchist generally uses Matlab as analysis tool, but in fact Matlab is not the platform being used for studying complex network specially, it can not provide targetedly method to the statistical study of the generation or topological property of carrying out network structure, cause researchist to need oneself to build model, and write code and carry out analyzing, emulating.
Above situation, hinder development and the practice of complex network to a certain extent, and the present invention can solve problem above well.
Summary of the invention
The object of the invention be for lack at present a kind of specially, the deficiency of complex network analogue system of generally acknowledging, propose a kind of complex network general purpose simulation system, this system is applied to complex network simulation analysis, for complex network researchist provides a simple interface, the Complex Networks Analysis instrument that easy to operate, graphing capability is powerful and highly professional, and researchist is helped to carry out every complex network research more intuitively, more easily.
The present invention solves the technical scheme that its technical matters takes: a kind of complex network general purpose simulation system, this system carries out simulation analysis for complex network, the framework of total system is mainly divided into three layers: layer based on ground floor, mainly comprises network C Net class and node CNode class; The second layer is functional layer, contains the every basic function possessed needed for complex network simulation analysis; Third layer is application layer, and namely user directly can carry out each application module of operating.
Ground floor network C Net class and node CNode class encapsulate attribute, the method for network and node respectively, and its effect is the structure realizing system-based function.Network C Net class is as the parent of node CNode class, be made up of several network nodes CNode class, except completing a series of property values storing complex network, as: outside nodes, even limit number, complete the operation of network-level simultaneously, as: network generation, network structure drafting, network parameter calculating etc.The correlation attribute value of CNode class memory node: numbering, coordinate, even limit list and Lian Bian weight, completes other operation of node level simultaneously, as: draw node, node parameter calculating etc.The realization of each functional module of the second layer needs the attribute and the correlation technique that call ground floor CNet class, and must call attribute and the correlation technique of lower floor CNode class when realizing the method for CNet class.
Every basic function of the second layer comprises the read-write of different-format network information files, the generation of classical complex network model, network and node parameter calculating, K-Shell decomposition function, classical complex network community partition functionality, SIR communication function, and for realizing figure display that the optimum experience of user increases, network information list display and Image Saving function.The read-write of this different-format network information files is divided into the read-write of sst and xml two kinds of files.The formatting of sst file content is " node serial number-node coordinate-nodes neighbors node-company's limit weight " corresponding with neighbor node, and each nodal community separates with "-", facilitates system to the read-write of every terms of information.The form of xml file content is consistent with existing xml form, the first row states that this file is xml file and its xml specification version of using, next network information root element is listed, comprise network node sum, connect limit quantity information, in network, all nodal informations exist as the daughter element form of root element, and each daughter element comprises again node serial number, angle value, coordinate figure, neighbor node and connects the daughter element information such as limit weight.
The generation of the classical complex network model of the present invention is divided into the generation of ER random network, WS small-world network and BA scales-free network three kinds of network models.The parameter that ER random network needs user manually to arrange comprises node total number N and Lian Bian Probability p; The parameter that WS small-world network needs user manually to arrange comprises node total number N, reconnects the Probability p nodes adjacent with each K/2 in left and right that selects to be connected with destination node at random; The parameter that BA network needs user manually to arrange comprises initial connected network nodes m, and the new node at every turn added selects the nodes n that is connected with former network node and network finally to intend the nodes N reached.
Network of the present invention and node parameter calculate the calculating being divided into network parameter and node parameter two class parameter.The network parameter calculated comprises average degree, network density, average path length and network diameter, needs the property value calling all nodes, calculate complete system feedback all-network parameter value during calculating.Calculate node parameter comprise cluster coefficients, close to center coefficient, betweenness and and specified node between shortest path length.
Namely K-Shell decomposition function of the present invention is K-Shell decomposition algorithm classical in application complex network, peels off finally obtain each node layer, without the need to arranging any parameter to network layer.
Classical complex network community partition functionality of the present invention is divided into KL corporations to divide and CNM corporations divide two kinds of divisions.KL corporations divide needs user to arrange the size of Liang Ge corporations, and CNM corporations divide without the need to arranging any parameter.
SIR communication function of the present invention is divided into the propagation of SIR master, SIR propagates version propagation and SIR immunity version propagates three classes propagation.SIR master is propagated only needs user to arrange Infection probability and immune probability two parameters; SIR propagates version propagation also needs user to arrange primary infection number of nodes and propagation iterative step number; SIR immunity version is propagated except Infection probability and immune probability, and need user to arrange primary immune nodes, primary infection nodes and propagation iterative step number, the node being wherein initialized to immune state can not be infected again.
The present invention also comprises graphical display function, and this graphical display function comprises that network topology structure figure shows, arithmetic result figure shows and graph of relation display.Wherein, arithmetic result figure is divided into again K-Shell decomposition result figure, KL corporations division result figure, CNM corporations division result figure and SIR to propagate result figure tetra-class, K-Shell decomposition result figure difformity represents each node layer, and rear three class figure different colours mark the node of different corporations or different conditions.Graph of relation degree of being divided into scatter chart, cluster coefficients and degree graph of relation, SIR propagate at the end of three kinds of state node number change curve maps and the change curve with angle value, cluster coefficients or PageRank value thereof.
The present invention also comprises information list Presentation Function, and this information list Presentation Function comprises network all nodal information lists display and arithmetic result list shows two classes.Wherein, network all nodal informations list display is node serial number and node angle value two information of all nodes; Arithmetic result can be divided into again K-Shell decomposition result, KL corporations division result, CNM corporations division result and SIR to propagate result four class, the former shows the node serial number of the number of plies and every node layer, the node serial number that both display corporations numberings rear and each corporations comprise, the node serial number that last SIR propagation result display S, I, R tri-kinds of states and each state comprise.
The present invention includes Image Saving function and graphical display function, this Image Saving function is echoed mutually with graphical display function, and all figures supporting to show all can be double-clicked it and preserve.Preservable picture format comprises bmp, png, jpg, gif, tiff etc., and user can manually select on demand.
Each application module include file operational module of third layer, network generation module, parameter calculating module, K-Shell decomposing module, corporations divide module and propagation model module, combined respectively realize by the every basic function of the second layer.
File operation module of the present invention is used for the read-write to sst, xml file comprising complex network information;
Network generation module of the present invention is used for the generation of three kinds of classic network in complex network: ER random network, WS small-world network and BA scales-free network, and correlation parameter can manually arrange or select default value;
Parameter calculating module of the present invention is used for node parameter and the network parameter of calculation of complex network;
K-Shell decomposing module of the present invention is used for complex network application K-Shell decomposition algorithm, isolates each node layer;
Corporations of the present invention divide module and are used for obtaining corresponding corporations division result to the division of complex network application KL corporations and CNM community detecting algorithm;
Propagation model module of the present invention is used for carrying out Communication Research to complex network application SIR propagation model, and improve on former SIR propagation model basis, the node node of 5 (namely before angle value rank) supporting user independently to arrange to meet certain condition is propagated as propagating source or after part of nodes is directly set to immune node again.
System support of the present invention is read in various complex network and is carried out simulation analysis, comprise the autonomous network built, all nodal informations that the complex network that will study comprises only need be write according to certain format by user, save as sst or xml file, read in platform.
The present invention includes graphical display function, namely show outside initial network structural drawing and also support display K-Shell decomposition result, corporations' division result, propagation result and all kinds of curve map, wherein, in K-Shell decomposition result, the difform node of each node layer represents; Corporations divide and propagate net result, the node label of the node different colours of different corporations or different conditions; All kinds of curve map, namely spend scatter chart, cluster coefficients and degree graph of a relation, SIR propagate at the end of S, I, R tri-kinds of state node quantity with the change curve of many kinds of parameters.
The present invention can support the complex network of process thousand DBMS amount.
Beneficial effect:
1. entire system framework of the present invention is clear, the realization of each application module of upper layer application layer needs every basic function of calling function layer, and the realization of every basic function of functional layer needs to call the every attribute and method that arrange in the network C Net class of subfoundation layer and node CNode class.Call layer by layer, strengthen the independence of each functional module, benefit the interpolation of later stage optimization and New function module.
2. universality of the present invention is strong, except supporting the classical complex network of process, also support the complex network that process user independently builds, all nodal informations that the complex network that study only need comprise by user are written as sst or xml file according to the form that platform specifies and can read in platform processes.
3. the present invention's Complex Networks Analysis instrument of providing a graphing capability powerful for complex network researchist, the display of network enabled structural drawing, arithmetic result figure and all kinds of curve map and preservation, help researchist to research and analyse complex network better.
4. the present invention provides a user interface close friend, simplicity generosity, easy to operate and highly professional Complex Networks Analysis instrument for complex network researchist.
5. the present invention takes into full account user's experience, enter before network processes at user of unread, the application module except file operation and network generation module is put ash, user cannot be operated on it, guide the proper use of platform of user, avoid user to use and make mistakes.
6. the present invention takes into full account user's experience, in parameter calculating module, the calculating of node parameter is just triggered when only clicking the node in node listing user and shows every node parameter values of respective nodes, avoids unnecessary calculated amount while facilitating user to check.
7. strong, easy to use, the perfect in shape and function of the property of the present invention is directed to, and test result display error rate is less, has error message to point out when makeing mistakes, and ensure that the stability that platform runs.
8. the present invention supports the complex network of process thousand grades of nodes, and treatment effeciency is higher.
Accompanying drawing explanation
Fig. 1 is entire system Organization Chart of the present invention.
Fig. 2 is of the present invention with householder interface (current display be " dolphin network ", node 38 is the node manually chosen).
Fig. 3 of the present inventionly reads document flowchart.
Fig. 4 is written document process flow diagram of the present invention.
Fig. 5 is the sub-interface of user of the present invention (current display be WS small-world network optimum configurations interface).
Fig. 6 is ER network systematic function process flow diagram of the present invention.
Fig. 7 is ER network generating algorithm process flow diagram of the present invention.
Fig. 8 is network Parameter Calculation functional flow diagram of the present invention.
Fig. 9 is dolphin network of network basic parameter.
Figure 10 is the degree scatter chart of scientist's network.
Figure 11 is K-Shell decomposition algorithm process flow diagram.
Figure 12 is the K-Shell decomposition result figure of Zachary network.
Figure 13 is KL corporations of the present invention partition functionality process flow diagrams.
Figure 14 is the KL corporations division result of Zachary network.
Figure 15 is SIR master communication function process flow diagram of the present invention.
Figure 16 is that with angle value change curve, (node of current setting PageRank value front 10 is as propagating source to S, I, R tri-kinds of state node quantity final after Email network application SIR propagation, probability of spreading and immune probability are 0.3, and iterative steps is 100 times).
Figure 17 be of the present invention " about " sub-interface.
Embodiment
Below in conjunction with Figure of description, the invention is described in further detail.
As shown in Figure 1, the present invention proposes a kind of complex network general purpose simulation system, this system carries out simulation analysis for complex network, and the framework of total system is mainly divided into three layers: layer based on ground floor, mainly comprises network C Net class and node CNode class; The second layer is functional layer, contains the every basic function possessed needed for complex network simulation analysis; Third layer is application layer, and namely user directly can carry out each application module of operating.
Ground floor network C Net class and node CNode class encapsulate attribute, the method for network and node respectively; Every basic function of the second layer comprises the read-write of different-format network information files, the generation of classical complex network model, network and node parameter calculating, K-Shell decomposition function, classical complex network community partition functionality, SIR communication function, and for realizing figure display that the optimum experience of user increases, network information list display and Image Saving function; Each application module include file operational module of third layer, network generation module, parameter calculating module, K-Shell decomposing module, corporations divide module and propagation model module, are realized respectively by function common combination multiple in the second layer.
File operation module is used for the read-write to sst, xml file comprising complex network information.
Network generation module is used for the generation of three kinds of classic network in complex network: ER random network, WS small-world network and BA scales-free network, correlation parameter can manually arrange or select default value.
Parameter calculating module is used for node parameter and the network parameter of calculation of complex network.
K-Shell decomposing module is used for complex network application K-Shell decomposition algorithm, isolates each node layer.
Corporations divide module and are used for obtaining corresponding corporations division result to the division of complex network application KL corporations and CNM community detecting algorithm.
Propagation module is used for carrying out Communication Research to complex network application SIR propagation model, and improve on former SIR propagation model basis, support user independently arrange meet certain condition node (as before angle value rank 5 node) propagate again as propagating source or after part of nodes is directly set to immune node.
As shown in Figure 2, the present invention takes into full account that the use sense of user is subject to, and copies popular the text document software interface be familiar with, devises the interactive interface of this platform and user.Therefore, user is simple to operate understandable when using this platform to emulate, only need click " file ", " parameter calculatings ", " K-Shell decomposition ", " corporations' division ", " propagation model ", " about " five master menus, need click corresponding function according to research.
" file " master menu is exactly the functional mapping of file operation module and network generation module in fact, and the function that can call comprises as follows:
File operation module is used for the read-write to sst, xml file comprising complex network information;
Network generation module is used for the generation of three kinds of classic network in complex network: ER random network, WS small-world network and BA scales-free network, correlation parameter can manually arrange or select default value.
Read document flow (as shown in Figure 3): for " dolphin network ".First should exist in computing machine comprise " dolphin network " network information sst or xml formatted file (if do not exist, then need users from networks download package containing the xml file of " dolphin network " network information, or according to the set form of this Platform Requirements the network information manually to be write and to save as sst file), afterwards, user clicks " opening " submenu, find the storing path of above-mentioned file, click is opened above-mentioned sst or xml file and is namely completed and read file operation (if file open failed, then warning message window jumped out by platform).Platform can automatic feedback network node information list and network structure (as shown in Figure 2), and user double-clicks the preservation that graphical window can realize image.
Written document flow process (as shown in Figure 4): first user has completed and read file operation, and carried out revising or process to network, now click " preservation " button, the new network information can be preserved, equally, if what first user completed is generating network operation, can be sst or xml file layout by the network trust system of the ER random network of generation, WS small-world network or BA scales-free network accordingly.
Network product process: first user clicks " ER random network ", " WS small-world network " or " BA scales-free network " submenu of " newly-built " submenu, platform ejects the parameter setting window (as shown in Figure 5) of map network, user revises correlation parameter as required afterwards, the network structure that platform feedback generates, the left list hurdle shows all node serial numbers and angle value thereof, and user double-clicks graphical window and can realize preserving the structural drawing of generating network.Wherein, as shown in Figure 6, other two kinds of network systematic function flow processs are similar to ER random networks generation functional sequence for ER random networks generation functional flow diagram; ER random networks generation algorithm flow chart as shown in Figure 7.
" parameter calculating " master menu is exactly the functional mapping of parameter calculating module, and the function that can call is as follows.
Parameter calculating module distributes for the network basic parameter to the complex network reading in or generate, internet pricing distribution and cluster coefficients and degree relation and calculates.
Network Parameter Calculation flow process (as shown in Figure 8): be exactly the existing network to platform display, calculate its network parameter and (namely comprise average degree, network density, average path length, network diameter etc.) and node parameter (cluster coefficients, close to center coefficient, betweenness, shortest path length etc. between node) and show result of calculation, wherein, the calculating action of network parameter can go out to trigger and show result of calculation after user clicks " parameter calculating ", and the calculating of node parameter could trigger when needing user to click respective nodes in the information list window of left side and show every node parameter result of calculation (as shown in Figure 9) of corresponding node.
Internet pricing distribution calculation process: be exactly Overall Network information, carry out distribution statistics to the angle value of all nodes, and at graphic window displays degree scatter chart (as shown in Figure 10), user double-clicks the preservation that graphical window can realize curve map.
Cluster coefficients and degree distribution relation calculation process: be exactly that distribution statistics is carried out to the cluster coefficients of nodes all in network and angle value, and at graphic window displays cluster coefficients and degree distribution relation curve map.
" K-Shell decomposition " master menu is exactly the functional mapping of K-Shell decomposing module, and the function that can call is as follows:
K-Shell decomposing module is used for complex network application K-Shell decomposition algorithm, isolates each node layer.
K-Shell decomposition computation flow process: be exactly application K-Shell decomposition algorithm (algorithm flow chart is as shown in figure 11), the node in network peeled off layer by layer, finds out each node layer, thus find core node and important node.The each node layer list of platform automatic feedback and K-Shell decomposition result figure (as shown in figure 12), user double-clicks the preservation that graphical window can realize decomposition result figure, and in figure, each node layer difformity represents.
" corporations' division " master menu is exactly the functional mapping that corporations divide module in fact, and the function that can call comprises:
Corporations divide module and are used for obtaining corresponding corporations division result to the division of complex network application KL corporations and CNM community detecting algorithm.
KL corporations divide flow process (as shown in figure 13): be exactly apply classical community detecting algorithm Kernighan-Lin algorithm, user manually arranges the size parameter of Liang Ge corporations (if two parameter sums exceed total nodes of network, then warning window jumped out by platform, prompting user Reparametrization), Liang Ge corporations network being divided into known dimensions can be realized afterwards, the nodal information list that platform automatic feedback Liang Ge corporations comprise and KL corporations division result figure (as shown in figure 14), user double-clicks graphical window can realize preservation to division result figure (lower with), the node belonging to Liang Ge corporations in figure represents by two kinds of colors respectively.
CNM corporations divide flow process: be exactly apply classical community detecting algorithm CNM agglomerative algorithm, network is divided into multiple corporations, the nodal information list that each corporations of platform automatic feedback comprise and CNM corporations division result figure, wherein the node of each corporations represents with different colours.
" propagation model " master menu is exactly the functional mapping of propagation module in fact, and the function that can call is as follows:
Propagation model module is used for carrying out Communication Research to complex network application SIR propagation model, and on SIR master basis, done two classes improvement, and one is that SIR propagates version, and two is SIR immunity versions.It is characterized in that being conducive to helping researchist to find important node in network more accurately.
SIR master medium process (as shown in figure 15): be exactly apply former SIR propagation model, user manually arranges probability of spreading and immune probability, can realize the SIR communication process of network afterwards.Platform feeds back the list information of three kinds of state nodes and propagates result figure, and shows S, I, R tri-kinds of state node number change curve maps, and user double-clicks graphical window and can realize preserving curve map.Wherein, the node propagating three kinds of states in result figure represents with different colours respectively.Described SIR propagates version medium process: be optimized on the basis of SIR master exactly, (namely N is less than the total nodes of network to support user independently to arrange N number of node that in angle value, cluster coefficients or PageRank value, rank is forward, otherwise warning window jumped out by platform) propagate as propagating source, platform feeds back the list information of three kinds of state nodes and propagates result figure, and shows the change curve (as shown in figure 16) of S, I, R tri-kinds of state node quantity with angle value, cluster coefficients or PageRank value.
SIR immunity version medium process: be optimized on the basis of SIR master exactly, support that user independently arranges N number of node that in angle value, cluster coefficients or PageRank value, rank is forward as immune node, an ensuing M node carries out propagating that (N+M is less than total number of nodes as propagation node, otherwise warning window jumped out by platform), platform feeds back the list information of three kinds of state nodes and propagates result figure, and shows the change curve of S, I, R tri-kinds of state node quantity with angle value, cluster coefficients or PageRank value.
" about " function of master menu be exactly in fact eject of the present invention about subwindow, as shown in figure 17.This sub-window mainly comprises three partial contents: upper layer pattern window display be the simplification animation image of developer, on the left of lower floor, information window is the brief description of title to this development system, developer, development time and exploitation version, and on the right side of lower floor, documentwindow content the present invention is developed to the high level overview of object.User clicks " about " master menu checks can there be a notional cognition to the present invention about sub-window.
The above embodiment is only be described emulation mode of the present invention; not scope of the present invention is limited; under not departing from the present invention and designing the prerequisite of spirit; the various distortion that those skilled in the art make technical scheme of the present invention and improvement, all should fall in protection domain that claims of the present invention determine.