CN110188432A - Verification method, electronic equipment and the computer readable storage medium of system architecture - Google Patents
Verification method, electronic equipment and the computer readable storage medium of system architecture Download PDFInfo
- Publication number
- CN110188432A CN110188432A CN201910420023.0A CN201910420023A CN110188432A CN 110188432 A CN110188432 A CN 110188432A CN 201910420023 A CN201910420023 A CN 201910420023A CN 110188432 A CN110188432 A CN 110188432A
- Authority
- CN
- China
- Prior art keywords
- rule
- framework
- attribute
- query result
- triple
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
- G06F30/33—Design verification, e.g. functional simulation or model checking
- G06F30/3323—Design verification, e.g. functional simulation or model checking using formal methods, e.g. equivalence checking or property checking
Abstract
The embodiment of the invention discloses a kind of verification methods of system architecture, electronic equipment and computer readable storage medium, by the way that system architecture diagram is converted to corresponding metadata schema, and scheduled framework specification text is parsed to obtain the first regular collection and Second Rule set based on predetermined format data, the corresponding verifying model of the metadata schema is obtained according to first regular collection, and the verifying model is verified according to the Second Rule set, thus, realize the automatic verifying to system architecture diagram, improve the accuracy of system architecture verifying, and reduce verifying cost.
Description
Technical field
The present invention relates to field of computer technology, verification method, electronic equipment more particularly, to a kind of system architecture
And computer readable storage medium.
Background technique
For same system framework, the architecture diagram presentation mode that system architecture designer draws out can be multiplicity
's.If disparity items group uses different drafting styles, obstacle can be brought to the mutual exchange of project team and evaluation, also not
It is easily formed reusable framework assets.Also, the drafting of the system architecture diagram of inaccuracy is also likely to design in system architecture
Stage just introduces some mistakes.Therefore, after unified system architecture design description language has been determined, it is also necessary to formulate framework
Scheme the specification drawn, so that the design cycle of each project team standardizes, there is unified architecture diagram to draw style, both facilitate framework
Design also facilitates scheme evaluating, more just can evade falling the mistakes of some principles in the design phase, and that improves architecture design can
By property and correctness.But at present it is generally necessary to artificial Compare System architecture diagram whether meet drafting specification verified, cost
It is higher, and technique occurs omitting and neglect.
Summary of the invention
In view of this, the embodiment of the present invention provides the verification method of system architecture a kind of, electronic equipment and computer-readable
Storage medium improves the accuracy of system architecture verifying to realize automatic verifying to system architecture diagram, and reduce verifying at
This.
In a first aspect, the embodiment of the present invention provides a kind of verification method of system architecture, which comprises
Scheduled framework specification text is parsed based on predetermined format data to obtain framework regular collection, the framework rule
Set includes the first regular collection and Second Rule set, and first regular collection includes at least one first framework rule,
The Second Rule set includes at least one second framework rule, and the first framework rule is the framework rule comprising definition
Then, the second framework rule is the framework rule not comprising definition;
System architecture diagram is converted into corresponding metadata schema, the metadata schema includes describing the system architecture
The data of correlation in figure between each node and each node;
The corresponding verifying model of the metadata schema is obtained according to first regular collection;
The verifying model is verified according to the Second Rule set.
Further, obtaining the corresponding metadata schema of the system architecture includes:
The attribute triple of each node in the system architecture diagram is obtained, the attribute triple includes the node
Mark, Property Name and attribute value;
Corresponding first attribute description of the attribute triple is obtained according to the first pre-defined rule;
The first all attribute descriptions is integrated to obtain the metadata schema.
Further, obtaining the corresponding verifying model of the metadata schema according to first regular collection includes:
Obtain the corresponding first query result set of first regular collection;
The corresponding attribute triple of each first framework rule is obtained according to the first query result set, wherein
The regular corresponding attribute triple of first framework carries out assignment according to corresponding first query result;
The second attribute description set is obtained according to the first pre-defined rule, the second attribute description set includes each described the
The attribute description of the corresponding attribute triple of one framework rule;
The second attribute description set is added, in the metadata schema to obtain verifying model.
Further, carrying out verifying to the verifying model according to the Second Rule set includes:
Obtain the corresponding second query result set of the Second Rule set;
The corresponding attribute triple of each second framework rule is obtained according to the second query result set, wherein
The regular corresponding attribute triple of second framework carries out assignment according to corresponding second query result;
Third attribute description set is obtained according to first pre-defined rule, the third attribute description set includes each institute
State the attribute description of the corresponding attribute triple of the second framework rule;
The second query result set and the third attribute description set are verified.
Further, the method also includes:
Meet the first predetermined condition in response to the third attribute description set, and the second query result set meets
Second predetermined condition, the system architecture diagram pass through verifying;
Wherein, first predetermined condition is specially third attribute description in the third attribute description set described
Verifying in model includes state the second framework rule match corresponding with the third attribute description, the second predetermined condition tool
Body is that record corresponding Boolean be true to every in the second query result set.
Further, obtaining the corresponding first query result set of first regular collection includes:
Obtain the corresponding attribute triple of the first framework rule in first regular collection;
The corresponding attribute triple of the first framework rule is converted to obtain correspondence according to the second pre-defined rule
Standard triple;
The first character string is obtained according to the standard triple;
The second character string is obtained according to the standard triple that all properties in the first framework rule are variable;
The corresponding query statement of the first framework rule is obtained according to first character string and second character string;
The corresponding query statement of each first framework rule is executed on the metadata schema to obtain described first
Query result set.
Further, the method also includes:
In response to not including variable's attribute in the first framework rule, sends exception information and stop verifying.
Further, the corresponding query statement of each first framework rule is executed on the metadata schema to obtain
The first query result set includes:
The corresponding query statement of each first framework rule is executed on the metadata schema obtains the first inquiry in advance
Results set;
Include condition module in response to the first framework rule, deletes boolean from the described first pre- query result set
Value is false query result, to obtain the first query result set;
Wherein, the cloth for the query result for calling function to calculate in the first pre- query result set for including according to condition module
Value of.
Second aspect, the embodiment of the present invention provide a kind of electronic equipment, including memory and processor, wherein described to deposit
Reservoir is executed for storing one or more computer instruction, one or more computer instruction by the processor with reality
Now method as described above.
The third aspect, the embodiment of the present invention provide a kind of computer readable storage medium, store computer program thereon and refer to
It enables, the computer program instructions realize method as described above when being executed by processor.
The technical solution of the embodiment of the present invention is based on pre- by the way that system architecture diagram is converted to corresponding metadata schema
Determine formatted data and parses scheduled framework specification text to obtain the first regular collection and Second Rule set, according to described first
Regular collection obtains the corresponding verifying model of the metadata schema, and according to the Second Rule set to the verifying model
It is verified, hereby it is achieved that the automatic verifying to system architecture diagram, improves the accuracy of system architecture verifying, and is reduced
Verifying cost.
Detailed description of the invention
By referring to the drawings to the description of the embodiment of the present invention, the above and other purposes of the present invention, feature and
Advantage will be apparent from, in the accompanying drawings:
Fig. 1 is the flow chart of the verification method of the system architecture of the embodiment of the present invention;
Fig. 2 is the method flow diagram of the acquisition metadata schema of the embodiment of the present invention;
Fig. 3 is the method flow diagram of the acquisition verifying model of the embodiment of the present invention;
Fig. 4 is the method flow diagram of the acquisition query result of the embodiment of the present invention;
Fig. 5 is the verification method flow chart of the verifying model of the embodiment of the present invention;
Fig. 6-Fig. 9 is the schematic diagram of the system architecture diagram of the embodiment of the present invention;
Figure 10 is the schematic diagram of the verifying device of the system architecture of the embodiment of the present invention;
Figure 11 is the schematic diagram of the electronic equipment of the embodiment of the present invention.
Specific embodiment
Below based on embodiment, present invention is described, but the present invention is not restricted to these embodiments.Under
Text is detailed to describe some specific detail sections in datail description of the invention.Do not have for a person skilled in the art
The present invention can also be understood completely in the description of these detail sections.In order to avoid obscuring essence of the invention, well known method, mistake
There is no narrations in detail for journey, process, element and circuit.
In addition, it should be understood by one skilled in the art that provided herein attached drawing be provided to explanation purpose, and
What attached drawing was not necessarily drawn to scale.
Unless the context clearly requires otherwise, "include", "comprise" otherwise throughout the specification and claims etc. are similar
Word should be construed as the meaning for including rather than exclusive or exhaustive meaning;That is, be " including but not limited to " contains
Justice.
In the description of the present invention, it is to be understood that, term " first ", " second " etc. are used for description purposes only, without
It can be interpreted as indication or suggestion relative importance.In addition, in the description of the present invention, unless otherwise indicated, the meaning of " multiple "
It is two or more.
Fig. 1 is the flow chart of the verification method of the system architecture of the embodiment of the present invention.As shown in Figure 1, the present embodiment is
Unite framework verification method the following steps are included:
Step S100 parses scheduled framework specification text based on predetermined format data to obtain framework regular collection.
In an optional implementation manner, predetermined format data are EBNF normal form (Extended Backus-Naur
Form, extension Ba Kesi-Nao that normal form).The symbol and description of use of EBNF normal form are as shown in table 1.
Table 1
In an optional implementation manner, the framework specification text of system architecture diagram is determined according to following EBNF normal form
Justice:
Wherein, for given information, if the given information is what above-mentioned rule_set rule generated, which is
One group of framework specification.If the given information is what above-mentioned variable rule generated, which is a variable.If should
Given information is what above-mentioned const rule generated, then the given information is a constant.If the given information is above-mentioned triple
What rule generated, then the given information is a triple.
Scheduled framework specification text R is parsed using above-mentioned EBNF normal form as a result, framework specification text can be obtained
Framework regular collection S defined in this R.Optionally, EBNF normal form is read using antlr, can automatically generate can parse
The language parser write according to EBNF normal form.Antlr, which refers to, can automatically generate syntax tree according to input and visually show
The open source syntax analyzer come is shown.
In the present embodiment, framework regular collection S includes the first regular collection S1 and Second Rule set S2, the first rule
Set S1 includes at least one first framework rule s1, and Second Rule set includes at least one second framework rule s2.First
Framework rule s1 is the framework rule comprising definition.For example, DEFINE a:higherThan b, that is, in system architecture diagram
In, definition node a is higher than node b.Second framework rule s2 is the framework rule not comprising definition.
System architecture diagram is converted to corresponding metadata schema by step S200.Wherein, metadata schema includes description system
The data of correlation in architecture diagram of uniting between each node and each node.
It in an optional implementation manner, is RDF in system architecture diagram by the architecture diagram Content Transformation for including
The data of (Resource Description Framework, resource description framework) format are to obtain metadata schema.RDF is
It is a kind of for describing the markup language of web resource.RDF is the XML (son of standard generalized markup language of a processing metadata
Collection) application.Metadata is exactly " data of description data " or " information of description information ".In this embodiment, metadata is to use
Phase in the data of description system architecture diagram information, namely description system architecture diagram between the information and each node of each node
The data of mutual relation.
In the present embodiment, each node in system architecture diagram has a mark (ID).Optionally, node ID includes
Letter and number, so that node ID can meet URI (Uniform Resource with a given string-concatenation composition
Identifier, uniform resource identifier) format character string.
Fig. 2 is the method flow diagram of the acquisition metadata schema of the embodiment of the present invention.In an optional implementation manner,
As shown in Fig. 2, system architecture diagram is converted into corresponding metadata schema specifically includes the following steps:
Step S210 obtains the attribute triple of each node in system architecture diagram.Wherein, attribute triple includes node
Mark, Property Name and attribute value.The attribute of node include nodename, node type, the transverse and longitudinal coordinate of node and other
The correlation etc. of node.That is, the corresponding attribute triple of node be<node identification, Property Name, attribute value>.
For example, for the node 0 in system architecture diagram, it is assumed that node 0 is identified as I, entitled N, corresponding attribute three
Tuple is<I, ' name ', N>.The type of node 0 is X, and corresponding attribute triple is<I, ' type ', X>.The transverse and longitudinal of node 0
Coordinate is respectively x, y, and corresponding attribute triple is respectively<I, ' xAxis ', x>,<I, ' yAxis ', y>.If node 0 and node
1 has incidence relation, and node 1 is identified as J, the entitled E of node 0 and the incidence relation of node 1, then corresponding attribute ternary
Organizing is<I, E, J>.
Step S220 obtains corresponding first attribute description of attribute triple according to the first pre-defined rule.A kind of optional
Implementation in, give a character string U so that the character string that the mark of character string U and arbitrary node is spliced into meets URI
Format.In the present embodiment, definition character string attended operation concat.Assuming that character string p, q is arbitrary character string, concat
The value of (p, q) is the character string that character string p, q is attached according to the sequence in bracket.For example, it is assumed that p indicates character
String ' http://www.example.org/ns#', q indicate character string ' abcd1234', then concat (p, q) indicate character string '
http://www.example.org/ns#abcd1234'.That is, in this example, it is assumed that node 0 is identified as I,
Then concat (U, I) is the URI that node 0 is directed toward in corresponding metadata schema.For example, setup string U be " http: //
Archimate/ns# ", the mark I of node 0 are node1, then the corresponding URI in metadata schema of node 0 be " http: //
archimate/ns#node1”。
An attribute description in metadata schema is used to identify the description to an attribute of a node.Specifically,
For attribute triple<A, B, C>, wherein based on A (namely node identification), B is predicate (namely Property Name), and C is visitor
Body.Wherein, C can be the mark of the relevant node of node corresponding with node identification A, or the number of attribute value
Value.Then attribute triple<A, B, C>attribute description be respectively as follows:
1, the attribute description of main body A namely the URI:concat (U, A) of main body.
2, the URI:concat (U, B) of the attribute description of predicate B namely predicate.
3, the attribute description of object C, when object C is a node identification, the attribute description of object C is object C's
URI:concat (U, C).When object C is the numerical value of attribute value, the attribute description of object C is identical as the attribute value, for example,
The ordinate of the corresponding node of node identification A is 20, then the attribute description of object C is 20.
Assuming that object C be a node identification, attribute triple<A, B, C>corresponding attribute description be<concat (U,
A),concat(U,B),concat(U,C)>
Step S230 integrates the first all attribute descriptions to obtain metadata schema.Specifically, system architecture is initialized
The attribute description scheming corresponding metadata schema, and will acquire is added in the metadata schema after initialization, to obtain the system
The corresponding metadata schema of architecture diagram.Thus, it is possible to system architecture diagram is converted to the metadata schema of RDF format, and according to
The framework regular collection that step S110 is obtained verifies the metadata schema, to obtain verification result, thus more accurately
Whether verifying system architecture diagram meets preset framework specification, reduces verifying cost.
Step S300 obtains the corresponding verifying model of metadata schema according to the first regular collection.Wherein, the first rule set
Closing includes at least one first framework rule.First framework rule is the framework rule comprising definition.For example, DEFINE a:
HigherThan b, that is, definition node a is higher than node b in system architecture diagram.That is, extracting framework regular collection
In comprising " DEFINE " framework rule, form the first regular collection.
Fig. 3 is the method flow diagram of the acquisition verifying model of the embodiment of the present invention.In an optional implementation manner, such as
Shown in Fig. 3, the corresponding verifying model of metadata schema is obtained according to the first regular collection specifically includes the following steps:
Step S310 obtains the corresponding first query result set of the first regular collection.In a kind of optional implementation
In, as shown in figure 4, obtain the corresponding first query result set of the first regular collection specifically includes the following steps:
Step S311 obtains the corresponding attribute triple of the first framework rule in the first regular collection.Wherein, the is obtained
The corresponding attribute triple of parameter triple corresponding with each node in above-mentioned acquisition system architecture diagram in one framework rule
It is similar.For example, a first framework rule s1 is as follows:
Wherein, the meaning of the first framework rule s1 are as follows: for two nodes a and b, the affiliated group of node a is g1, node b's
Affiliated group is g2, and the type of node a is " Application ", and the type of y-axis coordinate ya, node b are " Technology ", y
Axial coordinate is yb.Wherein, the y-axis coordinate yb of node b is less than the y-axis coordinate ya of node a, and definition node a is higher than node b.
Wherein, the corresponding attribute triple of the first framework rule s1 is respectively as follows:
<a,:type,“Application”>、<a,:group,g>、<a,:yAxis,ya>、
<b,:type,“Technology”>、<b,:group,g>、<b,:yAxis,yb>。
Step S312 converts to obtain the corresponding attribute triple of the first framework rule according to the second pre-defined rule
Corresponding standard triple.In an optional implementation manner, by the change in the corresponding attribute triple of the first framework rule
Quantity symbol be converted to concat ('? ', variable current value), by the variable symbol in the corresponding attribute triple of the first framework rule
Be converted to concat (' ns ', constant current value), in the corresponding attribute triple of the first framework rule by EBNF normal form
The character string that string or number rule generates, does not execute any transformation.It is corresponding by taking above-mentioned first structure rule s1 as an example
Standard triple is respectively as follows:
<? a, ns:type, " Application ">,<? a, ns:group,? g>,<? a, ns:yAxis,? ya>,
<? b, ns:type, " Technology ">,<? b, ns:group,? g>,<? b, ns:yAxis,? yb>
Step S313 obtains the first character string according to standard triple.In an optional implementation manner, first initially
Change the first character string, concat attended operation is then used to connect the corresponding all standard triples of the first framework rule to obtain
First character string.Tentative standard triple is<sub,pre,obj>, then the first character string condition is concat
(condition current value, sub, ", pre, ", obj, ' ', nl), wherein nl is newline.
By taking above-mentioned first structure rule s1 as an example, the first character string condition are as follows:
A ns:type " Application "
A ns:group? g
A ns:yAxis? ya
B ns:type " Technology "
B ns:group? g
B ns:yAxis? yb
Step S314 obtains the second character according to the standard triple that all properties in the first framework rule are variable
String.In an optional implementation manner, if the variable symbol in standard triple is 0, stop current first framework rule
Operation then and the operation for executing next first framework rule, or send exception information and stop all verification operations.
If the variable symbol in standard triple has 1, the second character string is the variable symbol.If the variable symbol in standard triple
Number quantity be greater than 1, then use concat attended operation connect standard triple in variable symbol to obtain the second character
String.Wherein, it is not repeated with the variable symbol in concat attended operation.
By taking above-mentioned first structure rule s1 as an example, the second character string varlist be "? a? g? ya? b? yb ".
Step S315 obtains the corresponding query statement of the first framework rule according to the first character string and the second character string.?
In a kind of optional implementation, construction query statement query is concat (' PREFIX ns:<', U '>', nl ' SELECT
‘varlist,nl‘WHERE{‘,nl,condition,‘}').Wherein, giving when character string U is above-mentioned acquisition metadata schema
The fixed character string for meeting URI format.
By taking above-mentioned first structure rule s1 as an example, corresponding query statement are as follows:
Step S316 executes the corresponding query statement of each first framework rule on metadata schema to obtain the first inquiry
Results set.In an optional implementation manner, SPARQL enforcement engine is called, each first is executed on metadata schema
The corresponding query statement query of structure rule (obtains the corresponding query statement of each first framework rule by step S311-S315
Query), and the first pre- query result set is returned.Wherein, SPARQL (Simple Protocol and RDF Query
Language) it is a kind of query language and data acquisition protocols for RDF exploitation.
For example, the corresponding first pre- query result set of the first regular collection is as shown in table 2.
Table 2
In first query result of table 2, entitled " group1 ", the y-axis for being identified as node2, affiliated group of node a
Coordinate is 34, entitled " group1 ", the y-axis coordinate 26 for being identified as node1, affiliated group of node b.The 2nd article in table 2 is looked into
It askes in result, entitled " group1 ", the y-axis coordinate 45 for being identified as node3, affiliated group of node a, node b's is identified as
Node1, affiliated group of entitled " group1 ", y-axis coordinate 26.It is readily appreciated that, the inquiry in the first pre- query result set
As a result quantity is consistent with the quantity of the first framework rule, and the partial query in the first pre- query result set is only provided in table 2
As a result.
Further, in the present embodiment, condition module, the first pre- query result are not included in response to the first framework rule
Set is the first query result set.It include condition module in response to the first framework rule, from the first pre- query result set
Middle Boolean of deleting is false query result, to obtain the first query result set.Wherein, the calling for including according to condition module
Function calculates the Boolean of the query result in the first pre- query result set.
For example, " WHERE lessThan (yb, the ya) " in above-mentioned first framework rule s1 is in the first framework rule s1
Condition module.
Specifically, it is assumed that include n function call sentence in the first framework rule, be denoted as respectively F1, F2 ..., Fn, n is big
In or equal to 1.It wherein, is function call sentence by the data that func rule in above-mentioned EBNF normal form generates.It is looked into advance for first
Each query result j in set is ask, Boolean expression G=eval (F1, j) ∧ eval (F2, j) ∧ ... ∧ eval is calculated
The value of (Fn, j) deletes corresponding query result j, from the first pre- query result if calculating the Boolean G obtained is vacation to obtain
Take the first query result set.
In an optional implementation, the method for calculating eval (Fi, j) (i is more than or equal to 1 and is less than or equal to n) are as follows:
1, the parameter value in function call sentence Fi is calculated.If parameter is variable symbol, the corresponding tax of the variable symbol
Value is parameter value, and if the y-axis coordinate ya of node a (node identification node2) in table 2 is assigned a value of 34, then the parameter is corresponding
Parameter value is 34.If parameter is function call sentence, it is assumed that be function call sentence be f, then corresponding parameter value for eval (f,
j).If other situations, then the corresponding parameter value of parameter is the corresponding character string of the parameter itself.
2, corresponding execution function is called according to the function name of function call sentence Fi, and is executed according to the parameter value of acquisition
The execution function returns to the value of eval (Fi, j).Thus, it is possible to which the every query result calculated in the first pre- query result is corresponding
Boolean.
Step S320 obtains the corresponding attribute triple of each first framework rule according to the first query result set, wherein
The corresponding attribute triple of first framework rule carries out assignment according to corresponding first query result.With above-mentioned first structure rule
The first query result set in s1 and table 2 (assuming that query result in table 2 is 2, can be calculated this 2 and looks into according to above-mentioned
It is true for asking result) for, the corresponding attribute triple of the first framework rule s1 are as follows:
<node2,type,“Application”>、<node2,group,group1>、
<node2,yAxis,34>、<node3,type,“Application”>、
<node3,group,group1>、<node3,yAxis,45>、
<node1,type,“Technology”>、<node1,group,group1>、
<node1,yAxis,26>
Step S330 obtains the second attribute description set according to the first pre-defined rule.Wherein, the second attribute description set packet
Include the attribute description of the corresponding attribute triple of each first framework rule.It is corresponding with the first framework rule s1 in step S320
Attribute triple, given character string U is for " http://archimate/ns# ", the second attribute description set include:
<http://archimate/ns#node2,http://archimate/ns#type,”Application”>
<http://archimate/ns#node2,http://archimate/ns#group,group1>
<http://archimate/ns#node2,http://archimate/ns#yAxis,34>
<http://archimate/ns#node3,http://archimate/ns#type,”Application”>
<http://archimate/ns#node3,http://archimate/ns#group,group1>
<http://archimate/ns#node3,http://archimate/ns#yAxis,45>
<http://archimate/ns#node1,http://archimate/ns#type,“Technology”>
<http://archimate/ns#node1,http://archimate/ns#group,group1>
<http://archimate/ns#node1,http://archimate/ns#yAxis,26>
In the present embodiment, the attribute description in the second attribute description set does not repeat.
The second attribute description set is added in step S340 in metadata schema, to obtain verifying model.That is,
All first frameworks in first regular collection are added in metadata schema against corresponding second attribute description set, to obtain
Take verifying model.Optionally, in the present embodiment, it for attribute description already existing in metadata schema, does not need to weigh again
Be added with into.
Step S400 verifies verifying model according to Second Rule set.Wherein, Second Rule set includes at least
One the second framework rule.Second framework rule is the framework rule not comprising definition.That is, extracting framework regular collection
In not comprising " DEFINE " framework rule, form Second Rule set.
Fig. 5 is the method flow diagram of the embodiment of the present invention verified to verifying model.In a kind of optional realization side
In formula, as shown in figure 5, according to Second Rule set to verifying model verified the following steps are included:
Step S410 obtains the corresponding second query result set of the Second Rule set.Obtain the second query result
The step of set, is similar with (step S311- step S316) the step of obtaining the first query result set, and details are not described herein.
In the present embodiment, citing description is carried out to obtain the corresponding second query result set of the second framework rule s2.
Wherein, the second framework rule s2 is as follows:
Wherein, the meaning of the second framework rule s2 are as follows: for two nodes a and b, it is assumed that node a and node b belongs to same
Group (namely the attribute value of " group " attribute of node a and node b is identical), and node a and node b belonging to organize title (
That is the attribute value of " group " attribute) preceding 4 letters be not " meta ", the type of node a is " Application ", and y-axis is sat
It is designated as ya, the type of node b is " Technology ", y-axis coordinate yb.Wherein, the y-axis coordinate ya of node a cannot be less than section
The y-axis coordinate yb of point b, and there can be no be source node, node b for destination node using a that adds some points in corresponding system architecture diagram
The incidence relation of " supportBy ".
Wherein, the corresponding attribute triple of the second framework rule s2 is respectively as follows:
<a,:type,“Application”>、<a,:group,g>、<a,:yAxis,ya>、
<b,:type,“Technology”>、<b,:group,g>、<b,:yAxis,yb>。
The corresponding standard triple of second framework rule s2 is respectively as follows:
<? a, ns:type, " Application ">,<? a, ns:group,? g>,<? a, ns:yAxis,? ya>,
<? b, ns:type, " Technology ">,<? b, ns:group,? g>,<? b, ns:yAxis,? yb>
The corresponding first character string condition of second framework rule s2 are as follows:
A ns:type " Application "
A ns:group? g
A ns:yAxis? ya
B ns:type " Technology "
B ns:group? g
B ns:yAxis? yb
The corresponding second character string varlist of second framework rule s2 be "? a? g? ya? b? yb ".
The corresponding query statement of second framework rule s2 are as follows:
It is obtained in step S300 and executes the corresponding query statement of each second framework rule on verifying model to obtain second
Query result set.Optionally, in the present embodiment, by calculating the corresponding Boolean of each query result to the second pre- inquiry knot
Fruit set is filtered to obtain the second query result set.
For example, the corresponding second query result set of Second Rule set is as shown in table 3.
Table 3
In first query result of table 3, entitled " group1 ", the y-axis for being identified as node4, affiliated group of node a
Coordinate is 30, entitled " group1 ", the y-axis coordinate 20 for being identified as node3, affiliated group of node b.The 2nd article in table 3 is looked into
It askes in result, entitled " group1 ", the y-axis coordinate 40 for being identified as node5, affiliated group of node a, node b's is identified as
Node3, affiliated group of entitled " group1 ", y-axis coordinate 20.
Step S420 obtains the corresponding attribute triple of each second framework rule according to the second query result set.Wherein,
The corresponding attribute triple of second framework rule carries out assignment according to corresponding second query result.With above-mentioned second framework rule
The first query results in s2 and table 3 are combined into example, the corresponding attribute triple of the second framework rule s2 are as follows:
<node4,type,“Application”>、<node4,group,group1>、
<node4,yAxis,30>、<node5,type,“Application”>、
<node5,group,group1>、<node5,yAxis,40>、
<node3,type,“Technology”>、<node3,group,group1>、
<node3,yAxis,20>
Step S430 obtains third attribute description set according to the first pre-defined rule.Wherein, third attribute description set packet
Include the attribute description of the corresponding attribute triple of each second framework rule.It is corresponding with the second framework rule s2 in step S420
Attribute triple, given character string U is for " http://archimate/ns# ", third attribute description set include:
<http://archimate/ns#node4,http://archimate/ns#type,”Application”>
<http://archimate/ns#node4,http://archimate/ns#group,group1>
<http://archimate/ns#node4,http://archimate/ns#yAxis,30>
<http://archimate/ns#node5,http://archimate/ns#type,”Application”>
<http://archimate/ns#node5,http://archimate/ns#group,group1>
<http://archimate/ns#node5,http://archimate/ns#yAxis,40>
<http://archimate/ns#node3,http://archimate/ns#type,“Technology”>
<http://archimate/ns#node3,http://archimate/ns#group,group1>
<http://archimate/ns#node3,http://archimate/ns#yAxis,20>
In the present embodiment, the attribute description in third attribute description set does not repeat.
Step S440 verifies the second query result set and third attribute description set.A kind of optional
In implementation, meet the first predetermined condition in response to third attribute description set, and the second query result set meets second
Predetermined condition, system architecture diagram pass through verifying.Wherein, the first predetermined condition is specially the third category in third attribute description set
Property description verifying model in include state the second framework rule match corresponding with the third attribute description.Second predetermined item
Part is specially that record corresponding Boolean be true to every in the second query result set.
That is, checking in corresponding verifying model whether include that the second framework rule is right for the first predetermined condition
The third attribute description set answered.If the keyword in the second framework rule is " EXIST ", but in corresponding verifying model not
Including the corresponding third attribute description set of second framework rule, if the keyword in the second framework rule is " NOT
EXIST ", but in corresponding verifying model include the corresponding third attribute description set of second framework rule, then it is assumed that it should
System architecture diagram does not meet second framework rule.Conversely, if the keyword in the second framework rule is " EXIST ", it is corresponding
Verifying in model also includes the corresponding third attribute description set of second framework rule, if the pass in the second framework rule
Keyword is " NOT EXIST ", does not also include the corresponding third attribute description collection of second framework rule in corresponding verifying model
It closes, then it is assumed that the system architecture diagram meets second framework rule.To include that above-mentioned second framework rule s2 is in framework rule
, the keyword in the second framework rule s2 is " NOT EXIST ", therefore, if in corresponding verifying model including the second framework
The corresponding third attribute description set of regular s2, then the corresponding system architecture diagram of verifying model does not meet the second framework rule
S2, if in corresponding verifying model not including the corresponding third attribute description set of the second framework rule s2, the verifying model
Corresponding system architecture diagram meets the second framework rule s2.
The present embodiment is by being converted to corresponding metadata schema for system architecture diagram as a result, and is based on predetermined format number
According to the scheduled framework specification text of parsing to obtain the first regular collection and Second Rule set, according to first regular collection
The corresponding verifying model of the metadata schema is obtained, and the verifying model is tested according to the Second Rule set
Card thus, it is possible to improve the accuracy of system architecture verifying, and reduces verifying cost.
Fig. 6-Fig. 9 is the schematic diagram of the system architecture diagram of the embodiment of the present invention.Assuming that the framework canonical collection provided
It is as follows:
That is, the framework specification provides that the node that all categories in system architecture diagram are " Technology " cannot
Higher than the node that any classification is " Application ".As shown in fig. 6, application service 61, software in system architecture Fig. 6 and
The classification of all nodes in interface 62, back-stage management 63 and peripheral system 64 is " Application ", infrastructure services
65 and all nodes in infrastructure device 66 classification be " Technology ".Then obvious system architecture Fig. 6 is to meet above-mentioned rule
Model.
In an optional implementation manner, as shown in fig. 7, system architecture diagram the design page, breathe out menu option,
Selection " check Model " item verifies system architecture diagram.Wherein, " check Model " item is above-mentioned system architecture
The corresponding plug-in unit of verification method.
After being verified, the page that system architecture diagram meets framework specification text is shown as shown in figure 8, showing " verifying
Pass through " etc. information.The pressure surface that system architecture diagram does not meet system architecture text is shown as shown in figure 9, framework specification will not met
Node Special display modify in order to developer, such as in peripheral system 64 part of nodes RMB, FX2009 and
CIM etc..Thus, it is possible to the rapid automatized verifying of system architecture diagram, improve the accuracy of verifying, and reduce verifying at
This.
Figure 10 is the schematic diagram of the verifying device of the system architecture of the embodiment of the present invention.As shown in Figure 10, the present embodiment
The verifying device 10 of system architecture includes that resolution unit 101, converting unit 102, verifying model acquiring unit 103 and verifying are single
Member 104.
Resolution unit 101 is configured as parsing scheduled framework specification text based on predetermined format data to obtain framework rule
Then gather.Wherein, framework regular collection includes the first regular collection and Second Rule set.First regular collection includes at least one
A first framework rule, Second Rule set include at least one second framework rule.First framework rule is to include definition
Framework rule, the second framework rule are the framework rule not comprising definition.Converting unit 102 is configured as turning system architecture diagram
It is changed to corresponding metadata schema.Wherein, metadata schema includes describing each node and each node in the system architecture diagram
Between correlation data.Verifying model acquiring unit 103 is configured as according to first regular collection acquisition
The corresponding verifying model of metadata schema.Authentication unit 104 be configured as according to Second Rule set to the verifying model into
Row verifying.
Optionally, converting unit 102 includes that the first attribute triple obtains subelement 1021, the first attribute description obtains son
Unit 1022, conversion subunit 1023.First attribute triple obtains subelement 1021 and is configured as obtaining the system architecture
The attribute triple of each node in figure.Wherein.Attribute triple includes mark, Property Name and the attribute value of node.First
Attribute description obtains subelement 1022 and is configured as being retouched according to corresponding first attribute of the first pre-defined rule acquisition attribute triple
It states.Conversion subunit 1023 is configured as integrating the first all attribute descriptions to obtain the metadata schema.
Optionally, verifying model acquiring unit 103 includes that the first query result obtains subelement 1031, the second attribute ternary
Group obtains subelement 1032, the second attribute description obtains subelement 1033 and verifying model obtains subelement 1034.Wherein,
One query result obtains subelement 1031 and is configured as obtaining the corresponding first query result set of first regular collection.The
Two attribute triples obtain subelement 1032 and are configured as obtaining each first framework rule according to the first query result set
Corresponding attribute triple.Wherein, the corresponding attribute triple of the first framework rule is carried out according to corresponding first query result
Assignment.Second attribute description obtains subelement 1033 and is configured as obtaining the second attribute description set according to the first pre-defined rule.
Wherein, the second attribute description set includes the attribute description of the corresponding attribute triple of each first framework rule.Verify mould
Type obtains subelement 1034 and is configured as that the second attribute description set is added in metadata schema, to obtain verifying mould
Type.
Optionally, the first query result obtains subelement 1031 and is configured to: obtaining first regular collection
In the corresponding attribute triple of the first framework rule;According to the second pre-defined rule to the corresponding attribute of the first framework rule
Triple is converted to obtain corresponding standard triple;The first character string is obtained according to the standard triple;According to institute
It states the standard triple that all properties in the first framework rule are variable and obtains the second character string;According to first character string
The corresponding query statement of the first framework rule is obtained with second character string;Each institute is executed on the metadata schema
The corresponding query statement of the first framework rule is stated to obtain the first query result set.
Optionally, the first query result obtains subelement 1031 and is configured to: holding on the metadata schema
Row the first pre- query result set of each corresponding query statement acquisition of first framework rule;It is advised in response to first framework
It then include condition module, it is false query result that Boolean is deleted from the described first pre- query result set, to obtain first
Query result set.Wherein, function is called to calculate the inquiry knot in the first pre- query result set according to what condition module included
The Boolean of fruit.
Optionally, authentication unit 104 includes that the second query result obtains subelement 1041, third attribute triple obtains son
Unit 1042, third attribute description obtain subelement 1043 and verifying subelement 1034.Second query result obtains subelement
1041 are configured as obtaining the corresponding second query result set of Second Rule set.Third attribute triple obtains subelement
1042 are configured as obtaining the corresponding attribute triple of each second framework rule according to the second query result set.Wherein,
The corresponding attribute triple of second framework rule carries out assignment according to corresponding second query result.Third attribute description obtains son
Unit 1043 is configured as obtaining third attribute description set according to the first pre-defined rule.Wherein, third attribute description set packet
Include the attribute description of the corresponding attribute triple of each second framework rule.Verifying subelement 1034 is configured as looking into second
It askes results set and the third attribute description set is verified.In the present embodiment, if third attribute description set is full
The first predetermined condition of foot, and the second query result set meets the second predetermined condition, system architecture diagram passes through verifying.Wherein,
One predetermined condition be specially third attribute description in third attribute description set in verifying model comprising state and this
The corresponding second framework rule match of three attribute descriptions, the second predetermined condition are specially every in the second query result set
It is true that item, which records corresponding Boolean,.
The present embodiment is parsed by the way that system architecture diagram is converted to corresponding metadata schema based on predetermined format data
Scheduled framework specification text obtains institute to obtain the first regular collection and Second Rule set, according to first regular collection
The corresponding verifying model of metadata schema is stated, and the verifying model is verified according to the Second Rule set, as a result,
The accuracy of system architecture verifying can be improved, and reduce verifying cost.
Figure 11 is the schematic diagram of the electronic equipment of the embodiment of the present invention.Electronic equipment shown in Figure 11 is general data processing
Device comprising general computer hardware structure includes at least processor 111 and memory 112.It processor 111 and deposits
Reservoir 112 is connected by bus 113.Memory 112 is suitable for the instruction or program that storage processor 111 can be performed.Processor 111
It can be independent microprocessor, be also possible to one or more microprocessor set.Processor 111 passes through execution as a result,
The instruction that memory 112 is stored, thereby executing the method flow of the embodiment of the present application as described on s is realized for data
Processing and the control for other devices.Bus 113 links together above-mentioned multiple components, while said modules being connected to
Display controller 114 and display device and input/output (I/O) device 115.Input/output (I/O) device 115 can be
Mouse, keyboard, modem, network interface, touch-control input device, body-sensing input unit, printer and known in this field
Other devices.Typically, input/output device 115 is connected by input/output (I/O) controller 116 with system.
It will be understood by those skilled in the art that embodiments herein can provide as method or computer program product.This
Application can be used one or more wherein include computer usable program code computer readable storage medium (including but
Be not limited to magnetic disk storage, CD-ROM, optical memory etc.) on the computer program product implemented.
The application is that reference is described according to the flow chart of the method for the embodiment of the present application and computer program product.
It should be understood that each process in flow chart can be realized by computer program instructions.
These computer program instructions, which can store, is being able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
The manufacture of device is enabled, the function of specifying in one process of the command device implementation flow chart or multiple processes.
The embodiment of the present invention further relates to a kind of non-volatile memory medium, for storing computer-readable program, the meter
Calculation machine readable program is used to execute above-mentioned all or part of embodiment of the method for computer.That is, those skilled in the art can be with
Understand, implementing the method for the above embodiments is that can instruct relevant hardware come complete by program
At the program is stored in a storage medium, including some instructions are used so that an equipment (can be single-chip microcontroller, chip
Deng) or processor (processor) execute each embodiment the method for the application all or part of the steps.And storage above-mentioned
Medium include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-OnlB MemorB), random access memory (RAM,
Random Access MemorB), the various media that can store program code such as magnetic or disk.
The above description is only a preferred embodiment of the present invention, is not intended to restrict the invention, for those skilled in the art
For, the invention can have various changes and changes.All any modifications made within the spirit and principles of the present invention are equal
Replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of verification method of system architecture, which is characterized in that the described method includes:
Scheduled framework specification text is parsed based on predetermined format data to obtain framework regular collection, the framework regular collection
Including the first regular collection and Second Rule set, first regular collection includes at least one first framework rule, described
Second Rule set includes at least one second framework rule, and the first framework rule is the framework rule comprising definition, institute
Stating the second framework rule is the framework rule not comprising definition;
System architecture diagram is converted into corresponding metadata schema, the metadata schema includes describing in the system architecture diagram
The data of correlation between each node and each node;
The corresponding verifying model of the metadata schema is obtained according to first regular collection;
The verifying model is verified according to the Second Rule set.
2. the method according to claim 1, wherein obtaining the corresponding metadata schema packet of the system architecture
It includes:
The attribute triple of each node in the system architecture diagram is obtained, the attribute triple includes the mark of the node
Knowledge, Property Name and attribute value;
Corresponding first attribute description of the attribute triple is obtained according to the first pre-defined rule;
The first all attribute descriptions is integrated to obtain the metadata schema.
3. the method according to claim 1, wherein obtaining the metadata mould according to first regular collection
The corresponding verifying model of type includes:
Obtain the corresponding first query result set of first regular collection;
The corresponding attribute triple of each first framework rule is obtained according to the first query result set, wherein described
The corresponding attribute triple of first framework rule carries out assignment according to corresponding first query result;
The second attribute description set is obtained according to the first pre-defined rule, the second attribute description set includes each first
The attribute description of the corresponding attribute triple of structure rule;
The second attribute description set is added, in the metadata schema to obtain verifying model.
4. according to the method described in claim 3, it is characterized in that, according to the Second Rule set to the verifying model into
Row is verified
Obtain the corresponding second query result set of the Second Rule set;
The corresponding attribute triple of each second framework rule is obtained according to the second query result set, wherein described
The corresponding attribute triple of second framework rule carries out assignment according to corresponding second query result;
Third attribute description set is obtained according to first pre-defined rule, the third attribute description set includes each described the
The attribute description of the corresponding attribute triple of two frameworks rule;
The second query result set and the third attribute description set are verified.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
Meet the first predetermined condition in response to the third attribute description set, and the second query result set meets second
Predetermined condition, the system architecture diagram pass through verifying;
Wherein, first predetermined condition is specially third attribute description in the third attribute description set in the verifying
In model includes state the second framework rule match corresponding with the third attribute description, and second predetermined condition is specially
It is true that every in the second query result set, which records corresponding Boolean,.
6. according to the method described in claim 4, it is characterized in that, obtaining the corresponding first inquiry knot of first regular collection
Fruit set includes:
Obtain the corresponding attribute triple of the first framework rule in first regular collection;
The corresponding attribute triple of the first framework rule is converted to obtain corresponding mark according to the second pre-defined rule
Quasi- triple;
The first character string is obtained according to the standard triple;
The second character string is obtained according to the standard triple that all properties in the first framework rule are variable;
The corresponding query statement of the first framework rule is obtained according to first character string and second character string;
The corresponding query statement of each first framework rule is executed on the metadata schema to obtain first inquiry
Results set.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
In response to not including variable's attribute in the first framework rule, sends exception information and stop verifying.
8. according to the method described in claim 6, it is characterized in that, executing each first framework on the metadata schema
The corresponding query statement of rule includes: to obtain the first query result set
The corresponding query statement of each first framework rule is executed on the metadata schema obtains the first pre- query result
Set;
It include condition module in response to the first framework rule, Boolean is deleted from the described first pre- query result set is
False query result, to obtain the first query result set;
Wherein, the boolean for the query result for calling function to calculate in the first pre- query result set for including according to condition module
Value.
9. a kind of electronic equipment, which is characterized in that including memory and processor, wherein the memory is for storing one
Or a plurality of computer instruction, one or more computer instruction are executed by the processor to realize in claim 1-8
Described in any item methods.
10. a kind of computer readable storage medium, stores computer program instructions thereon, which is characterized in that the computer journey
Such as method of any of claims 1-8 is realized in sequence instruction when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910420023.0A CN110188432B (en) | 2019-05-20 | 2019-05-20 | System architecture verification method, electronic device and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910420023.0A CN110188432B (en) | 2019-05-20 | 2019-05-20 | System architecture verification method, electronic device and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110188432A true CN110188432A (en) | 2019-08-30 |
CN110188432B CN110188432B (en) | 2023-01-31 |
Family
ID=67716885
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910420023.0A Active CN110188432B (en) | 2019-05-20 | 2019-05-20 | System architecture verification method, electronic device and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110188432B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704635A (en) * | 2019-09-16 | 2020-01-17 | 金色熊猫有限公司 | Conversion method and device for ternary group data in knowledge graph |
CN113568600A (en) * | 2021-07-21 | 2021-10-29 | 上海淇玥信息技术有限公司 | Application architecture attribute information management method and device and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090138498A1 (en) * | 2007-11-26 | 2009-05-28 | Microsoft Corporation | Rdf store database design for faster triplet access |
CN103729523A (en) * | 2014-01-22 | 2014-04-16 | 中国人民解放军国防科学技术大学 | Automatic verification method orienting to parameterization system |
-
2019
- 2019-05-20 CN CN201910420023.0A patent/CN110188432B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090138498A1 (en) * | 2007-11-26 | 2009-05-28 | Microsoft Corporation | Rdf store database design for faster triplet access |
CN103729523A (en) * | 2014-01-22 | 2014-04-16 | 中国人民解放军国防科学技术大学 | Automatic verification method orienting to parameterization system |
Non-Patent Citations (1)
Title |
---|
赵玉强等: "基于CPN模型的REST服务架构标准特征验证方法研究", 《计算机工程与科学》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704635A (en) * | 2019-09-16 | 2020-01-17 | 金色熊猫有限公司 | Conversion method and device for ternary group data in knowledge graph |
CN110704635B (en) * | 2019-09-16 | 2023-12-12 | 金色熊猫有限公司 | Method and device for converting triplet data in knowledge graph |
CN113568600A (en) * | 2021-07-21 | 2021-10-29 | 上海淇玥信息技术有限公司 | Application architecture attribute information management method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN110188432B (en) | 2023-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105550241B (en) | Multi-dimensional database querying method and device | |
US6216132B1 (en) | Method and system for matching consumers to events | |
US8892599B2 (en) | Apparatus and method for securing preliminary information about database fragments for utilization in mapreduce processing | |
CN109240901B (en) | Performance analysis method, performance analysis device, storage medium, and electronic apparatus | |
US6738759B1 (en) | System and method for performing similarity searching using pointer optimization | |
US6618727B1 (en) | System and method for performing similarity searching | |
KR101835345B1 (en) | Concept graph expansion system based on knowledge base | |
KR102330547B1 (en) | Building reports | |
KR101662561B1 (en) | Method and device for generating an rdf database for an rdf database query and a search method and a search device for the rdf database query | |
JP2010501096A (en) | Cooperative optimization of wrapper generation and template detection | |
JP5535062B2 (en) | Data storage and query method for time series analysis of weblog and system for executing the method | |
JP2013531289A (en) | Use of model information group in search | |
CN110019384B (en) | Method for acquiring blood edge data, method and device for providing blood edge data | |
CN104750496A (en) | Automatic checking method for change influence degree of model | |
CN110188432A (en) | Verification method, electronic equipment and the computer readable storage medium of system architecture | |
Oluwagbemi et al. | Automatic generation of test cases from activity diagrams for UML based testing (UBT) | |
JP5639417B2 (en) | Information processing apparatus, information processing method, and program | |
KR100575581B1 (en) | Method and apparatus for analyzing functionality and test path of product line using priority graph | |
CN115017182A (en) | Visual data analysis method and equipment | |
KR100899616B1 (en) | Method and system of management metadata using relational database management system | |
CN107368500A (en) | Data pick-up method and system | |
CN116450908B (en) | Self-service data analysis method and device based on data lake and electronic equipment | |
JP3914081B2 (en) | Access authority setting method and structured document management system | |
JP2011510372A (en) | Method, system, and computer program for data structure navigation (method and system for data structure navigation) | |
Chacko et al. | Capturing provenance for big data analytics done using SQL interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |