CN110287125B - Software instantiation test method and device based on image recognition - Google Patents

Software instantiation test method and device based on image recognition Download PDF

Info

Publication number
CN110287125B
CN110287125B CN201910597742.XA CN201910597742A CN110287125B CN 110287125 B CN110287125 B CN 110287125B CN 201910597742 A CN201910597742 A CN 201910597742A CN 110287125 B CN110287125 B CN 110287125B
Authority
CN
China
Prior art keywords
test
image
test image
software
target software
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.)
Active
Application number
CN201910597742.XA
Other languages
Chinese (zh)
Other versions
CN110287125A (en
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910597742.XA priority Critical patent/CN110287125B/en
Publication of CN110287125A publication Critical patent/CN110287125A/en
Application granted granted Critical
Publication of CN110287125B publication Critical patent/CN110287125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/146Aligning or centring of the image pick-up or image-field
    • G06V30/1475Inclination or skew detection or correction of characters or of image to be recognised
    • G06V30/1478Inclination or skew detection or correction of characters or of image to be recognised of characters or characters lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/418Document matching, e.g. of document images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Computer Hardware Design (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Debugging And Monitoring (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a software instantiation test method and device based on image recognition, wherein the method comprises the following steps: generating first test data corresponding to a current test version of the target software based on stock data corresponding to the target software; converting the first test data into at least one corresponding first test image; and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, and determining whether the current test version of the target software passes the software parallelization test according to the corresponding comparison result so as to determine whether the current test version can be put into production for use. According to the method and the device, the test time can be shortened, the test efficiency and the test accuracy are effectively improved, the cost of manpower and material resources can be reduced, the production period is shortened, the reliability of software production and application can be effectively improved, and the information accuracy and the reliability of a user when using the software can be guaranteed.

Description

Software instantiation test method and device based on image recognition
Technical Field
The invention relates to the technical field of image recognition, in particular to a software parallelization test method and device based on image recognition.
Background
To prevent other related modifications from affecting the stock content, each version of software requires testing of the stock content that has been commissioned before it is commissioned after the update, even if the stock content has not changed at all, a process called routine testing.
At present, the routine test of the contents such as vouchers, statements and reports mostly adopts a manual comparison mode, and the contents such as vouchers, statements and reports are often displayed in the form of images, so that the information such as the amount, date and account in the image contents needs to be checked by naked eyes. In order to effectively improve the efficiency and the test accuracy of the example parallelization test, a few routine tests test the contents of certificates, statements, reports and the like in an automatic mode.
However, the conventional automatic type routine test adopts a field-by-field check mode, which results in low efficiency of routine test and also has problems of high development cost and high maintenance cost.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a software parallelization test method and device based on image recognition, which can effectively improve the efficiency of parallelization test and the accuracy of routine test.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, the present invention provides a software instantiation test method based on image recognition, including:
generating first test data corresponding to a current test version of the target software based on stock data corresponding to the target software;
converting the first test data into at least one corresponding first test image;
and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, and determining whether the current test version of the target software passes the software parallelization test according to the corresponding comparison result so as to determine whether the current test version can be put into production for use.
Further, before the comparing the first test image with the at least one second test image corresponding to the pre-acquired historical version of the target software, the method further includes:
generating second test data corresponding to a historical version of the target software based on stock data corresponding to the target software; wherein stock data used for generating the second test data is the same as stock data used for generating the first test data;
and converting the second test data into at least one corresponding second test image.
Further, before the comparing the first test image with the at least one second test image corresponding to the pre-acquired historical version of the target software, the method further includes:
preprocessing the second test image acquired in advance, and preprocessing the first test image;
correspondingly, the image comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software includes:
and comparing the preprocessed at least one first test image with the preprocessed at least one second test image.
Wherein the preprocessing comprises: binarization processing and/or median filtering processing.
The image comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software includes:
performing image recognition on the first test image and the second test image by adopting an optical character recognition mode to generate text contents corresponding to the first test image and the second test image respectively;
and comparing text contents corresponding to the first test image and the second test image respectively based on a character string comparison mode.
Further, after the optical character recognition method is adopted to recognize the first test image and the second test image to generate text contents corresponding to the first test image and the second test image, the method further includes:
respectively correcting the text content corresponding to each of the first test image and the second test image according to a preset field library;
correspondingly, the comparing the text content corresponding to each of the first test image and the second test image based on the character string comparison mode comprises the following steps:
and comparing text contents corresponding to the first test image and the second test image after correction processing based on a character string comparison mode.
And clustering and dividing the text content in the preset field library according to a K-means clustering algorithm.
The format of the first test image and the second test image is PNG format.
In a second aspect, the present invention provides a software instantiation test device based on image recognition, including:
the first generation unit is used for generating first test data corresponding to the current test version of the target software based on the stock data corresponding to the target software;
the first conversion unit is used for converting the first test data into at least one corresponding first test image;
the testing unit is used for comparing the first testing image with at least one second testing image corresponding to the pre-acquired historical version of the target software, and determining whether the current testing version of the target software passes the software parallelization test according to the corresponding comparison result so as to judge whether the current testing version can be put into production for use.
Further, the method further comprises the following steps:
the second generating unit is used for generating second test data corresponding to the historical version of the target software based on the stock data corresponding to the target software; wherein stock data used for generating the second test data is the same as stock data used for generating the first test data;
and the second conversion unit is used for converting the second test data into at least one corresponding second test image.
Further, the method further comprises the following steps:
the preprocessing unit is used for preprocessing the second test image acquired in advance and preprocessing the first test image;
correspondingly, the test unit comprises:
and the testing subunit is used for comparing the preprocessed at least one first testing image with the preprocessed at least one second testing image.
Wherein the preprocessing comprises: binarization processing and/or median filtering processing.
Wherein the test unit comprises:
the identification module is used for carrying out image identification on the first test image and the second test image in an optical character identification mode to generate text contents corresponding to the first test image and the second test image respectively;
and the comparison module is used for comparing the text contents corresponding to the first test image and the second test image respectively based on a character string comparison mode.
Wherein the test unit further comprises:
the correction module is used for respectively correcting the text content corresponding to the first test image and the second test image according to a preset field library;
correspondingly, the compared module comprises:
and the comparison sub-module is used for comparing text contents corresponding to the first test image and the second test image after correction processing based on a character string comparison mode.
And clustering and dividing the text content in the preset field library according to a K-means clustering algorithm.
The format of the first test image and the second test image is PNG format.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the image recognition based test method when executing the program.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the image recognition based test method.
As can be seen from the above technical solution, the present invention provides a testing method and apparatus based on image recognition, which generates first test data corresponding to a current test version of a target software based on stock data corresponding to the target software; converting the first test data into at least one corresponding first test image; and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, determining whether the current test version of the target software passes the software parallelization test or not according to the corresponding comparison result to judge whether the current test version can be put into operation or not, shortening the test time, effectively improving the test efficiency and the test accuracy, reducing the cost of manpower and material resources and shortening the operation period, further effectively improving the reliability of software operation and application, and ensuring the information accuracy and reliability when a user uses the software.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a software instantiation test method based on image recognition in an embodiment of the invention.
Fig. 2 is a schematic flow chart of step S103 in the software instantiation test method based on image recognition in the embodiment of the present invention.
Fig. 3 is another flow chart of step S103 in the software parallelization test method based on image recognition in the embodiment of the invention.
Fig. 4 is a second flow chart of a software parallelization test method based on image recognition in the embodiment of the invention.
Fig. 5 is a third flow chart of a software parallelization test method based on image recognition in the embodiment of the invention.
Fig. 6 is a flowchart of all the flows in the software parallelization test method based on image recognition in the embodiment of the invention.
Fig. 7 is a schematic structural diagram of a software instantiation test device based on image recognition in an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides an embodiment of a software parallelization test method based on image recognition, referring to fig. 1, the software parallelization test method based on image recognition specifically comprises the following contents:
s100: generating first test data corresponding to a current test version of the target software based on stock data corresponding to the target software;
in the step, the stored data is input into target software, and the output result of the target software is first test data;
in this embodiment, the first test data includes, but is not limited to: vouchers, statements and statements.
S101: converting the first test data into at least one corresponding first test image;
in this step, the first test data is converted into a corresponding first test image. When the first test data are the certificate, the statement, the amount of money in the certificate, the statement, the account and the name of the account are respectively converted into corresponding images.
In a specific embodiment, pixel point information on a certificate, a statement and a statement is obtained, the amount, the account and the name of a user are converted into a pixel matrix, each point in the pixel matrix represents a pixel value of a corresponding position, and then a first test image is generated according to the pixel matrix.
Furthermore, the format of the first test image is PNG format, which is a bitmap format with lossless compression, high compression ratio, small volume of generated file and convenient file transmission. The PNG format is tested and confirmed to be capable of keeping the content information of the picture to the maximum extent, and further improving the image quality.
S103: and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, and determining whether the current test version of the target software passes the software parallelization test according to the corresponding comparison result so as to determine whether the current test version can be put into production for use.
In this step, the second test image may be generated in advance from second test data corresponding to the historical version of the target software, and the stock data used for generating the second test data is the same as the stock data used for generating the first test data.
Further, when the plurality of test images are compared, determining content comparison of the plurality of test images, comparing text content, and determining a maximum continuous matching sequence without garbage factors; the garbage factor is an invalid factor such as index point symbol, space, line feed character and the like, and identified content is vectorized.
And calculating the similarity between the two vectors by adopting a cosine theorem, and recognizing that the content of the comparison text is the same if the similarity is larger than a preset threshold value. And formatting and storing the identification result.
The format PNG format of the second test image is a lossless compression bitmap format, the compression ratio is high, the size of the generated file is small, and file transmission is convenient. The PNG format is tested and confirmed to be capable of keeping the content information of the picture to the maximum extent, and further improving the image quality.
As can be seen from the above description, according to the software parallelization test method based on image recognition provided by the embodiment of the present invention, first test data corresponding to a current test version of a target software is generated based on stock data corresponding to the target software; converting the first test data into at least one corresponding first test image; and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, determining whether the current test version of the target software passes the software parallelization test or not according to the corresponding comparison result to judge whether the current test version can be put into operation or not, shortening the test time, effectively improving the test efficiency and the test accuracy, reducing the cost of manpower and material resources and shortening the operation period, further effectively improving the reliability of software operation and application, and ensuring the information accuracy and reliability when a user uses the software.
In an embodiment of the present invention, referring to fig. 2, step S103 in the software instantiation test method based on image recognition specifically includes the following:
s1031: performing image recognition on the first test image and the second test image by adopting an optical character recognition mode to generate text contents corresponding to the first test image and the second test image respectively;
in the step, tesseact, which is an open-source optical character recognition engine, is used for carrying out optical character recognition on a test image, so that the text conversion capability of the image is continuously enhanced through continuous training. After identification, converting the test image into editable text content, including:
determining a connected domain of the target image, and planning characters connected by pixels into a connected domain; determining a larger connected domain as a character to be identified according to a threshold value; determining characters and text blocks; and identifying the text, and identifying according to the shape of the character trained in the prior period.
S1033: and comparing text contents corresponding to the first test image and the second test image respectively based on a character string comparison mode.
In the step, format comparison and content comparison are carried out on the content in the text content corresponding to each of the first test image and the second test image in a character string comparison mode, different fields are searched, and whether the comparison results are the same is determined.
Further, the comparison result is saved so as to be returned to the calling party for use.
As can be seen from the above description, by performing image recognition on the first test image and the second test image by using an optical character recognition method and comparing text contents corresponding to the first test image and the second test image by using a character string comparison method, the method can be applied to checking various chart contents such as bills, statements, certificates, seal marks, pictures, tables, documents, and the like, and even if the contents include foreign language, images, special characters, and the like, the elements are not affected. The tester can verify the foreign language content without mastering the foreign language foundation, and the verification accuracy is effectively ensured. The defect of manual naked eye checking is avoided, and characters, forms and other special formats are accurately identified, so that checking test efficiency is improved
In an embodiment of the present invention, referring to fig. 3, after step S1031, the method further includes:
s1032: respectively correcting the text content corresponding to each of the first test image and the second test image according to a preset field library;
in the step, after determining the text content, a natural language processing algorithm and a fuzzy matching algorithm are adopted, and text content in a preset field library is combined to correct errors of the text content which is converted and generated to be editable, so that the recognition accuracy is improved.
Correspondingly, the comparing the text content corresponding to each of the first test image and the second test image based on the character string comparison mode comprises the following steps:
and comparing text contents corresponding to the first test image and the second test image after correction processing based on a character string comparison mode.
The text content in the preset field library is clustered and divided according to a K-means clustering algorithm.
And clustering and dividing text contents in a preset field library by adopting a K-means clustering algorithm in an unsupervised training method, so that the retrieval efficiency is improved, and the content of the preset field library is automatically expanded.
From the above description, it can be known that, by correcting the text content corresponding to each of the first test image and the second test image according to the preset field library, the generated text content corresponding to each of the first test image and the second test image can be corrected, so that the recognition accuracy is improved, and the recognition analysis efficiency is improved.
In an embodiment of the present invention, referring to fig. 4, before step S103 of the software instantiation test method based on image recognition, step S110 and step S111 are further included, which specifically includes the following:
s110: generating second test data corresponding to a historical version of the target software based on stock data corresponding to the target software; wherein stock data used for generating the second test data is the same as stock data used for generating the first test data;
s111: and converting the second test data into at least one corresponding second test image.
The second test image may be generated in advance according to second test data corresponding to a historical version of the target software, and stock data used for generating the second test data is the same as stock data used for generating the first test data.
Please refer to step S100 and step S101 in the above embodiments, which are not described herein.
In an embodiment of the present invention, referring to fig. 5, step S103 of the software instantiation test method based on image recognition further includes step S102, which specifically includes the following:
s102: preprocessing the second test image acquired in advance, and preprocessing the first test image;
in the step, the second test image is preprocessed, so that random noise in the image is effectively removed, the image contrast is improved, and the identification is facilitated.
Correspondingly, the image comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software includes:
and comparing the preprocessed at least one first test image with the preprocessed at least one second test image.
Wherein the preprocessing comprises: binarization processing and/or median filtering processing.
In the embodiment, binarization processing is performed firstly, median filtering processing is performed after the binarization processing, and the binarization processing normalizes the pixel value of the image to 0 or 1 according to a preset threshold value, so that the image identification is facilitated; the median filtering process uses the median of all pixels in the neighborhood to replace the central pixel value, so that random noise of the picture can be effectively removed. The quality of the test image can be improved through binarization processing and median filtering processing.
To further explain the scheme, the invention provides a full-flow embodiment of a software parallelization test method based on image recognition, referring to fig. 6, the software parallelization test method based on image recognition specifically includes the following contents:
a101 captures contents such as generated bills, reports and the like, and converts the contents into picture information.
A102, performing image processing on the picture generated by the A101, wherein the image processing comprises image binarization processing, and distinguishing the foreground and the background of the image; and the median filtering processing of the image removes image noise and improves the image quality.
And 3, the A103 stores the picture processed by the A102 as a PNG picture, wherein the PNG picture is a lossless picture and occupies a small space.
And 4, the A104 transmits the PNG image of the A103, and uploads the local picture to the image recognition server through a flash frame, so that the transmission is fast and safe.
And 5, carrying out overall analysis on the image by the A105, carrying out layout analysis on the picture output by the A104, and distinguishing contents such as tables, texts and the like in the picture.
And 6, performing character recognition on the picture by using an optical character recognition related algorithm by using the A106.
A107 determines connected domains in the picture and designs the characters connected by pixels into one connected domain.
A108 determines that the larger connected domain is the character to be identified according to the threshold value.
A109 identifies the character and text block, and performs a cutting process on the text block.
A110 performs character recognition on characters in the connected domain according to the character shape trained in advance.
A111 carries out fuzzy matching and similarity analysis on the text identified by A110 and the content in the identification library, and corrects wrong characters, wrong words and the like in the identification result.
A112 judges whether the current test task is to perform single-picture identification or multi-picture comparison analysis, and if the current test task is the multi-picture comparison analysis, A113 is executed; otherwise, execution A116 proceeds.
And (3) the A113 identifies a plurality of pictures and compares the difference of identification results.
A114 determines the largest continuous matching sequence of a plurality of pictures to be compared without a garbage factor, wherein the garbage factor is invalid information such as index point symbols, blank spaces, line feed symbols and the like.
A115 vectorizes the content identified by the pictures, calculates the similarity between the two vectors by adopting cosine theorem, analyzes the similarity, and outputs the similarity to A116.
A116 formats the identification result and stores the identification result in Json format.
A117 calls the flash framework to return the recognition result to the caller.
The embodiment of the invention provides a specific implementation mode of an image recognition-based software parallelization testing device capable of realizing all contents in the image recognition-based software parallelization testing method, and referring to fig. 7, the image recognition-based software parallelization testing device specifically comprises the following contents:
a first generating unit 10, configured to generate first test data corresponding to a current test version of the target software based on stock data corresponding to the target software;
a first conversion unit 20, configured to convert the first test data into at least one corresponding first test image;
and the test unit 30 is configured to compare the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, and determine, according to a corresponding comparison result, whether the current test version of the target software passes a software parallelization test to determine whether the current test version can be put into production for use.
Further, the method further comprises the following steps:
a second generating unit 40, configured to generate second test data corresponding to a historical version of the target software based on the stock data corresponding to the target software; wherein stock data used for generating the second test data is the same as stock data used for generating the first test data;
and a second converting unit 50, configured to convert the second test data into at least one corresponding second test image.
Further, the method further comprises the following steps:
a preprocessing unit 60, configured to perform preprocessing on the second test image acquired in advance, and perform preprocessing on the first test image;
correspondingly, the test unit 30 includes:
and the testing subunit is used for comparing the preprocessed at least one first testing image with the preprocessed at least one second testing image.
Wherein the preprocessing comprises: binarization processing and/or median filtering processing.
Wherein the test unit 30 includes:
the identification module is used for carrying out image identification on the first test image and the second test image in an optical character identification mode to generate text contents corresponding to the first test image and the second test image respectively;
and the comparison module is used for comparing the text contents corresponding to the first test image and the second test image respectively based on a character string comparison mode.
Wherein the test unit further comprises:
the correction module is used for respectively correcting the text content corresponding to the first test image and the second test image according to a preset field library;
correspondingly, the compared module comprises:
and the comparison sub-module is used for comparing text contents corresponding to the first test image and the second test image after correction processing based on a character string comparison mode.
And clustering and dividing the text content in the preset field library according to a K-means clustering algorithm.
The format of the first test image and the second test image is PNG format.
The embodiment of the software instantiation test device based on image recognition provided by the invention can be particularly used for executing the processing flow of the embodiment of the software instantiation test method based on image recognition in the embodiment, and the functions of the embodiment are not repeated herein, and can be referred to in the detailed description of the embodiment of the method.
As can be seen from the above description, the software parallelization test device based on image recognition provided by the embodiment of the present invention generates the first test data corresponding to the current test version of the target software based on the stock data corresponding to the target software; converting the first test data into at least one corresponding first test image; and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, determining whether the current test version of the target software passes the software parallelization test or not according to the corresponding comparison result to judge whether the current test version can be put into operation or not, shortening the test time, effectively improving the test efficiency and the test accuracy, reducing the cost of manpower and material resources and shortening the operation period, further effectively improving the reliability of software operation and application, and ensuring the information accuracy and reliability when a user uses the software.
The embodiment of the present invention further provides a specific implementation manner of an electronic device capable of implementing all the steps in the software instantiation test method based on image recognition in the foregoing embodiment, and referring to fig. 8, the electronic device specifically includes the following contents:
a processor (processor) 601, a memory (memory) 602, a communication interface (Communications Interface) 603, and a bus 604;
wherein the processor 601, the memory 602, and the communication interface 603 complete communication with each other through the bus 604; the processor 601 is configured to invoke a computer program in the memory 602, where the processor executes the computer program to implement all the steps in the software routine testing method based on image recognition in the above embodiment, for example, the processor executes the computer program to implement the following steps: generating first test data corresponding to a current test version of the target software based on stock data corresponding to the target software; converting the first test data into at least one corresponding first test image; and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, and determining whether the current test version of the target software passes the software parallelization test according to the corresponding comparison result so as to determine whether the current test version can be put into production for use.
The embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the software parallelization test method based on image recognition in the above embodiment, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the software parallelization test method based on image recognition in the above embodiment, for example, the processor implements the following steps when executing the computer program: generating first test data corresponding to a current test version of the target software based on stock data corresponding to the target software; converting the first test data into at least one corresponding first test image; and comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, and determining whether the current test version of the target software passes the software parallelization test according to the corresponding comparison result so as to determine whether the current test version can be put into production for use.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The present invention is not limited to any single aspect, nor to any single embodiment, nor to any combination and/or permutation of these aspects and/or embodiments. Moreover, each aspect and/or embodiment of the invention may be used alone or in combination with one or more other aspects and/or embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention, and are intended to be included within the scope of the appended claims and description.

Claims (16)

1. The software parallelization test method based on image recognition is characterized by comprising the following steps:
generating first test data corresponding to a current test version of the target software based on stock data corresponding to the target software;
converting the first test data into at least one corresponding first test image; the first test data includes: vouchers, statements and statements;
comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software, and determining whether the current test version of the target software passes a software parallelization test according to the corresponding comparison result to determine whether the current test version can be put into production for use;
the converting the first test data into at least one corresponding first test image includes:
acquiring pixel point information on certificates, statements and reports, converting the amounts, accounts and household names into pixel matrixes, wherein each point in the pixel matrixes represents a pixel value of a corresponding position, and further generating a first test image according to the pixel matrixes;
the image comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software comprises the following steps:
performing image recognition on the first test image and the second test image by adopting an optical character recognition mode to generate text contents corresponding to the first test image and the second test image respectively;
and comparing text contents corresponding to the first test image and the second test image respectively based on a character string comparison mode.
2. The method for performing image recognition-based software instantiation test according to claim 1, wherein before said comparing said first test image with said at least one second test image corresponding to a pre-acquired historical version of said target software, further comprises:
generating second test data corresponding to a historical version of the target software based on stock data corresponding to the target software; wherein stock data used for generating the second test data is the same as stock data used for generating the first test data;
and converting the second test data into at least one corresponding second test image.
3. The method for performing image recognition-based software instantiation test according to claim 2, wherein before said comparing said first test image with said at least one second test image corresponding to a pre-acquired historical version of said target software, further comprising:
preprocessing the second test image acquired in advance, and preprocessing the first test image;
correspondingly, the image comparing the first test image with at least one second test image corresponding to the pre-acquired historical version of the target software includes:
and comparing the preprocessed at least one first test image with the preprocessed at least one second test image.
4. The image recognition-based software instantiation test method according to claim 3, wherein said preprocessing comprises: binarization processing and/or median filtering processing.
5. The software instantiation test method based on image recognition according to claim 1, wherein after said recognizing said first test image and said second test image by means of optical character recognition to generate text contents corresponding to each of said first test image and said second test image, further comprising:
respectively correcting the text content corresponding to each of the first test image and the second test image according to a preset field library;
correspondingly, the comparing the text content corresponding to each of the first test image and the second test image based on the character string comparison mode comprises the following steps:
and comparing text contents corresponding to the first test image and the second test image after correction processing based on a character string comparison mode.
6. The software instantiation test method based on image recognition according to claim 5, wherein the text content in the preset field library is clustered and divided according to a K-means clustering algorithm.
7. The image recognition-based software instantiation test method according to claim 1, wherein a format of said first test image and said second test image is PNG format.
8. An image recognition-based software instantiation test device, comprising:
the first generation unit is used for generating first test data corresponding to the current test version of the target software based on the stock data corresponding to the target software; the first test data includes: vouchers, statements and statements;
the first conversion unit is used for converting the first test data into at least one corresponding first test image;
the testing unit is used for comparing the first testing image with at least one second testing image corresponding to the pre-acquired historical version of the target software, and determining whether the current testing version of the target software passes the software instantiation test or not according to the corresponding comparison result so as to determine whether the current testing version can be put into production for use or not;
the first conversion unit is specifically configured to:
acquiring pixel point information on certificates, statements and reports, converting the amounts, accounts and household names into pixel matrixes, wherein each point in the pixel matrixes represents a pixel value of a corresponding position, and further generating a first test image according to the pixel matrixes;
the test unit includes:
the identification module is used for carrying out image identification on the first test image and the second test image in an optical character identification mode to generate text contents corresponding to the first test image and the second test image respectively;
and the comparison module is used for comparing the text contents corresponding to the first test image and the second test image respectively based on a character string comparison mode.
9. The image recognition-based software instantiation test apparatus according to claim 8, further comprising:
the second generating unit is used for generating second test data corresponding to the historical version of the target software based on the stock data corresponding to the target software; wherein stock data used for generating the second test data is the same as stock data used for generating the first test data;
and the second conversion unit is used for converting the second test data into at least one corresponding second test image.
10. The image recognition-based software instantiation test apparatus according to claim 9, further comprising:
the preprocessing unit is used for preprocessing the second test image acquired in advance and preprocessing the first test image;
correspondingly, the test unit comprises:
and the testing subunit is used for comparing the preprocessed at least one first testing image with the preprocessed at least one second testing image.
11. The image recognition-based software instantiation test apparatus according to claim 10, wherein said preprocessing includes: binarization processing and/or median filtering processing.
12. The image recognition-based software instantiation test apparatus according to claim 8, wherein said test unit further comprises:
the correction module is used for respectively correcting the text content corresponding to the first test image and the second test image according to a preset field library;
correspondingly, the compared module comprises:
and the comparison sub-module is used for comparing text contents corresponding to the first test image and the second test image after correction processing based on a character string comparison mode.
13. The image recognition-based software instantiation test apparatus of claim 12, wherein text content in the preset field library is clustered according to a K-means clustering algorithm.
14. The image recognition-based software instantiation test apparatus according to claim 8, wherein a format of said first test image and said second test image is PNG format.
15. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the image recognition based software instantiation test method according to any one of claims 1 to 7 when the program is executed by the processor.
16.A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the image recognition-based software instantiation test method according to any one of claims 1 to 7.
CN201910597742.XA 2019-07-04 2019-07-04 Software instantiation test method and device based on image recognition Active CN110287125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910597742.XA CN110287125B (en) 2019-07-04 2019-07-04 Software instantiation test method and device based on image recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910597742.XA CN110287125B (en) 2019-07-04 2019-07-04 Software instantiation test method and device based on image recognition

Publications (2)

Publication Number Publication Date
CN110287125A CN110287125A (en) 2019-09-27
CN110287125B true CN110287125B (en) 2024-01-09

Family

ID=68021860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910597742.XA Active CN110287125B (en) 2019-07-04 2019-07-04 Software instantiation test method and device based on image recognition

Country Status (1)

Country Link
CN (1) CN110287125B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955603B (en) * 2019-12-03 2023-06-06 望海康信(北京)科技股份公司 Automated testing method, apparatus, electronic device and computer readable storage medium
CN111611144B (en) * 2020-05-27 2023-09-19 中国工商银行股份有限公司 Method, apparatus, computing device, and medium for processing performance test data
CN111782514A (en) * 2020-06-23 2020-10-16 京东数字科技控股有限公司 Test data comparison method and device
CN111966847A (en) * 2020-08-10 2020-11-20 上海中通吉网络技术有限公司 Report regression testing method, device and system
CN112529008A (en) * 2020-11-03 2021-03-19 浙江大华技术股份有限公司 Image recognition method, image feature processing method, electronic device and storage medium
CN113378819B (en) * 2021-06-24 2022-11-18 成都飞机工业(集团)有限责任公司 Rapid identification method for airborne software version
CN117421254B (en) * 2023-12-19 2024-03-22 杭银消费金融股份有限公司 Automatic test method and system for reconciliation business

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8996988B2 (en) * 2009-10-19 2015-03-31 Browsera, LLC Automated application compatibility testing
US9135151B2 (en) * 2013-09-18 2015-09-15 Yahoo! Inc. Automatic verification by comparing user interface images
US9703770B2 (en) * 2014-03-19 2017-07-11 International Business Machines Corporation Automated validation of the appearance of graphical user interfaces

Also Published As

Publication number Publication date
CN110287125A (en) 2019-09-27

Similar Documents

Publication Publication Date Title
CN110287125B (en) Software instantiation test method and device based on image recognition
US20230401828A1 (en) Method for training image recognition model, electronic device and storage medium
CN110674396B (en) Text information processing method and device, electronic equipment and readable storage medium
US9286526B1 (en) Cohort-based learning from user edits
US11074406B2 (en) Device for automatically detecting morpheme part of speech tagging corpus error by using rough sets, and method therefor
CN113657395B (en) Text recognition method, training method and device for visual feature extraction model
CN110765740A (en) DOM tree-based full-type text replacement method, system, device and storage medium
CN110928971A (en) Method and device for improving address identification accuracy
CN110738184B (en) Early warning information generation method and device for paper certificates
CN113469005A (en) Recognition method of bank receipt, related device and storage medium
CN111414889B (en) Financial statement identification method and device based on character identification
CN112613367A (en) Bill information text box acquisition method, system, equipment and storage medium
CN115859128B (en) Analysis method and system based on interaction similarity of archive data
CN113836297B (en) Training method and device for text emotion analysis model
CN115906797A (en) Text entity alignment method, device, equipment and medium
CN115631502A (en) Character recognition method, character recognition device, model training method, electronic device and medium
CN114663886A (en) Text recognition method, model training method and device
CN108021918B (en) Character recognition method and device
RU2739342C1 (en) Method and system for intelligent document processing
CN113158988A (en) Financial statement processing method and device and computer readable storage medium
CN112580619B (en) Method and device for auxiliary modification of recognition result
CN113850235B (en) Text processing method, device, equipment and medium
CN113127635B (en) Data processing method, device and system, storage medium and electronic equipment
CN116842128B (en) Text relation extraction method and device, computer equipment and storage medium
CN112085594B (en) Identity verification method, device and readable 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