CN116955211A - Standard compliance testing method and device, electronic equipment and storage medium - Google Patents
Standard compliance testing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116955211A CN116955211A CN202311219543.8A CN202311219543A CN116955211A CN 116955211 A CN116955211 A CN 116955211A CN 202311219543 A CN202311219543 A CN 202311219543A CN 116955211 A CN116955211 A CN 116955211A
- Authority
- CN
- China
- Prior art keywords
- standard
- verification
- node
- test
- nodes
- 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
- 238000012360 testing method Methods 0.000 title claims abstract description 179
- 238000012795 verification Methods 0.000 claims abstract description 279
- 238000007689 inspection Methods 0.000 claims abstract description 66
- 238000000034 method Methods 0.000 claims description 63
- 238000012545 processing Methods 0.000 claims description 10
- 238000000605 extraction Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 4
- 238000010200 validation analysis Methods 0.000 claims 1
- 239000000463 material Substances 0.000 description 21
- 238000004519 manufacturing process Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000010998 test method Methods 0.000 description 2
- 239000002131 composite material Substances 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a standard compliance testing method, a device, electronic equipment and a storage medium, which relate to the technical field of standard compliance testing and comprise the following steps: extracting target verification standards corresponding to data to be verified from a preset standard reference library; determining a target standard inspection item corresponding to each metadata to be verified from a plurality of standard inspection items corresponding to the target verification standard; creating a multi-standard reference tree according to the associated verification mark corresponding to each target standard inspection item, wherein the associated verification mark indicates the associated verification standard corresponding to the standard inspection item, and the multi-standard reference tree comprises a plurality of verification nodes; and completing the standard conformance test of the metadata to be verified by using the verification information corresponding to each verification node in the multi-standard reference tree. According to the application, the multi-standard reference tree is created by utilizing a plurality of verification standards associated with the data items so as to complete standard compliance test, so that the test efficiency is improved and the test accuracy is ensured.
Description
Technical Field
The present application relates to the field of standard compliance testing technologies, and in particular, to a standard compliance testing method, a device, an electronic apparatus, and a storage medium.
Background
Currently, through the standard digitization of intelligent manufacturing data knowledge, standard content for interpretable and executable aspects of machines (including industrial automation equipment, machine tools, intelligent sensors, other industrial automation systems and the like) is oriented, and the standard content/semantics are understandable and executable on the basis of standard text/grammar readability.
In order to ensure the production progress, a large amount of manpower is required to carry out standard compliance test on test software so as to check whether metadata in the test software accords with the standard, and the existing scheme mainly aims at finishing the standard compliance test aiming at a single standard in the industry, but in an actual scene, the test on the data item often depends on the single standard, but the correlation verification condition among multiple standards exists, so that the complex scene simply depends on the manual test, a large amount of time is required, the test efficiency is greatly reduced, the condition of the multi-standard correlation test cannot be solved, and the inaccuracy of the test result is caused.
Disclosure of Invention
In view of the above, the present application is directed to at least one standard compliance testing method, apparatus, electronic device and storage medium, which can complete standard compliance testing by creating a multi-standard reference tree using a plurality of verification standards associated with data items, thereby improving testing efficiency and ensuring testing accuracy.
The application mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a method for testing standard compliance, where the method includes: extracting metadata information corresponding to the data to be verified from the software to be verified, wherein the metadata information comprises a plurality of metadata to be verified; extracting target verification standards corresponding to data to be verified from a preset standard reference library, wherein the preset standard reference library comprises a plurality of verification standards for carrying out standard compliance test on software to be tested, and each verification standard comprises a plurality of standard inspection items; determining a target standard inspection item corresponding to each metadata to be verified from a plurality of standard inspection items corresponding to the target verification standard; creating a multi-standard reference tree according to the associated verification mark corresponding to each target standard inspection item, wherein the associated verification mark indicates the associated verification standard corresponding to the standard inspection item, and the multi-standard reference tree comprises a plurality of verification nodes; and completing the standard conformance test of the metadata to be verified by using the verification information corresponding to each verification node in the multi-standard reference tree.
In one possible implementation, the standard reference library is created by: acquiring a plurality of data standards for carrying out standard compliance test on software to be tested; for each data standard, extracting information from the content recorded by the data standard to obtain a plurality of standard check items corresponding to the data standard; converting a plurality of standard check items corresponding to each data standard into a preset format aiming at each data standard, and forming a verification standard corresponding to the data standard by the plurality of standard check items in the preset format; a standard reference library is generated from a plurality of verification standards.
In one possible implementation manner, the step of creating the multi-standard reference tree according to the associated verification identifier corresponding to each target standard inspection item includes: creating a standard reference tree to be processed for carrying out standard conformance test on data to be verified by taking a plurality of target standard inspection items as verification nodes according to father-son relations among the standard inspection items; traversing the standard reference tree to be processed according to the breadth-first traversing sequence to expand the standard reference tree to be processed according to the associated verification identification corresponding to the standard inspection item to which each verification node belongs, thereby obtaining a multi-standard reference tree.
In one possible implementation, the standard reference tree to be processed is expanded to obtain a multi-standard reference tree by: for each verification node with an associated verification identifier in the standard tree to be processed, the following virtual node adding processing is executed: determining at least one association verification standard indicated by the association verification identifier, and respectively creating virtual nodes corresponding to each association verification standard under father nodes to which the verification nodes belong; extracting at least one associated verification standard corresponding to the verification node from a preset standard reference library; for each associated verification standard, extracting an associated standard check item corresponding to the verification node from the associated verification standard, and adding the associated standard check item under a virtual node corresponding to the associated verification standard; and after the virtual node addition processing is completed, obtaining a multi-standard reference tree.
In one possible implementation manner, the verification information includes node serial numbers of each verification node and virtual nodes corresponding to each verification node in the multi-standard reference tree, and first verification conditions corresponding to each verification node and second verification conditions corresponding to each child node under the virtual nodes corresponding to each verification node, where before determining the compliance test result, the method further includes: traversing the multi-standard reference tree according to the breadth-first traversing sequence aiming at the multi-standard reference tree to assign node serial numbers to each verification node under the multi-standard reference tree and virtual nodes corresponding to each verification node, wherein the virtual node serial numbers are the same as the associated verification node serial numbers; and adding corresponding verification conditions for each verification node in the multi-standard reference tree according to the standard attribute value corresponding to the standard inspection item corresponding to the verification node.
In one possible embodiment, before completing the compliance test, the method further comprises: creating a tree to be tested by taking a plurality of metadata to be verified as test nodes according to father-son relations among the metadata to be verified; traversing each test node of the tree to be tested by adopting a depth-first traversing sequence; in the traversal process, for each test node of the tree to be tested, the test node is respectively matched with each verification node corresponding to the multi-standard reference tree, and the serial number corresponding to the verification node matched with the test node is determined as the node serial number corresponding to the test node.
In one possible embodiment, the compliance test is accomplished by: for each test node in the tree under test, the following process is performed: if virtual nodes exist in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, a second verification condition corresponding to the virtual nodes is called to carry out one-time verification comparison on the test nodes, and a virtual node comparison result is obtained; performing secondary comparison on the test node by using the verification conditions corresponding to the verification node and combining the virtual node comparison result to finish the compliance test of the metadata to be verified corresponding to the test node; if no virtual node exists in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, the verification conditions of the verification nodes corresponding to the test nodes are directly utilized to carry out verification comparison on the test nodes so as to complete the compliance test of the metadata to be verified corresponding to the test nodes.
In a second aspect, the present application also provides a standard compliance testing apparatus, the apparatus comprising: the first extraction module is used for extracting metadata information corresponding to the data to be verified from the software to be verified, wherein the metadata information comprises a plurality of metadata to be verified; the second extraction module is used for extracting target verification standards corresponding to the data to be verified from a preset standard reference library, wherein the preset standard reference library comprises a plurality of verification standards for carrying out standard compliance test on the software to be tested, and each verification standard comprises a plurality of standard check items; the determining module is used for determining a target standard inspection item corresponding to each metadata to be verified from a plurality of standard inspection items corresponding to the target verification standard; the creation module is used for creating a multi-standard reference tree according to the associated verification mark corresponding to each target standard inspection item, wherein the associated verification mark indicates the associated verification standard corresponding to the standard inspection item, and the multi-standard reference tree comprises a plurality of verification nodes; and the testing module is used for completing standard compliance testing of the metadata to be verified by utilizing the verification information corresponding to each verification node in the multi-standard reference tree.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine readable instructions being executable by the processor to perform the steps of the standard compliance testing method provided in the first aspect or any of the possible implementation manners of the first aspect.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor performs the steps of the standard compliance test provided in the first aspect or any of the possible implementation manners of the first aspect.
The embodiment of the application provides a standard compliance testing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: extracting target verification standards corresponding to data to be verified from a preset standard reference library; determining a target standard inspection item corresponding to each metadata to be verified from a plurality of standard inspection items corresponding to the target verification standard; creating a multi-standard reference tree according to the associated verification mark corresponding to each target standard inspection item, wherein the associated verification mark indicates the associated verification standard corresponding to the standard inspection item, and the multi-standard reference tree comprises a plurality of verification nodes; and completing the standard conformance test of the metadata to be verified by using the verification information corresponding to each verification node in the multi-standard reference tree. According to the application, the multi-standard reference tree is created by utilizing a plurality of verification standards associated with the data items so as to complete standard compliance test, so that the test efficiency is improved and the test accuracy is ensured.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for testing standard compliance according to an embodiment of the present application;
FIG. 2 shows a schematic diagram of creating a standard reference tree to be processed according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a multi-standard reference tree creation process provided by an embodiment of the present application;
FIG. 4 is a functional block diagram of a standard compliance testing apparatus according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be appreciated that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art based on embodiments of the application without making any inventive effort, fall within the scope of the application.
And (5) testing the compliance.
For example, when a designer performs design, a corresponding device needs to be selected in a design BOM (bill of materials) of a management system, but in a production process, a situation that the design pattern is inconsistent with the material information in the BOM often occurs, and thus production cannot be performed. To ensure the production progress, a large number of manual checks are required to check whether the design meets the standard. Corresponding methods and tools can be verified by developing digital standard compliance tests of the intelligent manufacturing standard, so that manual work is replaced, and the production efficiency and the production quality are effectively improved. The existing scheme mainly aims at a single standard of the industry, a standard reference library is firstly established, and then comparison is carried out, so that the standard compliance testing method is completed.
Based on this, the embodiment of the application provides a standard compliance testing method, a device, an electronic device and a storage medium, which are used for creating a multi-standard reference tree by utilizing a plurality of verification standards associated with data items to complete standard compliance testing, thereby improving testing efficiency and ensuring testing accuracy, and specifically comprises the following steps:
referring to fig. 1, fig. 1 is a flowchart illustrating a method for testing standard compliance according to an embodiment of the present application. As shown in fig. 1, the method for testing standard compliance provided by the embodiment of the application comprises the following steps:
s100, extracting metadata information corresponding to the data to be verified from the software to be tested.
The metadata information includes a plurality of metadata to be verified.
S200, extracting target verification standards corresponding to the data to be verified from a preset standard reference library.
The preset standard reference library comprises a plurality of verification standards for carrying out standard compliance testing on the software to be tested, and each verification standard comprises a plurality of standard check items.
S300, determining a target standard inspection item corresponding to each metadata to be verified from a plurality of standard inspection items corresponding to the target verification standard.
S400, creating a multi-standard reference tree according to the associated verification identifier corresponding to each target standard inspection item.
The association verification identification indicates an association verification standard corresponding to the standard inspection item, and the multi-standard reference tree comprises a plurality of verification nodes.
S500, completing standard compliance testing of the metadata to be verified by using verification information corresponding to each verification node in the multi-standard reference tree.
In step S100, a compliance test task may be first acquired, where the compliance test task carries data to be verified, where the data to be verified indicates material information, manufacturing resources, process routes, procedures, structural parameters, and the like generated by industrial equipment or systems, metadata information corresponding to different types of data to be verified is also different, where the metadata information is data for describing the data to be verified, and if the data to be verified is manufacturing resource data, the corresponding plurality of metadata to be verified includes but is not limited to at least one of the following items: process equipment, process equipment codes, tools, tool codes and the like, and each metadata to be verified comprises an attribute item to be verified, wherein the attribute item to be verified comprises, but is not limited to, chinese names, english names, abbreviations, definitions, data types, value fields, constraint conditions and maximum occurrence times.
In step S200, a standard reference library is created by:
The method comprises the steps of obtaining a plurality of data standards for carrying out standard compliance testing on software to be tested, extracting information from content recorded by the data standards according to each data standard to obtain a plurality of standard check items corresponding to the data standards, converting the plurality of standard check items corresponding to the data standards into a preset format according to each data standard, forming a verification standard corresponding to the data standard by the plurality of standard check items in the preset format, and generating a standard reference library by the plurality of verification standards.
The preset format may be an XML format, in an example, after determining the software to be tested, the data standard to be met by the software to be tested may be collected according to the test task, and then the standard inspection item corresponding to each data standard may be sequentially identified and extracted from two aspects of semantics and grammar, where the extraction process includes, but is not limited to, identification, understanding, screening and normalization, and each standard inspection item includes a plurality of standard attribute items, where the standard attribute items include, but are not limited to, chinese names, english names, name abbreviations, definitions, data types, value fields, constraint conditions and maximum occurrence numbers, that is, the labeling attribute items included in the standard inspection item and the attribute items to be verified in the present application are corresponding.
The data type, such as numeric, character string, date, binary, boolean, etc., the value field represents a set of allowed values for the standard test item, the constraint represents an indicator of the standard test item, indicating whether the standard test item should always be selected or sometimes, the values are:
m: the presentation criteria check item must be selected, indicating that the criteria check item should be selected.
C: the representation standard inspection item is selected under preset conditions, and when the preset conditions defined in the constraint conditions are met, the preset conditions are selected for one of the following three possibilities:
-when selecting among a plurality of standard test items, at least one of the standard test items is mandatory and should be used;
-selecting one standard test item when another standard test item has been used;
-selecting one standard test item when the other standard test item has selected a specific value;
o: optionally, the standard inspection item may or may not be selected according to the actual application.
The maximum number of occurrences indicates the maximum number of times that the standard test item may repeatedly occur in actual use, and the representation of only one occurrence is "1", and the representation of repeated occurrence is "N".
Table 1:
sequence number | Chinese name | English name | Definition of the definition | Data type | Value range | Constraint conditions | Maximum number of occurrences |
1 | Material information | Material Information | Refers to the information of raw materials, auxiliary materials and the like | Composite type | 1.1 〜1.6 | M | N |
1.1 | Name of art object | Process Object Name | Name of object to be processed | Character string | Free text | M | 1 |
1.2 | Process object coding | Process Object ID | Encoding of objects to be processed | Character string | Free text | M | 1 |
1.3 | Auxiliary material name | Auxiliary Material Name | In the processThe name of the auxiliary material required | Character string | Free text | O | N |
1.4 | Auxiliary material coding | Auxiliary Material ID | Auxiliary material coding required in process | Character string | Free text | O | N |
1.5 | Object relationships | Object Relationship | Contact between the manufactured object and its associated object | Character string | Free text | O | N |
Table 1 belongs to a part of standard inspection items specified in general metadata standard of basic manufacturing process, and is exemplified by a standard inspection item corresponding to a serial number 1.1, wherein the standard data item is characterized in that a Chinese name is a process object name, an English name is Process Object Name, the name is defined as a processed object, a data type is a character string, a value range is a free text, a constraint condition is M, the maximum occurrence number is 1, and material information corresponding to the data inspection item 1 comprises a process object code, a process object name, an auxiliary material code and an object relation.
In step S300, one verification criterion includes a very large number of standard check items, and therefore, it is sufficient to extract a standard check item corresponding to metadata to be verified from a plurality of standard check items.
Step S400 includes:
and using a plurality of target standard inspection items as verification nodes, creating a standard reference tree to be processed for carrying out standard conformance test on data to be verified according to father-son relations among the standard inspection items, traversing the standard reference tree to be processed according to breadth-first traversing sequence, and expanding the standard reference tree to be processed according to the associated verification identification corresponding to the target standard inspection item to which each verification node belongs to, so as to obtain a multi-standard reference tree.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating creation of a standard reference tree to be processed according to an embodiment of the present application. The verification criteria corresponding to table 1 above are taken as examples, and include material information, process object name, process object code, auxiliary material name, auxiliary material code and object relationship, wherein the material information is used as a parent node (primary node), the process object name, process object code, auxiliary material name, auxiliary material code and object relationship are used as child nodes (secondary nodes) of the material information, and a standard reference tree to be processed is created as shown in fig. 2.
After the standard reference tree corresponding to the target verification standard is established, the tree needs to be traversed by using a breadth-first mode, nodes with the associated verification standard are found out by combining the associated verification identifiers in the traversal process, and as the multi-standard verification scene is frequently adopted in the actual test condition, the multi-standard verification scene refers to the condition that the metadata to be verified needs to be simultaneously in accordance with a plurality of verification standards when the metadata to be verified is subjected to standard compliance check, and a nested detection relation exists, for example, the definition of a certain name needs to be simultaneously combined with two standards to carry out compliance judgment.
In another preferred embodiment, the standard reference tree to be processed is expanded to obtain a multi-standard reference tree by: for each verification node with an associated verification identifier in the standard tree to be processed, the following virtual node adding processing is executed: determining at least one association verification standard indicated by the association verification identifier, respectively creating virtual nodes corresponding to each association verification standard under father nodes to which the verification nodes belong, extracting at least one association verification standard corresponding to the verification nodes from a preset standard reference library, extracting association standard check items corresponding to the verification nodes from the association verification standards aiming at each association verification standard, adding the association standard check items to the virtual nodes corresponding to the association verification standards, and obtaining a multi-standard reference tree after finishing virtual node addition processing.
In the application, the association verification standard refers to a verification standard having an association relation with a verification node, when an association verification identifier exists in a target standard inspection item, it is stated that the association verification standard exists in the target standard inspection item, verification of corresponding metadata to be verified is achieved by combining the association verification standard with the target standard inspection item, at this time, the association verification standard corresponding to the association verification identifier (namely, the target standard inspection item) can be determined from a data table corresponding to the verification standard in the association verification identifier which is established in advance, and when the association verification identifier does not exist in the target standard inspection item, it is stated that the association verification standard does not exist in the target standard inspection item, and at this time, only the target standard inspection item is required to be used for verifying the corresponding metadata to be verified.
In a preferred embodiment, in step S500, the verification information includes node numbers of verification nodes and virtual nodes corresponding to each verification node in the multi-standard reference tree, and first verification conditions corresponding to each verification node and second verification conditions corresponding to each child node under the virtual node corresponding to each verification node, and before determining the compliance test result, the method further includes:
Traversing the multi-standard reference tree according to the breadth-first traversing sequence aiming at the multi-standard reference tree to assign node serial numbers to each verification node under the multi-standard reference tree and virtual nodes corresponding to each verification node, wherein the virtual node serial numbers are the same as the associated verification node serial numbers, and adding corresponding verification conditions for each verification node in the multi-standard reference tree according to the standard attribute values corresponding to the target standard inspection items corresponding to the verification node.
For example, each verification node of the multi-standard reference tree S),/>Represents the ith verification node in the multi-standard reference tree S, with +.>Representing a standard reference tree +.>The serial numbers of each verification node.
In a possible implementation manner, referring to fig. 3, fig. 3 is a schematic diagram illustrating a multi-standard reference tree creation process according to an embodiment of the present application. As shown in fig. 3, if the metadata to be verified corresponds to the target verification standard a, the obtained standard reference tree S1 to be processed includes a plurality of nodes) Wherein->As parent node, corresponding node in traversing to standard reference tree S1 +.>At the time, node->The associated authentication identity is present and indicates that it has associated authentication criteria B, at which point, as in fig. 3, the node +. >Parent node to which the parent node belongs +.>Down creation node->Corresponding virtual node->At the same time, the authentication node +.>The corresponding association criterion check item Y1 is incorporated into the virtual node +.>And (3) downwards.
If nodeIf there is no associated verification mark, then virtual node is not needed to be created, and only node +.>The corresponding verification condition is only needed.
In the present application, before step S500, the method further includes:
creating a tree to be tested by taking a plurality of metadata to be verified as test nodes according to father-son relations among the metadata to be verified; traversing each test node of the tree to be tested by adopting a depth-first traversing sequence; in the traversal process, for each test node of the tree to be tested, the test node is respectively matched with each verification node corresponding to the multi-standard reference tree, and the serial number corresponding to the verification node matched with the test node is determined as the node serial number corresponding to the test node.
In the application, besides the multi-standard reference tree, the to-be-tested tree is created according to the to-be-tested metadata, and the to-be-tested metadata is matched with a plurality of standard inspection items (the nodes are matched) in the multi-standard reference tree, so that a corresponding serial number is added for each test node in the to-be-tested tree, and the subsequent compliance test is conveniently completed according to the serial number.
Step S400 includes:
fully traversing each node in the tree to be tested and the multi-standard reference tree, and executing the following processing for each node in the tree to be tested:
for each test node in the tree under test, the following process is performed:
and if the virtual nodes exist in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, the second verification conditions corresponding to the virtual nodes are called to carry out primary verification comparison on the test nodes, virtual node comparison results are obtained, secondary comparison is carried out on the test nodes by utilizing the verification conditions corresponding to the verification nodes and combining the virtual node comparison results, so that the conformance test on the metadata to be verified corresponding to the test nodes is completed, and if the virtual nodes do not exist in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, the verification conditions corresponding to the test nodes are directly utilized to carry out verification comparison on the test nodes, so that the conformance test on the metadata to be verified corresponding to the test nodes is completed.
Aiming at each metadata to be tested, the attribute item to be tested for standard conformance test of the metadata to be tested is preset in the test task.
Specifically, if the metadata to be tested indicated by the test node is a process name, the attribute item to be tested is a process name definition, in the multi-standard reference tree, a virtual node (corresponding to the international standard) exists in the verification node corresponding to the test node, the second verification condition indicated by the corresponding associated standard check item under the virtual node is the definition of the process name in the track standard, the first verification condition indicated by the target standard check item corresponding to the verification node is the preferred name identical to the name used in the international standard, if the preferred name in the international standard is greater than the first threshold, the preferred name should be abbreviated, so that the second verification condition is executed first, if the result indicates that the process name indicated by the test node meets the name used in the international standard, the first verification condition is executed at this time, if the process name length does not exceed the indication length of the first verification condition, the process name indicated by the test node is confirmed to pass the standard compliance test, the next node is executed, if the process name length exceeds the indication length of the first verification condition at this time, the process name indicated by the test node is confirmed to not pass the standard compliance test, the first log is required to be generated correspondingly and stored in a preset position.
Based on the same application conception, the embodiment of the application also provides a standard compliance testing device corresponding to the standard compliance testing method provided by the embodiment, and because the principle of solving the problem of the device in the embodiment of the application is similar to that of the standard compliance testing method of the embodiment of the application, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 4, fig. 4 is a functional block diagram of a standard compliance testing apparatus according to an embodiment of the present application. As shown in fig. 4, the apparatus includes:
the first extraction module 600 is configured to extract metadata information corresponding to data to be verified from software to be tested, where the metadata information includes a plurality of metadata to be verified.
The second extraction module 610 is configured to extract a target verification standard corresponding to the data to be verified from a preset standard reference library, where the preset standard reference library includes a plurality of verification standards for performing standard conformance tests on the software to be tested, and each verification standard includes a plurality of standard check items.
A determining module 620, configured to determine a target standard inspection item corresponding to each metadata to be verified from a plurality of standard inspection items corresponding to target verification standards.
The creating module 630 is configured to create a multi-standard reference tree according to an association verification identifier corresponding to each target standard inspection item, where the association verification identifier indicates an association verification standard corresponding to the standard inspection item, and the multi-standard reference tree includes a plurality of verification nodes.
And the test module 640 is configured to complete standard conformance testing on the metadata to be verified by using verification information corresponding to each verification node in the multi-standard reference tree.
Preferably, the apparatus further comprises a reference library creation module (not shown in the figure) for creating a standard reference library by: acquiring a plurality of data standards for carrying out standard compliance test on software to be tested; for each data standard, extracting information from the content recorded by the data standard to obtain a plurality of standard check items corresponding to the data standard; converting a plurality of standard check items corresponding to each data standard into a preset format aiming at each data standard, and forming a verification standard corresponding to the data standard by the plurality of standard check items in the preset format; a standard reference library is generated from a plurality of verification standards.
Preferably, the creation module 630 is further configured to: and using a plurality of target standard inspection items as verification nodes, creating a standard reference tree to be processed for carrying out standard conformance test on data to be verified according to father-son relations among the standard inspection items, traversing the standard reference tree to be processed according to breadth-first traversing sequence, and expanding the standard reference tree to be processed according to the associated verification identification corresponding to the target standard inspection item to which each verification node belongs to, so as to obtain a multi-standard reference tree.
Preferably, the creation module 630 is further configured to: expanding a standard reference tree to be processed in the following manner to obtain a multi-standard reference tree: for each verification node with an associated verification identifier in the standard tree to be processed, the following virtual node adding processing is executed: determining at least one association verification standard indicated by the association verification identifier, and respectively creating virtual nodes corresponding to each association verification standard under father nodes to which the verification nodes belong; extracting at least one associated verification standard corresponding to the verification node from a preset standard reference library; for each associated verification standard, extracting an associated standard check item corresponding to the verification node from the associated verification standard, and adding the associated standard check item to a virtual node corresponding to the associated verification standard; and after the virtual node addition processing is completed, obtaining a multi-standard reference tree.
Preferably, the verification information includes node numbers of each verification node and virtual nodes corresponding to each verification node in the multi-standard reference tree, and a first verification condition corresponding to each verification node and a second verification condition corresponding to each child node under the virtual nodes corresponding to each verification node, and before determining the conformance test result, the creating module 630 is further configured to: traversing the multi-standard reference tree according to the breadth-first traversing sequence aiming at the multi-standard reference tree to assign node serial numbers to each verification node under the multi-standard reference tree and virtual nodes corresponding to each verification node, wherein the virtual node serial numbers are the same as the associated verification node serial numbers; and adding corresponding verification conditions for each verification node in the multi-standard reference tree according to the standard attribute value of the target standard inspection item corresponding to the verification node.
The creation module 630 is further configured to, prior to completion of the compliance test: creating a tree to be tested by taking a plurality of metadata to be verified as test nodes according to father-son relations among the metadata to be verified; traversing each test node of the tree to be tested by adopting a depth-first traversing sequence; in the traversal process, for each test node of the tree to be tested, the test node is respectively matched with each verification node corresponding to the multi-standard reference tree, and the serial number corresponding to the verification node matched with the test node is determined as the node serial number corresponding to the test node.
The test module 640 is also configured to: for each test node in the tree under test, the following process is performed: and if the virtual nodes exist in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, the second verification conditions corresponding to the virtual nodes are called to carry out primary verification comparison on the test nodes, virtual node comparison results are obtained, secondary comparison is carried out on the test nodes by utilizing the verification conditions corresponding to the verification nodes and combining the virtual node comparison results, so that the conformance test on the metadata to be verified corresponding to the test nodes is completed, and if the virtual nodes do not exist in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, the verification conditions corresponding to the test nodes are directly utilized to carry out verification comparison on the test nodes, so that the conformance test on the metadata to be verified corresponding to the test nodes is completed.
Based on the same application concept, please refer to fig. 5, fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 700 includes: processor 710, memory 720 and bus 730, memory 720 storing machine-readable instructions executable by processor 710, which when executed by processor 710 performs the steps of the standard compliance test method as provided in any of the embodiments described above, when electronic device 700 is in operation, processor 710 and memory 720 communicate via bus 730.
Based on the same application conception, the embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program executes the steps of the standard conformance test method provided by the embodiment when being executed by a processor.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
Claims (10)
1. A method for testing standard compliance, the method comprising:
extracting metadata information corresponding to data to be verified from software to be verified, wherein the metadata information comprises a plurality of metadata to be verified;
extracting target verification standards corresponding to the data to be verified from a preset standard reference library, wherein the preset standard reference library comprises a plurality of verification standards for carrying out standard compliance test on software to be tested, and each verification standard comprises a plurality of standard check items;
determining a target standard check item corresponding to each metadata to be verified from a plurality of standard check items corresponding to the target verification standard;
creating a multi-standard reference tree according to the associated verification mark corresponding to each target standard inspection item, wherein the associated verification mark indicates the associated verification standard corresponding to the standard inspection item, and the multi-standard reference tree comprises a plurality of verification nodes;
And completing the standard conformance test of the metadata to be verified by using the verification information corresponding to each verification node in the multi-standard reference tree.
2. The method of claim 1, wherein the standard reference library is created by:
acquiring a plurality of data standards for carrying out standard compliance test on the software to be tested;
for each data standard, extracting information from the content recorded by the data standard to obtain a plurality of standard check items corresponding to the data standard;
converting a plurality of standard check items corresponding to each data standard into a preset format aiming at each data standard, and forming a verification standard corresponding to the data standard by the plurality of standard check items in the preset format;
the standard reference library is generated from a plurality of validation standards.
3. The method of claim 1, wherein the step of creating the multi-standard reference tree based on the associated verification identifications corresponding to each target standard inspection item comprises:
creating a standard reference tree to be processed for carrying out standard conformity test on the data to be verified by taking a plurality of target standard inspection items as verification nodes according to father-son relations among the standard inspection items;
Traversing the standard reference tree to be processed according to the breadth-first traversing sequence to expand the standard reference tree to be processed according to the associated verification identification corresponding to the target standard inspection item to which each verification node belongs, so as to obtain a multi-standard reference tree.
4. A method according to claim 3, characterized in that the standard reference tree to be processed is expanded by obtaining a multi-standard reference tree by:
for each verification node with the associated verification identifier in the standard tree to be processed, executing the following virtual node adding process:
determining at least one association verification standard indicated by the association verification identifier, and respectively creating virtual nodes corresponding to each association verification standard under father nodes to which the verification nodes belong;
extracting at least one associated verification standard corresponding to the verification node from the preset standard reference library;
for each associated verification standard, extracting an associated standard check item corresponding to the verification node from the associated verification standard, and adding the associated standard check item to a virtual node corresponding to the associated verification standard;
and after the virtual node addition processing is completed, obtaining a multi-standard reference tree.
5. The method of claim 3, wherein the verification information includes node numbers of verification nodes and virtual nodes corresponding to each verification node in the multi-standard reference tree, and first verification conditions corresponding to each verification node and second verification conditions corresponding to each child node under the virtual node corresponding to each verification node,
Wherein, before determining the compliance test result, the method further comprises:
traversing the multi-standard reference tree according to a breadth-first traversal order aiming at the multi-standard reference tree to assign node serial numbers to each verification node under the multi-standard reference tree and virtual nodes corresponding to each verification node, wherein the virtual node serial numbers are the same as the associated verification node serial numbers;
and adding corresponding verification conditions for each verification node in the multi-standard reference tree according to the standard attribute value of the target standard inspection item corresponding to the verification node.
6. The method of claim 1, wherein prior to completion of the compliance test, the method further comprises:
creating a tree to be tested by taking a plurality of metadata to be verified as test nodes according to father-son relations among the metadata to be verified;
traversing each test node of the tree to be tested by adopting a depth-first traversing sequence;
in the traversal process, for each test node of the tree to be tested, the test node is respectively matched with each verification node corresponding to the multi-standard reference tree, and the serial number corresponding to the verification node matched with the test node is determined as the node serial number corresponding to the test node.
7. The method of claim 6, wherein the compliance test is accomplished by:
for each test node in the tree under test, performing the following processing:
if virtual nodes exist in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, a second verification condition corresponding to the virtual nodes is called to carry out one-time verification comparison on the test nodes, and a virtual node comparison result is obtained;
performing secondary comparison on the test node by using the verification conditions corresponding to the verification node and combining the virtual node comparison result to finish the compliance test of the metadata to be verified corresponding to the test node;
if no virtual node exists in the verification nodes with the same serial numbers as the test nodes in the multi-standard reference tree, the verification conditions of the verification nodes corresponding to the test nodes are directly utilized to carry out verification comparison on the test nodes so as to complete the compliance test of the metadata to be verified corresponding to the test nodes.
8. A standard compliance testing apparatus, the apparatus comprising:
the first extraction module is used for extracting metadata information corresponding to the data to be verified from the software to be verified, wherein the metadata information comprises a plurality of metadata to be verified;
The second extraction module is used for extracting target verification standards corresponding to the data to be verified from a preset standard reference library, wherein the preset standard reference library comprises a plurality of verification standards for carrying out standard compliance test on the software to be tested, and each verification standard comprises a plurality of standard inspection items;
the determining module is used for determining a target standard inspection item corresponding to each metadata to be verified from a plurality of standard inspection items corresponding to the target verification standard;
the creation module is used for creating a multi-standard reference tree according to the associated verification mark corresponding to each target standard inspection item, wherein the associated verification mark indicates the associated verification standard corresponding to the standard inspection item, and the multi-standard reference tree comprises a plurality of verification nodes;
and the testing module is used for completing the standard conformance test of the metadata to be verified by utilizing the verification information corresponding to each verification node in the multi-standard reference tree.
9. An electronic device, comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating via said bus when the electronic device is running, said machine readable instructions when executed by said processor performing the steps of the standard compliance testing method according to any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the standard compliance testing method according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311219543.8A CN116955211B (en) | 2023-09-21 | 2023-09-21 | Standard compliance testing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311219543.8A CN116955211B (en) | 2023-09-21 | 2023-09-21 | Standard compliance testing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116955211A true CN116955211A (en) | 2023-10-27 |
CN116955211B CN116955211B (en) | 2024-01-12 |
Family
ID=88458741
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311219543.8A Active CN116955211B (en) | 2023-09-21 | 2023-09-21 | Standard compliance testing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116955211B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110213757A1 (en) * | 2008-11-11 | 2011-09-01 | Srinivasan Bhaskaran | System and method for automatic standardization and verification of system design requirements |
CN107562615A (en) * | 2017-07-21 | 2018-01-09 | 北京航空航天大学 | The seaworthiness compliance testing method of tree-model is proved based on the evaluation of target accordance |
CN113407608A (en) * | 2021-06-28 | 2021-09-17 | 中国标准化研究院 | Sensor product metadata conformance test application system |
CN114896964A (en) * | 2022-05-24 | 2022-08-12 | 中国银行股份有限公司 | Data validity verification method and device |
CN115659296A (en) * | 2022-10-20 | 2023-01-31 | 湖南快乐阳光互动娱乐传媒有限公司 | File verification method, device and equipment and readable storage medium |
-
2023
- 2023-09-21 CN CN202311219543.8A patent/CN116955211B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110213757A1 (en) * | 2008-11-11 | 2011-09-01 | Srinivasan Bhaskaran | System and method for automatic standardization and verification of system design requirements |
CN107562615A (en) * | 2017-07-21 | 2018-01-09 | 北京航空航天大学 | The seaworthiness compliance testing method of tree-model is proved based on the evaluation of target accordance |
CN113407608A (en) * | 2021-06-28 | 2021-09-17 | 中国标准化研究院 | Sensor product metadata conformance test application system |
CN114896964A (en) * | 2022-05-24 | 2022-08-12 | 中国银行股份有限公司 | Data validity verification method and device |
CN115659296A (en) * | 2022-10-20 | 2023-01-31 | 湖南快乐阳光互动娱乐传媒有限公司 | File verification method, device and equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN116955211B (en) | 2024-01-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110908890A (en) | Automatic test method and device for interface | |
CN113127366B (en) | Matrix automatic test method based on model and computer readable storage medium | |
CN111127068B (en) | Automatic pricing method and device for engineering quantity list | |
CN105630656A (en) | Log model based system robustness analysis method and apparatus | |
CN114936158A (en) | Software defect positioning method based on graph convolution neural network | |
CN113190220A (en) | JSON file differentiation comparison method and device | |
CN103176905B (en) | A kind of Defect Correlation method and device | |
WO2018066661A1 (en) | Log analysis method, system, and recording medium | |
CN115481396A (en) | NC code abnormality detection method, device, equipment and storage medium | |
CN110991065A (en) | Automatic identification method for design change in building information model | |
CN116955211B (en) | Standard compliance testing method and device, electronic equipment and storage medium | |
CN111581110B (en) | Service data accuracy detection method, device, system and storage medium | |
CN111966339B (en) | Buried point parameter input method and device, computer equipment and storage medium | |
CN101901172B (en) | Data processing device and method | |
CN112506897A (en) | Method and system for analyzing and positioning data quality problem | |
JP4973738B2 (en) | Business flow processing program, method and apparatus | |
CN116909934A (en) | Command test method, device, equipment and medium of electronic automation design software | |
CN109145609A (en) | A kind of data processing method and device | |
CN110837494B (en) | Method and device for identifying unspecified diagnosis coding errors of medical record home page | |
CN112613290A (en) | Document template generation method, device, equipment and storage medium | |
CN107689846B (en) | Method and system for detecting data errors | |
CN111460439B (en) | Multi-environment-based escape behavior detection method | |
CN115935359B (en) | File processing method, device, computer equipment and storage medium | |
CN115860316B (en) | Method, apparatus and storage medium for determining inspection requirements of a product, and identifying a product | |
CN114090014A (en) | Program splitting method, device, equipment and computer storage medium |
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 |