CN112363933A - Automatic verification method and device for word paragraph table, computer equipment and storage medium - Google Patents

Automatic verification method and device for word paragraph table, computer equipment and storage medium Download PDF

Info

Publication number
CN112363933A
CN112363933A CN202011257693.4A CN202011257693A CN112363933A CN 112363933 A CN112363933 A CN 112363933A CN 202011257693 A CN202011257693 A CN 202011257693A CN 112363933 A CN112363933 A CN 112363933A
Authority
CN
China
Prior art keywords
field
matched
matching
fields
output
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011257693.4A
Other languages
Chinese (zh)
Inventor
黄妙婕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011257693.4A priority Critical patent/CN112363933A/en
Publication of CN112363933A publication Critical patent/CN112363933A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs

Abstract

The invention discloses an automatic verification method, a device, computer equipment and a storage medium for field falling list, wherein the method comprises the following steps: when field output is detected, extracting message information generated by the current system; receiving a field to be matched input aiming at a current functional node; when a matching instruction is received, matching field information corresponding to a field to be matched from message information based on a preset BMH algorithm, and generating a first matching result; when the first matching result is greater than or equal to 0, loading a data table in the database corresponding to the field to be matched; matching field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, and generating a second matching result; and when the second matching result is the same as the field to be matched, the field is successfully listed and the log information of successful listing is output. Therefore, by adopting the embodiment of the application, the error rate of functional node verification can be reduced, the testing efficiency of testers is improved, and the testing quality is ensured.

Description

