[summary of the invention]
The technical problem to be solved in the invention is:
For traditional scheme when carrying out the performance test of figure, test data is according to specific data model or specified rule
Generate, structure is relatively fixed, cannot with application change and change, can not objective the number for meeting real application systems future
It is expected according to development, also can not just adapt to the test of chart database system.
The present invention reaches above-mentioned purpose by following technical solution:
In a first aspect, the present invention provides a kind of big drawing generating methods of test, comprising:
The first scale figure is generated according to the small-scale business datum of application system, the related system of the figure is obtained after analysis processing
Count information;
According to the data scale of expected second scale figure and existing first scale figure, associated spreading factor is calculated, and right
Associated statistical information carries out transformation extension;
According to the associated statistical information after transformation extension, basic data, vertex data and the number of edges of the second scale figure are generated
According to, and then generate the second scale figure for meeting prediction result;
Wherein, the data scale of the first scale figure is greater than the data scale of the second scale figure.
Preferably, described that first scale figure is generated according to the small-scale business datum of application system, it is obtained after analysis processing
The associated statistical information of the figure, specifically includes:
In conjunction with operation system routine work logic and business datum mechanical periodicity, small-scale business datum is obtained;
According to vertex label, side type and the attribute information in chart database dictionary, from the small-scale business datum
Diagram data information is extracted, and the diagram data information is stored into chart database, completes the construction of the first scale figure;
The label on each vertex and the type on each side are obtained, the accounting of different tag vertices numbers is calculated, counts vertex label Li
With side type TjVarious combinations under adjoining number of edges Dij, formed by vertex label LiFor first, side type TjFor first trip, adjoining
Number of edges DijFor the first statistical information matrix of entry value;
To the non-zero data item of each of the first statistical information matrix, corresponding vertex label L is countediWith side type Tj
Under, the adjoining number of edges v on each vertex and corresponding number of vertex d, and then obtain DijThe distribution situation of the adjacent number of edges of item.
Preferably, described to the non-zero data item of each of the first statistical information matrix, count corresponding vertex label
LiWith side type TjUnder, the adjoining number of edges v on each vertex and corresponding number of vertex d, and then obtain DijThe distribution feelings of the adjacent number of edges of item
Condition, specifically:
For each non-zero data item DijUnder, using the adjoining number of edges v on each vertex and corresponding number of vertex d as horizontal seat
Mark and ordinate, form the discrete point set of binary group;
If the discrete point quantity k in the discrete point set is less than preset value, discrete point set expression is directlyed adopt
The data distribution of first scale figure;
If the discrete point quantity k in the discrete point set is more than preset value, data fitting is carried out to discrete point, is adopted
The data distribution of the first scale figure is indicated with the fitting function got.
Preferably, the data scale of the second scale figure and existing first scale figure according to expected from calculates related expand
The factor is opened up, and transformation extension is carried out to associated statistical information, is specifically included:
According to expected data scale, the total number of vertex and total number of edges of the second scale figure to be generated are estimated, and combine existing
The data scale of first scale figure calculates separately a little and the extension scale factor on side;
According to the extension scale factor on side, to each entry value D in the first statistical information matrixijIt is extended in proportion
Obtain Dij', form the second statistical information matrix;
According to the items in the first statistical information matrix whether using fitting function expression data distribution, to data point
Cloth information carries out corresponding extension process, forms new discrete point set.
Preferably, described according to every whether using fitting function expression data point in the first statistical information matrix
Cloth carries out corresponding extension process to Data distribution information, forms new discrete point set, specifically:
For each non-zero item using discrete point set expression, on the basis of discrete point quantity k is constant, according to the expansion on side
Scale factor is opened up, adjacent number of edges v and number of vertex d corresponding to each discrete point is extended, and forms new discrete point set;
For each non-zero item indicated using fitting function, expanded according to the extension ratio factor pair discrete point quantity k on side
Exhibition, then corresponding fitting function is combined using systemic presupposition algorithm, new discrete point set is calculated.
Preferably, the associated statistical information after the extension according to transformation, generates basic data, the vertex of the second scale figure
Data and number of edges evidence, and then the second scale figure for meeting prediction result is generated, it specifically includes:
According to vertex label, side type and the attribute information in chart database dictionary, corresponding data is constructed, formation is used for
The basic data of second scale figure construction;
According to the expection vertex of the second scale figure sum, vertex is constructed based on the basic data, and press label and label
Number of vertex accounting is that label is distributed on these vertex, generates the vertex data of the second scale figure;
For the non-zero data item of each of the second statistical information matrix, according to the vertex data and newly discrete
Point set generates the number of edges evidence of the second scale figure.
Second aspect, the present invention also provides a kind of big figure generation systems of test, for realizing described in first aspect
Test big drawing generating method, comprising:
Statistical fit module, for generating the first scale figure, analysis processing according to the small-scale business datum of application system
The associated statistical information of the figure is obtained afterwards;
Expansion module is converted, for the data scale according to expected second scale figure and existing first scale figure, is calculated
Associated spreading factor, and transformation extension is carried out to associated statistical information;
Big figure generation module, for generating the basic number of the second scale figure according to the associated statistical information after transformation extension
According to, vertex data and number of edges evidence, and then generate the second scale figure for meeting prediction result.
The beneficial effects of the present invention are:
A kind of test provided in an embodiment of the present invention is in big drawing generating method and system, with the small-scale industry of application system
Business data are the small-scale figure that input restores script, obtain the regularity of distribution of small diagram data by being analyzed diagram data,
After being then extended transformation to diagram data according to anticipatory data scale, it can generate and the expected business datum generated of application system
The big diagram data more met, make the test for the chart database system software product for serving the application system have more specific aim and
Validity lays the foundation for the smooth online and stable operation of the application system.
Embodiment 1:
The embodiment of the invention provides a kind of big drawing generating methods of test, as shown in Figure 1, specifically including following three steps
It is rapid:
Step 1, the first scale figure is generated according to the small-scale business datum of application system, obtains the figure after analysis processing
Associated statistical information;
Step 2, according to the data scale of expected second scale figure and existing first scale figure, calculate related expanding because
Son, and transformation extension is carried out to associated statistical information;
Step 3, according to the associated statistical information after transformation extension, basic data, the vertex data of the second scale figure are generated
With number of edges evidence, and then generates and meet the second scale figure of prediction result;
Wherein, the data scale of the first scale figure is greater than the data scale of the second scale figure;Therefore, in this hair
In bright embodiment, the first scale figure is known as small figure, the second scale figure is known as big figure, passes through the ASSOCIATE STATISTICS of small figure
Information expansion obtains the associated statistical information of big figure, and then generates the big figure for meeting prediction result.The data of small figure and big figure rule
Mould can be measured with points or number of edges total in figure, can also be measured using the byte number that entire diagram data occupies is stored.
The data scale of big figure is greater than the data scale of small figure, for scheming to define not with the data scale of small figure specifically to count greatly
Amount is to demarcate, but an application problem.For example application system one month data are more representative, can cover entire industry
Business system, so that it may which, as small figure, the data in a corresponding season, half a year, 1 year or even many years are treated as being generated big
Figure.
A kind of test provided in an embodiment of the present invention is in big drawing generating method and system, with the small-scale industry of application system
Business data are the small-scale figure that input restores script, obtain the regularity of distribution of small diagram data by being analyzed diagram data,
After being then extended transformation to diagram data according to anticipatory data scale, it can generate and the expected business datum generated of application system
The big diagram data more met, make the test for the chart database system software product for serving the application system have more specific aim and
Validity lays the foundation for the smooth online and stable operation of the application system.
With reference to Fig. 2, in embodiments of the present invention, the step 1 it is specific again the following steps are included:
Step 11, in conjunction with operation system routine work logic and business datum mechanical periodicity, small-scale business datum is obtained;
Wherein, conventional technology can be directlyed adopt for the acquisition of small-scale business datum to extract.
Step 12, according to vertex label, side type and the attribute information in chart database dictionary, from the small-scale business
Diagram data information is extracted in data, and the diagram data information is stored into chart database, completes the construction of the first scale figure.
In this step, it is assumed that be illustrated by taking the social network relationships of people as an example, then what is got is original small-scale
Business datum is as shown in Figure 3 and Figure 4, and A-G indicates each vertex, corresponds to different people herein, and side expression is connected between two vertex
There is connection between two people, " local " and " other places " illustrates the region location of people, is equivalent to different vertex labels herein,
" phone ", " mail " and " short message " illustrates the contact method between people, is equivalent to different side types herein.With continued reference to
Such as Fig. 5, the related dictionary information that with good grounds chart database applied system design defines, root are stored in chart database data dictionary table
It according to the information in data dictionary table, is extracted from above-mentioned small-scale business datum and obtains diagram data information, including represent entity letter
All vertex of breath and its attribute, represent all sides and its attribute of entity relationship, and connect by what chart database system provided
Mouth stores the diagram data information being drawn into chart database, and then completes the construction of small figure, that is, generates small-scale figure, such as Figure 17
Shown in middle left figure.
Step 13, the label on each vertex and the type on each side are obtained, the accounting of different tag vertices numbers is calculated, counts vertex
Label LiWith side type TjVarious combinations under adjoining number of edges Dij, formed by vertex label LiFor first, side type TjHeaded by
Row, adjacent number of edges DijFor the first statistical information matrix of entry value;Wherein, 1≤i≤n, 1≤j≤m, m and n are respectively that side type is total
Several and vertex label sum.
In this step, can be obtained by chart database data dictionary table the n kind difference label on all vertex in small figure with
And the m kind different type on all sides, the vertex quantity under same label is counted, and then it is corresponding to calculate the label
Thus number of vertex calculates the accounting of variant tag vertices number in the accounting of total number of vertex.By counting the obtain first statistics
Information matrix as shown in fig. 6, any determination vertex label LiWith side type TjCombination (Li, Tj) under, count the neighbour on each vertex
Edge fit number, statistics are added as total adjoining number of edges DijValue.Assuming that still by taking the social network relationships of people in step 12 as an example, then
The first obtained statistical information matrix can refer to Fig. 7, and numerical value 13 indicates that the people of " local " has carried out 13 times " phone " connection in total
System, the meanings of other numerical value can and so on.
Step 14, to the non-zero data item of each of the first statistical information matrix, corresponding vertex label L is countediWith
Side type TjUnder, the adjoining number of edges v on each vertex and corresponding number of vertex d, and then obtain DijThe distribution situation of the adjacent number of edges of item.
In this step, when certain label is LiVertex have type TjAdjacent side when, i.e., corresponding DijIt is worth non-zero, then unites
Meter is in vertex label LiWith side type TjUnder, the distribution situation of Dij adjacent side.The adjoining number of edges v and tool on vertex are used herein
There are the number of vertex d two indices of corresponding adjacent number of edges v, to describe the distribution situation of the small diagram data, then for each non-zero number
According to item Dij, using the adjoining number of edges v on each vertex and corresponding number of vertex d as abscissa and ordinate, form binary group
Discrete point set, specific such as Fig. 8, and the following steps are included:
Step 141, empty HashMap (v, d) is defined;Wherein, HashMap is exactly common Key-Value key assignments mapping
Structure is penetrated, Key is exactly that adjoining the number of edges v, Value on vertex are exactly cumulative number of vertex d.
Step 142, successively obtaining label is LiEach vertex, inquiry chart database obtain its type be TjAdjoining
Number of edges v, specifically: the corresponding key-value pair of v is searched in HashMap, exists, updates the key-value pair, its d value is increased 1, otherwise
It is inserted into new key-value pair (v, 1) thereto.In this step, it is equivalent to each vertex traversed under same label, statistics should
The adjoining number of edges on vertex adds up using the adjoining number of edges as Key into HashMap.Still it is with the social network relationships of people
Example, it is assumed that currently determining vertex label is " local ", and side type is " phone ", then traverses everyone of " local ", and statistics is every
Personal " phone " call quantity.Assuming that first man call quantity is 3, then current v=3, continues to traverse remaining people, if time
It goes through to call quantity and is similarly 3 people, then d value is increased 1, and so on, all numbers that call quantity is 3 are finally obtained, it is false
Equipped with 3 people, then the finally formed key-value pair (v, d) is (3,3);Assuming that in ergodic process someone converse quantity be 4, then build
New key-value pair (v, d) is found, at this time v=4, it is assumed that call quantity is 4 to have 1 people, then the finally formed key-value pair (v, d) is
(4,1);And so on, complete the traversal on all vertex.
Step 143, each key-value pair of HashMap is pressed into v value ascending sort, returns to the binary group set for indicating discrete point
{(v1,d1),(v2,d2),......,(vk,dk), wherein v1*d1,......,vk*dkThe sum of be Dij.Still with above-mentioned people's
For social network relationships, by obtained each key-value pair by v value ascending sort, it is assumed that two key-value pairs in total, from the above, it can be seen that
Two key-value pairs arrived are respectively (3,3) and (4,1), are sorted according to the size of v, then key-value pair (3,3) is (v1,d1), key assignments
It is (v to (4,1)2,d2), using the adjoining number of edges v on each vertex and corresponding number of vertex d as abscissa and ordinate, just
Form discrete point as shown in Figure 9.Each discrete point forms discrete point set { (v1,d1),(v2,d2), and v1*d1With v2*d2The sum of
For Dij, i.e. 3*3+4*1=13 is corresponding with the numerical value in Fig. 8.It should be noted that since each side has corresponded to two tops
Point is equivalent to and each side is counted twice, the total adjoining number of edges D thus counted onijIt is containing duplicate in fact
Side, for adjacent number of edges DijDuplicate removal can be handled in subsequent big diagram data generating process.
The distribution situation that data fitting carrys out characterize data can be used under big and dispersion scene in data volume, in the step
In, if the discrete point quantity k in the discrete point set is less than preset value, directly adopt the small figure of discrete point set expression
Data distribution saves backup discrete points data;If the discrete point quantity k in the discrete point set is more than preset value,
Data fitting is carried out to discrete point, the data distribution of small figure is indicated using the fitting function got, and together with discrete points
According to saving together.The preset value can determine according to actual needs, for example may be configured as 10 herein, then discrete point 10 with
Without being fitted when lower, it is fitted more than 10, specifically refers to Figure 10, it is assumed that D11Xiang Zhong, discrete point quantity k0 are greater than
10, then using fitting distribution function f11;DijXiang Zhong, discrete point quantity k are greater than 10, then using fitting distribution function fij;For Dnm
Xiang Zhong, discrete point quantity 5 do not use distribution function then less than 10, are denoted as NULL;Other items and so on are finally completed small
The distributed intelligence of diagram data counts.
Continue to refer to figure 11, in embodiments of the present invention, the step 2 it is specific again the following steps are included:
Step 21, according to expected data scale, the total number of vertex and total number of edges of the second scale figure to be generated are estimated, and is tied
The data scale for closing existing first scale figure calculates separately a little and the extension scale factor on side.To stable chart database application
For system, the type on the label on vertex and side will not regular variation, the growth of data be mainly reflected in vertex and its
Between relationship growth, therefore, the service stability based on application business system, do not consider here diagram data vertex label with
And the extension in the type of side.Then as shown in figure 12, the specific implementation step of the step 21 is as follows:
Step 211, small diagram data is implemented to be sliced with the fixed service time cycle.
Step 212, each slice number of vertex and number of edges are counted, the number of edges and per unit data volume on average each vertex are calculated
Corresponding number of vertex;
Step 213, total number of vertex and total number of edges under the big diagram data scale of expection are determined using conventional prediction model;
Step 214, in conjunction with the data scale of expected big figure and existing small figure, calculate separately a little with the extension ratio on side because
Son.For example the data scale of existing small figure is 100 points, it is contemplated that the data scale of big figure is 10000 points, the then ratio put
The example factor is 100, i.e., 10000/100;And the accounting of all data is constant, such as tag vertices number accounting, certain in small diagram data
The number of vertex of label is 5, then the number of vertex of the label is 500 in big figure, although quantity changes, corresponding accounting is constant.Together
Sample, the extension scale factor on side is calculated in the same way.
Step 22, according to the extension scale factor on side, to each entry value D in the first statistical information matrixijIt carries out same
Ratio extends to obtain D 'ij, form the second statistical information matrix.In this step, in keeping the first statistical information matrix
Under conditions of all data accounting is constant, it is extended in proportion, obtains new information matrix, is denoted as the second statistical information
Matrix, as shown in figure 13.In diagram data, the relationship between data is expressed as the side between vertex, is more to consider herein
The variation of relationship in figure, goes to extend from the angle of relationship, therefore herein according to the extension ratio factor augmentation on side.
Step 23, whether fitting function is used to indicate data distribution according to the items in the first statistical information matrix,
Corresponding extension process is carried out to Data distribution information, forms new discrete point set.
For each non-zero item using discrete point set expression, on the basis of discrete point quantity k is constant, according to the expansion on side
Open up scale factor, adjacent number of edges v and number of vertex d corresponding to each discrete point extended in proportion, obtain corresponding v ' and
D ', and then form new discrete point set;Wherein, D 'ijCorresponding new discrete point set is combined into { (v '1,d’1),(v’2,d
’2),......,(v’k,d’k)};
For each non-zero item indicated using fitting function, carried out according to the extension ratio factor pair discrete point quantity k on side same
Ratio extension obtains new discrete point quantity k ', then combines corresponding fitting function using systemic presupposition algorithm, is calculated new
Discrete point set { (v '1,d’1),(v’2,d’2),......,(v’k’,d’k’), so that the v ' of each discrete point1*d
’1,......,v’k*d’kThe sum of close to D 'ij。
Continue to refer to figure 14, in embodiments of the present invention, the step 3 it is specific again the following steps are included:
Step 31, according to vertex label, side type and the attribute information in chart database dictionary, corresponding data is constructed,
Form the basic data for the second scale figure construction.In this step, according to the information in chart database data dictionary table, knot
The business background and its information such as type for closing attribute, determine attribute-value ranges using conventional method, for example, for people gender,
The enumerable attribute value such as the type of object, directly lists corresponding data acquisition system;For value ranges such as weight, quality, then give
Value range out, to form the basic data for scheming construction greatly.Wherein, the small figure number from practical business is not considered herein
According to the distribution situation on these attribute values, therefore in the attribute value on the vertex and side that construct big figure, random hand is simply used
Section extracts data from corresponding property value set.
Step 32, according to the expection vertex of the second scale figure sum, vertex is constructed based on the basic data, and press label
And tag vertices number accounting is that label is distributed on these vertex, generates the vertex data of the second scale figure;Herein according to expected big
Figure vertex sum, using routine data building method can all vertex needed for the big figure of random configuration, with specific reference to Figure 15, again
The following steps are included:
Step 321, an optional label L from the tag set of pointi, according to label LiNumber of vertex accounting calculates the mark
Sign LiThe number of vertex that correspondence should generate.For big diagram data, vertex label sum is constant, is still n, the accounting of tag vertices number
It is constant, corresponding each vertex label Li, calculate and scheme corresponding number of vertex greatly.For example, label LiCorresponding vertex number accounting is
5%, scheming corresponding total number of vertex greatly is 10000, then the label L in big figureiThe number of vertex that correspondence should generate is 10000*5%
=500.
Step 322, label L is generatediAll vertex of corresponding number, for each vertex objects, according to label LiFrom data
Dictionary, which obtains, is inserted into chart database after corresponding attribute-name and attribute value, and by the ID on the vertex and label LiThe binary group of composition
It is inserted into vertex ID set.This step is mainly used for generating the corresponding all vertex of calculated result in the step 321, such as raw
At label L in above-mentioned exampleiCorresponding 500 vertex.Firstly, a vertex objects are generated at random, according to current label LiFrom figure
Corresponding property set is obtained in data dictionary table;Secondly, to each attribute-name, according to its attribute Value Types from the basic number
It obtains an attribute value at random in, assigns the vertex objects together with attribute-name;Finally, the vertex objects are inserted into big figure
Chart database, and by the ID on the vertex together with label LiThe binary group constituted together is inserted into standby in the vertex ID set of big figure
With.For other each vertex, same method is taken to be handled, until generating current label LiCorresponding all vertex, it is right
The vertex data answered is inserted into spare in the vertex ID set of big figure.
Step 323, continue to choose other labels, sequentially generate the corresponding vertex of each label, until having handled tally set
Each label in conjunction.Specifically, continue to randomly select next label from the tag set of point, repeating said steps 321 with
Step 322, until having traversed all n kind vertex labels, all vertex needed for ultimately generating big figure.
Step 33, for the non-zero data item of each of the second statistical information matrix, according to the vertex data and newly
Discrete point set symphysis at the second scale figure number of edges evidence.Such as Figure 16, the step 33 specifically includes the following steps:
Step 331, for given vertex label LiWith side type TjCombine (Li,Tj), the vertex obtained from step 322
Label L is obtained in ID setiThe ID of corresponding vertex gathers.For example, still by taking the social network relationships of people in step 14 as an example,
Vertex label LiFor " local ", side type TjFor " phone ", with reference to step 14 and Fig. 7 and Fig. 9, in small diagram data, discrete point
Gather { (v1,d1),(v2,d2) it is { (3,3), (4,1) }.Assuming that the extension scale factor on side is 100, after expanded, scheming greatly
Discrete point set in data is combined into { (v '1,d’1),(v’2,d’2), corresponding { (300,300), (400,100) }, i.e. call quantity
For 300 300 people that have, 100 people that have that quantity of conversing is 400, discrete point quantity remains unchanged for 2.It is right under " local " label
The number answered is 400, i.e. d '1+d’2=300+100=400, i.e. label Li400 vertex are corresponding with, by the ID of corresponding vertex
Set is denoted as { A1,A2,......,A400};Wherein, A1-A300Corresponding is discrete point Q1(v’1,d’1) 300 vertex, A301-
A400Corresponding is discrete point Q2(v’2,d’2) 100 vertex.
Step 332, corresponding D ' is obtained by the second statistical information matrixijAnd D 'ijCorresponding new discrete point set
It closes, calculates the g ' value of each discrete point;Wherein, g '=v ' * d '.According to above-mentioned social network relationships example, D 'ijIt is corresponding new
Discrete point set is combined into { (v '1,d’1),(v’2,d’2), corresponding { (300,300), (400,100) }, then for two discrete points point
Do not have, g1'=v1’*d1'=300*300=90000, g2'=v2’*d2'=400*100=40000, therefore for big diagram data
For, combine (Li,Tj) under two discrete point Q1And Q2The adjacent number of edges in corresponding vertex is respectively 90000,40000.
Step 333, corresponding ID is gathered and resolves into the p subsets without intersection according to the d ' value of discrete point, according to these
The corresponding binary group of subset construction (ID, v ') set;Wherein, p is the discrete point number in discrete point set, each discrete point pair
Answer an ID subset.In above-mentioned social network relationships example, it is equivalent to and ID is gathered into { A1,A2,......,A400Resolve into two
A ID subset, i.e. p=2, two ID subsets are respectively X={ A1,A2,......,A300And Y={ A301,A302,......,
A400, the corresponding binary group of subset X (ID, v ') collection is combined into X '={ (A1,300),(A2,300),......,(A300, 300) }, son
The corresponding binary group of collection Y (ID, v ') collection is combined into Y '={ (A301,100),(A302,100),......,(A400,100)}。
Step 334, D ' is successively handledijEach discrete point in corresponding new discrete point set, if g ' value is greater than 0,
By extracting the side of two vertex structural maps in ID subset respectively, corresponding g ' value subtracts 1, and the v ' value of corresponding binary group (ID, v ') subtracts
1, until v ' value or g ' value are 0.Specific embodiment is as follows:
Firstly, extracting the non-zero vertex of a v value from corresponding ID subset if the g ' value of current discrete point is greater than 0
ID.For example, first to discrete point Q1Processing, corresponding g1' value be 90000, expression need to construct 90000 adjacent sides, then from right
A vertex ID is extracted in the subset X answered, for example extracts A1, with A1A vertex as side;
Second, another vertex ID of the side object of structural map, side is preferentially randomly selected from current ID subset, and will be from
Corresponding g ' the value of scatterplot subtracts 1.For example, for above-mentioned with A1As the side on a vertex, a vertex is preferentially extracted from subset X
Another summit of the ID as the side, for example extract A2, so the vertex in current subnet X preferentially can be subjected to pairing and constitute side,
Every pairing is completed after constituting a line, by g1' value subtracts 1 and need the number of edges that constructs to get to remaining;If in current subnet X
Vertex all pairing complete and be configured to side, discrete point Q1Corresponding adjacent side has not constructed also, then from next height
Collect, is i.e. extracts another vertex of a vertex as the side, corresponding g in subset Y2' value subtracts 1;
Third modifies the v ' value of the corresponding binary group of two ID (ID, v '), is subtracted 1.For example, by vertex A1And A2It constitutes
A line, then corresponding binary group set X ' is by { (A1,300),(A2,300),......,(A300, 300) } become { (A1,
299),(A2,299),......,(A300, 300) }, A1And A2There are also 299 for remaining adjacent number of edges;For each vertex, often
Construction complete a line, corresponding v ' value subtract 1 and just subtract 1, obtain the remaining constructable number of edges in the vertex;
4th, chart database is inserted on the side of generation;I.e. every construction generates a line, is stored in the chart database of big figure;
5th, continue to repeat above-mentioned second, third and the 4th step, until the corresponding v ' value of current ID is 0.For example,
For vertex A1For, constantly with A1For vertex carry out side construction, when for v '1When value is decreased to 0 by original 300, say
It is bright for current vertex A1, generated 300 adjacent sides of setting;Continue equally to operate other vertex, until subset X
In all vertex correspondences v '1Value is 0, at this time the corresponding g ' of discrete point Q11Value is also 0, discrete point Q1Corresponding g '1Item is adjacent
Edge fit whole construction complete;
Finally, for other each discrete points, above-mentioned five steps are repeated, until current g ' value is 0.For example, for above-mentioned
Social network relationships example, discrete point Q1Corresponding g '1After adjacent side whole construction complete, continue to discrete point Q2It carries out same
Sample processing, until corresponding g '2Value is 0, completes corresponding combination (Li,Tj) combination under all of its neighbor side construction.Wherein, expand
The big figure contrast effect figure after small figure and extension before exhibition can refer to Figure 17, and left and right respectively indicates small figure and big figure.
In embodiments of the present invention, to solve the problems, such as big figure generation when chart database system testing, application system is used
Existing small-scale business datum generates the big figure of high emulation, and implementation process is broadly divided into three phases: firstly, according to answering
Small figure is generated with the small-scale business datum of system, analysis, statistics and the fitting of information are carried out to the diagram data, obtains small figure
Data distribution rule;Secondly, it is anticipated that big diagram data scale, carries out transformation in proportion to existing small diagram data and extends;Most
Afterwards, the big figure for meeting prediction result, the test for chart database system are generated according to the diagram data information after extension.Pass through this
Kind mode, the big diagram data ultimately generated have data distribution rule same as small diagram data, make to serve the application system
The test of chart database system software product have more specific aim and validity.