Automatic verification method and device for word paragraph table, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an automatic verification method and apparatus for field drop table, a computer device, and a storage medium.
Background
Software testing is a process of verifying the correctness, integrity, safety, and quality of software by comparing the fields and effects output under actual functional nodes with the differences between the fields and effects output and those expected, and is typically a process of operating software under specified use conditions to determine whether the software meets design requirements, so that the quality of the software can be evaluated.
When a plurality of fields are required to be verified, because too many involved links are involved in manually verifying the field information, omission and verification errors are easily caused, and time is required to be spent for repeated investigation, so that the testing efficiency of the functional nodes in the system is reduced, and the error rate of the functional node testing is improved.
Disclosure of Invention
Based on this, it is necessary to provide an automatic verification method, an apparatus, a computer device and a storage medium for field drop table, aiming at the problems that the manual verification of field information involves too many links, is easy to cause omission and has errors in verification.
A method of automated verification of a field drop, the method comprising: when field output is detected, extracting message information generated by the current system; receiving a field to be matched input aiming at a current functional node; when a matching instruction is received, matching field information corresponding to the field to be matched from the message information based on a preset BMH algorithm, and generating a first matching result; when the first matching result is greater than or equal to 0, loading a data table in a database corresponding to the field to be matched; matching field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, and generating a second matching result; and when the second matching result is the same as the field to be matched, successfully dropping the field and outputting log information of successful dropping.
In one embodiment, the method further comprises: determining a plurality of functional nodes corresponding to the fields to be matched; continuously executing the step of extracting the message information generated by the current system when the field output is detected so as to verify the fields output under the plurality of functional nodes corresponding to the fields to be matched; and when the fields output by the plurality of functional nodes are the same as the fields to be matched, the fields pass back successfully and output the log information passing back successfully.
In one embodiment, the field returns successfully and outputs the log information of the return successfully, including: when the fields output by the plurality of functional nodes are different from the fields to be matched, generating log information of output errors of the fields under the plurality of functional nodes corresponding to the fields to be matched; and sending the log information of the field output errors to related departments for early warning.
In one embodiment, the matching, based on a preset BMH algorithm, field information corresponding to the field to be matched from the packet information to generate a first matching result includes: determining the message information as a main string; determining the field to be matched as a pattern string; inputting the main string and the mode string into a preset BMH algorithm, and outputting position subscripts of the mode string in the main string; the position index is determined as a first match result.
In one embodiment, the matching, according to a preset AC automata matching algorithm, field information corresponding to the field to be matched from the data table to generate a second matching result includes: extracting each field in the data table to generate a field set; processing each field in the field set to generate a binary tree of the field set; and inputting the binary tree of the field to be matched and the field set into a preset AC automata matching algorithm for traversal matching, and generating a second matching result.
In one embodiment, the generating a binary tree of the field set after processing each field in the field set includes: determining the weight value of each field in the field table, and extracting at least two fields from each field in the field set according to the high-low sequence of the weight values; combining the at least two fields to generate a binary tree corresponding to the at least two fields; removing the at least two fields from the field set, and adding binary trees corresponding to the at least two fields into the field set; and continuing to execute the step of extracting at least two fields from each field in the field set, and generating a binary tree of the field set when each field in the field set is associated into an integral structure.
In one embodiment, the determining the weight value of each field in the field table includes: acquiring the field type of each field in the field table; and determining the weight value of each field in the field table based on the corresponding relation between the field type and the field weight.
An apparatus for automated verification of field drop tables, the apparatus comprising: the message information extraction module is used for extracting message information generated by the current system when the field output is detected; the field to be matched acquisition module is used for acquiring a field to be matched output under the current functional node; the first matching result generating module is used for matching field information corresponding to the field to be matched from the message information based on a preset BMH algorithm to generate a first matching result when a matching instruction is received; the data table loading module is used for loading the data table in the database corresponding to the field to be matched when the first matching result is greater than or equal to 0; the second matching result generation module is used for matching the field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm to generate a second matching result; and the log information output module is used for successfully dropping the fields and outputting the log information of successful dropping when the second matching result is the same as the fields to be matched.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the method of automated verification of a word paragraph table as described above.
A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of automated verification of a word paragraph table as described above.
According to the automatic verification method, the automatic verification device, the computer equipment and the storage medium of the word paragraph table, when the output of the field is detected, the message information generated by a current system is extracted, the field to be matched input aiming at the current function node is received, when a matching instruction is received, the field information corresponding to the field to be matched is matched from the message information based on a preset BMH algorithm, a first matching result is generated, when the first matching result is larger than or equal to 0, the data table in the database corresponding to the field to be matched is loaded, the field information corresponding to the field to be matched is matched from the data table according to a preset AC automaton matching algorithm, a second matching result is generated, and finally when the second matching result is the same as the field to be matched, the field falling table is successful, and the log information of the falling table is output. When the functional node of the system is verified to meet the design requirement, whether the field under the functional node is output, whether the output field is successfully displayed and whether the successfully displayed field meets the requirement of multi-link return is automatically completed through the pre-designed BMH algorithm and the AC automaton matching algorithm, and when the verification is successful, error information can be timely output and sent to relevant departments for early warning.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a diagram of an implementation environment of a method for automated verification of field drop lists provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application;
FIG. 3 is a method diagram of a method for automated verification of field drop sheets provided in one embodiment of the present application;
FIG. 4 is a schematic diagram of another method for automatically verifying a word paragraph table provided in an embodiment of the present application;
FIG. 5 is a process diagram of an automated verification process for field drop lists provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of an apparatus for automatically verifying a field drop table according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an apparatus for an automated verification apparatus for a word paragraph table according to an embodiment of the present application;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, the first matching result may be made the second matching result, and similarly, the second matching result may be made the first matching result, without departing from the scope of the present application.
Fig. 1 is a diagram of an implementation environment of an automated verification method for field drop table provided in an embodiment, as shown in fig. 1, in which a computer device 110 and a user terminal 120 are included.
The computer device 110 may be a server device, for example, a server device that stores output field data under the system function node. The client 120 is installed with an application that needs to perform operations such as automatic verification and the like on an output field, when field output is detected, the user terminal 120 extracts message information generated by a current system, the user terminal 120 receives a field to be matched input for a current function node, when the user terminal 120 receives a matching instruction, field information corresponding to the field to be matched is matched from the message information based on a preset BMH algorithm to generate a first matching result, when the first matching result is greater than or equal to 0, the user terminal 120 loads a data table in a database corresponding to the field to be matched from the computer device 110, the user terminal 120 matches the field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm to generate a second matching result, when the second matching result is the same as the field to be matched, the user terminal 120 fields the table dropping is successful and outputs log information of the table dropping success.
It should be noted that the client 120 may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like. The server 110 and the client 120 may be connected through bluetooth, USB (Universal Serial Bus), or other communication connection methods, which is not limited herein.
FIG. 2 is a diagram showing an internal configuration of a computer device according to an embodiment. As shown in fig. 2, the computer device includes a processor, a storage medium, a memory, and a network interface connected through a system bus. The storage medium of the computer device stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions can enable the processor to realize an automatic verification method of field drop when being executed by the processor. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, cause the processor to perform a method of automated verification of field drop. The network interface of the computer device is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the architecture shown in fig. 2 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The automatic verification method for the word paragraph table provided in the embodiment of the present application will be described in detail below with reference to fig. 3 to 5. The method may be implemented in dependence on a computer program, operable on an automated verification device based on the field table of von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Referring to fig. 3, a flowchart of an automatic verification method for field drop table is provided according to an embodiment of the present application. As shown in fig. 3, the method of the embodiment of the present application may include the steps of:
s101, when field output is detected, extracting message information generated by a current system;
wherein, the field is the character output under the functional node currently tested. The message information is log information printed by a console when the current function node is tested, and the log information is generated when a code corresponding to the current function node is executed.
In a possible implementation manner, when a user performs test verification on a functional node in a system, the user performs verification after a computer device starts a test environment, the system first detects whether a field is output in real time, when the user clicks a specific functional node in an execution system, the computer device receives a command generated by clicking the functional node by the user, executes a program code corresponding to the functional node through the command, and outputs message information (i.e., log data) and a field corresponding to the functional node by a console after execution, and at this time, the computer device extracts the message information generated by the console after detecting that the field is output through a pre-installed detection control.
Specifically, when a specific function node is tested, message information needs to be acquired to check whether the field output by the current function node is included, the method monitors in real time by presetting a control, and the message information is automatically extracted after the console outputs complete message information.
S102, receiving a field to be matched input aiming at a current functional node;
and the field to be matched is a correct field which is input into the computer equipment by the user according to the current function node.
In a possible implementation manner, in order to verify whether a correct output field corresponding to a current functional node exists in message information output by a console, in the embodiment of the present application, the message information is extracted through a control set in a computer device in advance, then a user determines that the correct field that the current functional node should output is input into the computer device, and the computer device receives the correct field input by the user, where the input correct field is a field to be matched in the embodiment of the present application.
S103, when a matching instruction is received, matching field information corresponding to the field to be matched from the message information based on a preset BMH algorithm, and generating a first matching result;
the matching instruction is an instruction input into the computer equipment by a user, and aims to start a BMH algorithm to perform field matching so as to match a field to be matched from message information. The BMH algorithm is a character string and pattern matching algorithm, and can quickly find out the position subscript of a target character string in the pattern matching algorithm.
In a possible implementation manner, when matching is performed from a message based on a BMH algorithm, firstly, message information output by a current system is determined as a main string, then, a field to be matched is determined as a pattern string, then, the main string and the pattern string are output to the BMH algorithm as parameters of the BMH algorithm, a position subscript of the pattern string in the main string is generated, the position subscript is a specific number, when the position subscript is greater than or equal to 0, it is indicated that the field to be matched exists in the message information, if the position subscript is less than 0, it is indicated that the field to be matched does not exist in the message information, and finally, the output number is used as a first matching result. According to the method and the device, the BMH algorithm is used for completing the matching of the character strings, most of redundant traversals can be eliminated by the BMH algorithm, so that the whole matching algorithm becomes more efficient, the efficiency is higher when the function nodes are tested, and the testing speed is higher.
S104, when the first matching result is more than or equal to 0, loading a data table in the database corresponding to the field to be matched;
the first matching result is a certain natural number, and the database is a warehouse for storing data of all functions under the current system. The data table is a plurality of structure tables which are created in the database for the data generated under each functional node.
In a possible implementation manner, when the first matching result (i.e., the subscript position of the field to be matched in the message information) is determined based on step S103, it is determined whether the number of the first matching result is greater than or equal to 0, when the number is greater than or equal to 0, it indicates that the field to be matched exists in the message information, step S105 is continuously performed, when the number is less than 0, it indicates that the field to be matched does not exist in the message information, the detection fails, error reporting information of "field x not output" is generated and printed, the synchronization information is displayed on the current system, and the test flow is ended.
S105, matching field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, and generating a second matching result;
the second matching result is "true" or "false", and is used to determine whether the field to be matched exists in the data table corresponding to the field, and is "true" when existing in the data table, and is "false" when not existing in the data table.
In a possible implementation mode, after the fields to be matched are determined to be successfully output according to the BMH algorithm, the data table of the database corresponding to the fields to be matched is firstly obtained, then, each field is extracted from the data table to generate a field set, then, the field set is processed to generate a binary tree of the field set, the binary tree of the field set is used as a parameter of the AC automaton matching algorithm to perform traversal matching, and a matching result is generated. According to the method and the device, the binary tree is generated by processing the data in the data table and is used as the parameter of the matching algorithm of the AC automaton, matching can be performed from the root node of the binary tree during matching, and important data are placed in the root node during generating the binary tree, so that the required data are matched more easily during matching, and the matching efficiency is improved.
In the embodiment of the application, each field in the data table is extracted to generate a field set, each field in the field set is processed to generate a binary tree of the field set, and finally the binary tree of the field to be matched and the field set is input into a preset AC automaton matching algorithm to perform traversal matching to generate a second matching result.
Further, after processing each field in the field set, generating a binary tree of the field set, specifically: firstly, determining the weight value of each field in a field table, extracting at least two fields from each field in a field set according to the high-low sequence of the weight values, merging the at least two fields to generate a binary tree corresponding to the at least two fields, then removing the at least two fields from the field set, adding the binary tree corresponding to the at least two fields into the field set, and finally continuing to execute the step of extracting the at least two fields from each field in the field set.
For example, when data in a data table is processed to generate a binary tree, a weight value corresponding to each field in the table is determined first, then b, at least two data are extracted from the table according to the high-low order of the weight values to be combined into a binary tree of at least two groups of data, at c, the two fields are removed from the field table, the binary trees corresponding to the two fields are added into a field set, and then the steps of a-c are continuously executed, so that the field sets in the data table form an integral binary tree.
When determining the weight corresponding to each piece of data in the data table, the field type of each field in the field table is firstly obtained, and then the weight value of each field in the field table is determined according to the corresponding relation between the field type and the field weight. Because each field in the data table has different data types, such as shaping data, Boolean data and the like, and the corresponding weight of each data type is different, the weight value of each field can be determined according to the corresponding relation between the field type and the field weight, so that the data importance of a root node is guaranteed during the construction of the binary tree.
And S106, when the second matching result is the same as the field to be matched, successfully dropping the field and outputting log information of successful dropping.
In a possible implementation manner, field information corresponding to a field to be matched is matched from a data table according to an AC automata matching algorithm, a second matching result is generated, when the second matching result is obtained from the matching, it is indicated that information corresponding to the field to be matched exists in the data table of the database, at this time, the field to be matched is successfully listed, and log information of successful listing is generated and output.
For example, in a company financial system, a function of a loan process needs to be tested, a specific field needs to be output under a functional node of the loan process, the field needs to be output and then stored in a specific database table, and the field needs to be repeatedly returned in a plurality of links.
Further, during testing, firstly extracting message information output by the system A, then setting a field to be searched, clicking a search start button to generate a matching instruction, after receiving the matching instruction, according to a pre-designed BMH algorithm, taking the message information as a main string and the field to be searched as a mode string, returning the position of the mode string in the main string, if the number greater than or equal to 0 is output, indicating that the search is successful, continuously detecting whether the field to be searched has keys and values which are not empty in a corresponding data table in a database, matching the field to be searched from the data table of the database according to an AC automaton matching algorithm, and if the matching is successful, indicating that the field to be matched falls into the table.
If the output field is a number smaller than 0, the BHM algorithm cannot detect the field with the same field to be searched in the message, the log of the error information is output and sent to a terminal of a system developer for error checking, if the field with the same field to be searched is not matched in the data table according to the AC automata matching algorithm, the table falling failure is indicated, the loan information cannot be stored, and the log of the printing failure information is sent to the terminal of the developer to prompt the developer to check the error.
In a possible implementation manner, after the output field falls into the table successfully under the tested function node, determining to output a plurality of function links corresponding to the field to be matched, testing whether the field output is successful under the plurality of links (namely, multi-link return) according to the method steps of the steps S101-S106, and if the field to be matched is successfully output in the plurality of function links, indicating that the multi-link return is successful, generating a successful return log and outputting the log.
And if the output fields of the plurality of functional nodes corresponding to the fields to be matched are empty, generating log information of multi-link return failure, and sending the log information to a terminal of a system developer to prompt the developer to carry out function debugging and improve the functional nodes.
For example, setting a field to be matched as an object a, detecting message parameters under a plurality of functional nodes corresponding to the object a through a BMH algorithm, and if the field information identical to the object a is correctly output, printing a log: 1. 2, correctly returning the link field a of the link 2 and the link 3 …, ending the test flow, and if not, printing a log: the links 1,2 and 3 … are all return fields a, and the information synchronous belt system developer finishes the test process.
For example, as shown in fig. 5, when a current functional node in a system is tested, when it is detected that field output occurs, first extracting message information output by the system, then determining a field to be matched output under the current functional node, using a BMH algorithm, using the message information as a main string in the algorithm, using the field to be matched as a mode string, executing the BMH algorithm, then outputting a position subscript of the field to be matched, which first occurs in the message information, when the position subscript is output to 0 or more, indicating that the current functional node is successfully output, after the output is successful, loading a data table corresponding to the field to be matched from a database, judging whether the field to be matched exists in the data table (judging whether the field falls) according to an AC automata matching algorithm, and when it is found that the field to be matched exists in the data table corresponding to the current functional node after the judgment is finished, then, falling the table is successful. And after the drop table succeeds, judging whether the multi-link function nodes corresponding to the fields to be matched output the same fields and the drop table succeeds, when the multi-link function nodes succeed, indicating that the current function nodes meet the design requirements, finishing the verification of the paragraph table, determining a plurality of function nodes corresponding to the fields to be matched, executing each function node in the plurality of function nodes, returning to the step S101 for continuous execution, and when the fields output under the plurality of function nodes are the same as the fields to be matched, returning the fields to the step S101 successfully and outputting returned log information.
In the embodiment of the application, the automatic verification device for field dropping tables firstly extracts message information generated by a current system when field output is detected, receives a field to be matched input aiming at a current function node, matches field information corresponding to the field to be matched from the message information based on a preset BMH algorithm when a matching instruction is received, generates a first matching result, loads a data table in a database corresponding to the field to be matched when the first matching result is greater than or equal to 0, matches field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, generates a second matching result, and finally, when the second matching result is the same as the field to be matched, successfully drops the field and outputs log information of successful dropping. When the functional node of the system is verified to meet the design requirement, whether the field under the functional node is output, whether the output field is successfully displayed and whether the successfully displayed field meets the requirement of multi-link return is automatically completed through the pre-designed BMH algorithm and the AC automaton matching algorithm, and when the verification is successful, error information can be timely output and sent to relevant departments for early warning.
In order to facilitate understanding of the automatic verification method for the word paragraph table provided in the embodiments of the present application, the following description is made with reference to fig. 4. As shown in fig. 4, an automatic verification method for field drop comprises:
s201, when detecting field output, extracting message information generated by a current system;
s202, receiving a field to be matched input aiming at a current functional node;
s203, when a matching instruction is received, determining the message information as a main string and determining the field to be matched as a mode string;
s204, inputting the main string and the mode string into a preset BMH algorithm, and outputting position subscripts of the mode string in the main string;
s205, determining the position index as a first matching result;
s206, when the first matching result is more than or equal to 0, loading a data table in the database corresponding to the field to be matched;
s207, extracting each field in the data table to generate a field set, and generating a binary tree of the field set after processing each field in the field set;
s208, inputting the binary tree of the field to be matched and the field set into a preset AC automaton matching algorithm for traversal matching, and generating a second matching result;
s209, when the second matching result is the same as the field to be matched, the field is successfully published and log information of successful publication is output;
s210, determining a plurality of functional nodes corresponding to the fields to be matched, executing each functional node in the plurality of functional nodes, and returning to the step S201 to continue executing;
s211, when the fields output by the plurality of functional nodes are the same as the fields to be matched, the fields are successfully returned and the successfully returned log information is output.
In the embodiment of the application, the automatic verification device for field dropping tables firstly extracts message information generated by a current system when field output is detected, receives a field to be matched input aiming at a current function node, matches field information corresponding to the field to be matched from the message information based on a preset BMH algorithm when a matching instruction is received, generates a first matching result, loads a data table in a database corresponding to the field to be matched when the first matching result is greater than or equal to 0, matches field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, generates a second matching result, and finally, when the second matching result is the same as the field to be matched, successfully drops the field and outputs log information of successful dropping. When the functional node of the system is verified to meet the design requirement, whether the field under the functional node is output, whether the output field is successfully displayed and whether the successfully displayed field meets the requirement of multi-link return is automatically completed through the pre-designed BMH algorithm and the AC automaton matching algorithm, and when the verification is successful, error information can be timely output and sent to relevant departments for early warning.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Referring to fig. 6, a schematic structural diagram of an automatic verification apparatus for a word paragraph table according to an exemplary embodiment of the present invention is shown, which is applied to a server. The automated verification system for the field drop may be implemented as all or part of a computer device, in software, hardware, or a combination of both. The device 1 comprises a message information extraction module 10, a field to be matched acquisition module 20, a first matching result generation module 30, a data table loading module 40, a second matching result generation module 50 and a log information output module 60.
A message information extraction module 10, configured to extract message information generated by a current system when field output is detected;
a field to be matched obtaining module 20, configured to obtain a field to be matched output under the current functional node;
a first matching result generating module 30, configured to, when a matching instruction is received, match field information corresponding to the field to be matched from the message information based on a preset BMH algorithm, and generate a first matching result;
the data table loading module 40 is configured to load a data table in the database corresponding to the field to be matched when the first matching result is greater than or equal to 0;
a second matching result generating module 50, configured to match, according to a preset AC automata matching algorithm, field information corresponding to the field to be matched from the data table, and generate a second matching result;
and a log information output module 60, configured to, when the second matching result is the same as the field to be matched, successfully drop the field and output log information that the field dropping is successful.
Referring to fig. 7, the apparatus 1 further includes:
a function node determining module 70, configured to determine a plurality of function nodes corresponding to the fields to be matched;
a field verification module 80, configured to verify fields output under a plurality of functional nodes corresponding to the field to be matched;
and an information output module 90, configured to, when the fields output by the multiple functional nodes are the same as the fields to be matched, pass back the fields successfully and output log information that passes back successfully.
It should be noted that, when the automatic verification system for a word paragraph table provided in the foregoing embodiment executes the automatic verification method for a word paragraph table, the division of the function modules is merely used as an example, and in practical applications, the functions may be distributed to different function modules according to needs, that is, the internal structure of the device may be divided into different function modules to complete all or part of the functions described above. In addition, the automatic verification system of the word paragraph table and the automatic verification method of the field paragraph table provided in the above embodiments belong to the same concept, and details of implementation processes thereof are referred to in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the embodiment of the application, the automatic verification device for field dropping tables firstly extracts message information generated by a current system when field output is detected, receives a field to be matched input aiming at a current function node, matches field information corresponding to the field to be matched from the message information based on a preset BMH algorithm when a matching instruction is received, generates a first matching result, loads a data table in a database corresponding to the field to be matched when the first matching result is greater than or equal to 0, matches field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, generates a second matching result, and finally, when the second matching result is the same as the field to be matched, successfully drops the field and outputs log information of successful dropping. When the functional node of the system is verified to meet the design requirement, whether the field under the functional node is output, whether the output field is successfully displayed and whether the successfully displayed field meets the requirement of multi-link return is automatically completed through the pre-designed BMH algorithm and the AC automaton matching algorithm, and when the verification is successful, error information can be timely output and sent to relevant departments for early warning.
In one embodiment, a computer device is proposed, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: when field output is detected, extracting message information generated by the current system; receiving a field to be matched input aiming at a current functional node; when a matching instruction is received, matching field information corresponding to the field to be matched from the message information based on a preset BMH algorithm, and generating a first matching result; when the first matching result is greater than or equal to 0, loading a data table in a database corresponding to the field to be matched; matching field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, and generating a second matching result; and when the second matching result is the same as the field to be matched, successfully dropping the field and outputting log information of successful dropping.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a plurality of functional nodes corresponding to the fields to be matched; continuously executing the step of extracting the message information generated by the current system when the field output is detected so as to verify the fields output under the plurality of functional nodes corresponding to the fields to be matched; and when the fields output by the plurality of functional nodes are the same as the fields to be matched, the fields pass back successfully and output the log information passing back successfully.
In one embodiment, when the computer device executed by the processor performs matching of field information corresponding to the field to be matched from the message information based on a preset BMH algorithm, generating a first matching result, includes: determining the message information as a main string; determining the field to be matched as a pattern string; inputting the main string and the mode string into a preset BMH algorithm, and outputting position subscripts of the mode string in the main string; the position index is determined as a first match result.
In one embodiment, when the computer device executed by the processor performs matching of the field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, generating a second matching result includes: extracting each field in the data table to generate a field set; processing each field in the field set to generate a binary tree of the field set; and inputting the binary tree of the field to be matched and the field set into a preset AC automata matching algorithm for traversal matching, and generating a second matching result.
In one embodiment, after performing the processing on each field in the field set, the computer device executed by the processor generates a binary tree of the field set, including: determining the weight value of each field in the field table, and extracting at least two fields from each field in the field set according to the high-low sequence of the weight values; combining the at least two fields to generate a binary tree corresponding to the at least two fields; removing the at least two fields from the field set, and adding binary trees corresponding to the at least two fields into the field set; and continuing to execute the step of extracting at least two fields from each field in the field set, and generating a binary tree of the field set when each field in the field set is associated into an integral structure.
In one embodiment, the computer device executed by the processor in performing the determining the weight values for the fields in the field table comprises: acquiring the field type of each field in the field table; and determining the weight value of each field in the field table based on the corresponding relation between the field type and the field weight. In one embodiment, a storage medium is provided that stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: when field output is detected, extracting message information generated by the current system; receiving a field to be matched input aiming at a current functional node; when a matching instruction is received, matching field information corresponding to the field to be matched from the message information based on a preset BMH algorithm, and generating a first matching result; when the first matching result is greater than or equal to 0, loading a data table in a database corresponding to the field to be matched; matching field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, and generating a second matching result; and when the second matching result is the same as the field to be matched, successfully dropping the field and outputting log information of successful dropping.
In one embodiment, the processor, when executing the computer readable instructions, further performs the steps of: determining a plurality of functional nodes corresponding to the fields to be matched; continuously executing the step of extracting the message information generated by the current system when the field output is detected so as to verify the fields output under the plurality of functional nodes corresponding to the fields to be matched; and when the fields output by the plurality of functional nodes are the same as the fields to be matched, the fields pass back successfully and output the log information passing back successfully.
In one embodiment, the matching, performed by the processor, of the field information corresponding to the field to be matched from the message information based on a preset BMH algorithm to generate a first matching result includes: determining the message information as a main string; determining the field to be matched as a pattern string; inputting the main string and the mode string into a preset BMH algorithm, and outputting position subscripts of the mode string in the main string; the position index is determined as a first match result.
In one embodiment, the matching, performed by the processor, of the field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm to generate a second matching result, includes: extracting each field in the data table to generate a field set; processing each field in the field set to generate a binary tree of the field set; and inputting the binary tree of the field to be matched and the field set into a preset AC automata matching algorithm for traversal matching, and generating a second matching result.
In one embodiment, the generating a binary tree of the field set after processing each field in the field set by the processor includes: determining the weight value of each field in the field table, and extracting at least two fields from each field in the field set according to the high-low sequence of the weight values; combining the at least two fields to generate a binary tree corresponding to the at least two fields; removing the at least two fields from the field set, and adding binary trees corresponding to the at least two fields into the field set; and continuing to execute the step of extracting at least two fields from each field in the field set, and generating a binary tree of the field set when each field in the field set is associated into an integral structure.
In one embodiment, the determining, performed by the processor, the weight value of each field in the field table includes: acquiring the field type of each field in the field table; and determining the weight value of each field in the field table based on the corresponding relation between the field type and the field weight.
In the embodiment of the application, the automatic verification device for field dropping tables firstly extracts message information generated by a current system when field output is detected, receives a field to be matched input aiming at a current function node, matches field information corresponding to the field to be matched from the message information based on a preset BMH algorithm when a matching instruction is received, generates a first matching result, loads a data table in a database corresponding to the field to be matched when the first matching result is greater than or equal to 0, matches field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, generates a second matching result, and finally, when the second matching result is the same as the field to be matched, successfully drops the field and outputs log information of successful dropping. When the functional node of the system is verified to meet the design requirement, whether the field under the functional node is output, whether the output field is successfully displayed and whether the successfully displayed field meets the requirement of multi-link return is automatically completed through the pre-designed BMH algorithm and the AC automaton matching algorithm, and when the verification is successful, error information can be timely output and sent to relevant departments for early warning.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium, or may be a volatile storage medium, such as a non-volatile storage medium such as a magnetic disk, an optical disk, and a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for automated verification of a field drop, the method comprising:
when field output is detected, extracting message information generated by the current system;
receiving a field to be matched input aiming at a current functional node;
when a matching instruction is received, matching field information corresponding to the field to be matched from the message information based on a preset BMH algorithm, and generating a first matching result;
when the first matching result is greater than or equal to 0, loading a data table in a database corresponding to the field to be matched;
matching field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm, and generating a second matching result;
and when the second matching result is the same as the field to be matched, successfully dropping the field and outputting log information of successful dropping.
2. The method of claim 1, further comprising:
determining a plurality of functional nodes corresponding to the fields to be matched;
continuously executing the step of extracting the message information generated by the current system when the field output is detected so as to verify the fields output under the plurality of functional nodes corresponding to the fields to be matched;
and when the fields output by the plurality of functional nodes are the same as the fields to be matched, the fields pass back successfully and output the log information passing back successfully.
3. The method according to claim 2, wherein the field returns successfully and outputs the log information of the returned successfully, comprising:
when the fields output by the plurality of functional nodes are different from the fields to be matched, generating log information of output errors of the fields under the plurality of functional nodes corresponding to the fields to be matched;
and sending the log information of the field output errors to related departments for early warning.
4. The method according to claim 1, wherein the matching, based on a preset BMH algorithm, field information corresponding to the field to be matched from the message information to generate a first matching result comprises:
determining the message information as a main string;
determining the field to be matched as a pattern string;
inputting the main string and the mode string into a preset BMH algorithm, and outputting position subscripts of the mode string in the main string;
the position index is determined as a first match result.
5. The method of claim 1, wherein the matching field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm to generate a second matching result comprises:
extracting each field in the data table to generate a field set;
processing each field in the field set to generate a binary tree of the field set;
and inputting the binary tree of the field to be matched and the field set into a preset AC automata matching algorithm for traversal matching, and generating a second matching result.
6. The method of claim 5, wherein generating a binary tree of the field set after processing the fields in the field set comprises:
determining the weight value of each field in the field table, and extracting at least two fields from each field in the field set according to the high-low sequence of the weight values;
combining the at least two fields to generate a binary tree corresponding to the at least two fields;
removing the at least two fields from the field set, and adding binary trees corresponding to the at least two fields into the field set;
and continuing to execute the step of extracting at least two fields from each field in the field set, and generating a binary tree of the field set when each field in the field set is associated into an integral structure.
7. The method of claim 6, wherein determining the weight value for each field in the field table comprises:
acquiring the field type of each field in the field table;
and determining the weight value of each field in the field table based on the corresponding relation between the field type and the field weight.
8. An apparatus for automated verification of field drop tables, the apparatus comprising:
the message information extraction module is used for extracting message information generated by the current system when the field output is detected;
the field to be matched acquisition module is used for acquiring a field to be matched output under the current functional node;
the first matching result generating module is used for matching field information corresponding to the field to be matched from the message information based on a preset BMH algorithm to generate a first matching result when a matching instruction is received;
the data table loading module is used for loading the data table in the database corresponding to the field to be matched when the first matching result is greater than or equal to 0;
the second matching result generation module is used for matching the field information corresponding to the field to be matched from the data table according to a preset AC automata matching algorithm to generate a second matching result;
and the log information output module is used for successfully dropping the fields and outputting the log information of successful dropping when the second matching result is the same as the fields to be matched.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to carry out the steps of the method of automatically verifying a word paragraph table according to any one of claims 1 to 7.
10. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of automated validation of a word paragraph table according to any one of claims 1 to 7.
CN202011257693.4A 2020-11-11 2020-11-11 Automatic verification method and device for word paragraph table, computer equipment and storage medium Pending CN112363933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011257693.4A CN112363933A (en) 2020-11-11 2020-11-11 Automatic verification method and device for word paragraph table, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011257693.4A CN112363933A (en) 2020-11-11 2020-11-11 Automatic verification method and device for word paragraph table, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112363933A true CN112363933A (en) 2021-02-12

Family

ID=74515327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011257693.4A Pending CN112363933A (en) 2020-11-11 2020-11-11 Automatic verification method and device for word paragraph table, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112363933A (en)

Similar Documents

Publication Publication Date Title
KR102151326B1 (en) Data processing method and device
CN110474900B (en) Game protocol testing method and device
CN106484606A (en) Method and apparatus submitted to by a kind of code
CN111177005A (en) Service application testing method, device, server and storage medium
CN110442756A (en) Data verification method, device, computer equipment and storage medium
CN110866258B (en) Rapid vulnerability positioning method, electronic device and storage medium
CN111475411A (en) Server problem detection method, system, terminal and storage medium
CN114546738A (en) Server general test method, system, terminal and storage medium
CN111752846A (en) Interface testing method and device
CN114237754A (en) Data loading method and device, electronic equipment and storage medium
WO2021183382A1 (en) Graph-based method for inductive bug localization
CN113312258A (en) Interface testing method, device, equipment and storage medium
CN109684205B (en) System testing method, device, electronic equipment and storage medium
CN110011964B (en) Webpage environment detection method and device
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN112363933A (en) Automatic verification method and device for word paragraph table, computer equipment and storage medium
CN106445737A (en) Multi-backup starting method
Paul End-to-end integration testing
CN113704123A (en) Interface test method, device, equipment and storage medium
CN114595159B (en) Test data generation method, device, equipment and storage medium
CN111538542A (en) System configuration method and related device
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN114812695B (en) Product testing method and device, computer equipment and storage medium
CN112799962A (en) Software testing method, device, equipment and medium
CN114500033A (en) Method, device, computer equipment and medium for verifying application server

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