Verification device
The verification device addresses display inconsistencies by comparing character display areas and characters across web browsers, enabling accurate identity verification despite browser discrepancies.
Patent Information
- Application Number
- JP2023038549
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2024-09-27
AI Technical Summary
Display discrepancies occur between multiple types of web browsers due to differences in their specifications, making pixel-by-pixel identity verification inconsistent.
A verification device that includes an image acquisition unit, character detection unit, character recognition unit, and determining section to identify and compare character display areas and characters across images from different web browsers, determining match based on positional and character identity.
Supports accurate identity verification of display content across multiple web browsers by absorbing discrepancies due to browser specifications, ensuring consistent matching criteria.
Smart Images

Figure 2024129379000001
Abstract
Description
[Technical field]
[0001] The present disclosure relates to data processing technology, and more particularly to a verification device. [Background technology]
[0002] In recent years, there has been an increasing demand for web applications to be compatible with multiple types of web browsers. Until now, when verifying the identity of display content between multiple types of web browsers, pixel values of an image were compared one by one from the top left to the bottom right to obtain the difference in pixel values (for example, see Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2018-22238 A Summary of the Invention [Problem to be solved by the invention]
[0004] Display misalignment occurs constantly between multiple types of web browsers due to differences in the specifications of each browser. Therefore, when verifying identity on a pixel-by-pixel basis as in Patent Document 1, the display contents of multiple types of web browsers always mismatch. Therefore, when verifying identity of multiple images showing display contents of multiple types of web browsers, the method of verifying identity on a pixel-by-pixel basis is not appropriate.
[0005] The technology disclosed herein has been made in consideration of these problems, and one objective is to provide a technology that supports identity verification of multiple images showing display contents of multiple types of web browsers. [Means for solving the problem]
[0006] In order to solve the above problems, a verification device according to one embodiment of the present disclosure includes an image acquisition unit that acquires a first image and a second image to be compared, a character detection unit that detects character display areas in each of the first image and the second image, a character recognition unit that recognizes characters displayed in the character display areas in each of the first image and the second image, a determination unit that determines whether the first image and the second image match based on the identity of the positions of the character display areas and the identity of the characters displayed in the character display areas, and an output unit that outputs the determination result made by the determination unit.
[0007] Any combination of the above components, and conversions of the present disclosure between a system, a method, a computer program, a recording medium storing a computer program, and the like, are also valid aspects of the present disclosure. Effect of the Invention
[0008] The technology disclosed herein can assist in verifying the identity of multiple images showing the display contents of multiple types of web browsers. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 illustrates a configuration of a test verification support system according to an embodiment. [Diagram 2] FIG. 13 is a diagram showing an example of an expected image. [Diagram 3] FIG. 13 is a diagram showing an example of a verification image. [Figure 4] 2 is a block diagram showing functional blocks of the verification device shown in FIG. 1. [Diagram 5] 1 is a flowchart showing an operation of the test verification support system. [Figure 6] FIG. 11 is a diagram showing an example of a first comparison image. [Figure 7] FIG. 11 is a diagram showing an example of a second comparison image. [Figure 8] FIG. 11 is a diagram showing an example of a second comparison image. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] In the verification support system of the embodiment, the character display area included in each of the first and second images to be compared and the characters (including character strings) displayed in the character display area are recognized, and based on the character display area and characters recognized in each image, it is determined whether the first and second images match. This makes it possible to absorb the display deviation (also called the amount of displacement) due to the difference in specifications between multiple web browsers, and supports the verification of the identity of the display contents between multiple web browsers.
[0011] 1 shows the configuration of a verification support system 10 according to an embodiment. The verification support system 10 is an information processing system including a user terminal 12 and a verification device 14. The user terminal 12 and the verification device 14 are connected via a communication network that may include a LAN, a WAN, the Internet, or the like.
[0012] The user terminal 12 is an information terminal operated by a person in charge of testing the web application (hereinafter referred to as a "user"). The user terminal 12 may be a computer, a tablet terminal, or a smartphone. The user terminal 12 transmits an expected image 20 as a first image to be compared and a verification image 22 as a second image to the verification device 14 in response to the user's operation.
[0013] 2 shows an example of an expected image 20. The expected image 20 shows the expected display of a web page generated by a web application under test. The expected image 20 may be a screenshot of a first web browser window displaying the web page generated by the web application under test.
[0014] 3 shows an example of a verification image 22. The verification image 22 is an image that is compared with the expected image 20, and shows the display content to be verified of a web page generated by a web application under test. The verification image 22 is expected to match the expected image 20. The verification image 22 may be a screenshot of a window of a second web browser, different from the first web browser, displaying a web page generated by a web application under test.
[0015] The verification device 14 is an information processing device that determines whether or not the expected image 20 matches the verification image 22. The verification device 14 transmits to the user terminal 12 a verification result 24 regarding whether or not the expected image 20 matches the verification image 22.
[0016] Fig. 4 is a block diagram showing the functional blocks of the verification device 14 in Fig. 1. Each block shown in the block diagram in this specification can be realized in terms of hardware by elements such as a computer processor, CPU, and memory, electronic circuits, and mechanical devices, and in terms of software by a computer program, etc., but here, functional blocks realized by cooperation between them are depicted. Therefore, it will be understood by those skilled in the art that these functional blocks can be realized in various forms by combinations of hardware and software.
[0017] The verification device 14 includes a data processing unit 30, a storage unit 32, and a communication unit 34. The data processing unit 30 executes data processing and arithmetic processing. The storage unit 32 stores data to be referenced or updated by the data processing unit 30. The communication unit 34 communicates with an external device according to a predetermined communication protocol. The data processing unit 30 acquires data transmitted from an external device (e.g., the user terminal 12) via the communication unit 34, and also transmits data to the external device.
[0018] The storage unit 32 includes a model storage unit 36, an image storage unit 38, and a verification result storage unit 40. The model storage unit 36 stores a mathematical model (hereinafter also referred to as a "character detection model") that detects a character display area from image data. The character display area can be said to be an area in an image in which one or more characters (e.g., a character string such as "department / branch code" or "account number") are drawn, or can be said to be a bounding box. The model storage unit 36 further stores a mathematical model (hereinafter also referred to as a "character recognition model") that recognizes one or more characters displayed in the character display area. Each of the character detection model and the character recognition model may be implemented as a function approximator based on machine learning (e.g., a neural network).
[0019] The character detection model accepts input of image data and outputs the position and size of the character display area drawn in the image. Specifically, the character detection model outputs the coordinates (X, Y) of the center position of the character display area, the width (W), and the height (H). The character detection model of the embodiment adopts an anchor-type object detection model algorithm using CSPDarknet as the backbone and PANet (Path Aggregation Network) as the neck.
[0020] The character recognition model accepts input of image data and the position and size of a character display area, and outputs one or more characters displayed in the character display area. In the character detection model of the embodiment, the "An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition" algorithm is adopted. In character recognition, deep learning-based CRNN (Convolutional Recurrent Neural Network) is mainstream, but the above algorithm adopts LSTM (Long Short Term Memory) instead of RNN to improve accuracy. Note that a known model may be adopted for at least one of the character detection model and the character recognition model.
[0021] The image storage unit 38 stores the expected image 20 and the verification image 22 uploaded from the user terminal 12. The verification result storage unit 40 stores the verification result 24 regarding whether or not the expected image 20 and the verification image 22 match. The verification result 24 includes a judgment result by a judgment unit 50 described later.
[0022] The data processing unit 30 includes an image acquisition unit 42, a character detection unit 44, a character recognition unit 46, a corresponding area identification unit 48, a determination unit 50, and a verification result output unit 52. The functions of these multiple functional blocks may be implemented in a computer program, and this computer program may be installed in the storage of the verification device 14 via a recording medium or a network. The processor (CPU, etc.) of the verification device 14 may fulfill the functions of the above multiple functional blocks by reading this computer program into a main memory and executing it.
[0023] The image acquisition unit 42 acquires the expected image 20 and the verification image 22 transmitted from the user terminal 12 and stores them in the image storage unit 38 .
[0024] The character detection unit 44 detects one or more character display areas included in the expected image 20 using the character detection model stored in the model storage unit 36. The character detection unit 44 also detects one or more character display areas included in the verification image 22 using the character detection model. The character detection unit 44 may be realized using a known character detection technique.
[0025] The character recognition unit 46 recognizes characters displayed in each character display area of the expected image 20 using the character recognition model stored in the model storage unit 36. The character recognition unit 46 also recognizes characters displayed in each character display area of the verification image 22 using the character recognition model. The character recognition unit 46 may be realized using a known character recognition technology. At least one of the functions of the character detection unit 44 and the character recognition unit 46 may be realized using a known OCR (Optical character recognition) technology.
[0026] The corresponding area specifying unit 48 specifies a correspondence between each character display area of the expected image 20 and each character display area of the verification image 22, based on the attribute information on each character display area of the expected image 20 and the attribute information on each character display area of the verification image 22. In other words, the corresponding area specifying unit 48 specifies a pair of a corresponding character display area of the expected image 20 and a character display area of the verification image 22.
[0027] For example, the corresponding area identifying unit 48 identifies a character display area arranged at a certain position in the expected image 20 (for example, a character display area in which the character string "account number" is displayed in the expected image 20 in Fig. 2) and a character display area arranged in the vicinity of the above position in the verification image 22 (for example, a character display area in which the character string "account number" is displayed in the verification image 22 in Fig. 3) as corresponding to each other. The attribute information on each character display area includes information on the position, size and feature points of each character display area.
[0028] The determination unit 50 determines whether or not the expected image 20 and the verification image 22 match based on the identity of the position of the character display area of the expected image 20 and the position of the character display area of the verification image 22, and the identity of the characters (character string) displayed in the character display area of the expected image 20 and the characters (character string) displayed in the character display area of the verification image 22. In the embodiment, the determination unit 50 determines whether or not the expected image 20 and the verification image 22 match based on the identity of the positions and the characters between the corresponding character display areas of the expected image 20 and the character display areas of the verification image 22, which are identified by the corresponding area identification unit 48.
[0029] The verification result output unit 52 outputs the determination result by the determination unit 50. In the embodiment, the verification result output unit 52 stores the verification result 24 including data of the determination result by the determination unit 50 in the verification result storage unit 40. The verification result output unit 52 may transmit the verification result 24 to the user terminal 12 in response to a request from the user terminal 12.
[0030] The operation of the verification support system 10 having the above configuration will now be described. When testing a web application, the deliverables saved are a screenshot (first image) of the web page data generated by the web application being tested displayed in a first web browser, and a screenshot (second image) of the same web page data displayed in a second web browser.
[0031] In order to confirm that the web application to be tested satisfies the requirements for multi-browser compatibility, the user uploads a first image to the verification device 14 as an expected image 20 and uploads a second image to the verification device 14 as a verification image 22. That is, the user terminal 12 transmits a verification request including the expected image 20 and the verification image 22 to the verification device 14 in response to the user's operation.
[0032] 5 is a flowchart showing the operation of the verification device 14. The image acquisition unit 42 of the verification device 14 acquires the expected image 20 and the verification image 22 transmitted from the user terminal 12, and stores them in the model storage unit 36 (S10).
[0033] The character detection unit 44 of the verification device 14 inputs the expected image 20 to a character detection model previously stored in the model storage unit 36, and acquires information on the coordinates, width, and height of the center position of each of one or more character display areas included in the expected image 20, which is output from the character detection model. The character detection unit 44 also inputs the verification image 22 to the character detection model, and acquires information on the coordinates, width, and height of the center position of each of one or more character display areas included in the verification image 22, which is output from the character detection model (S12). Hereinafter, the information on the coordinates, width, and height of the center position of the character display area is also referred to as attribute information of the character display area.
[0034] The character recognition unit 46 of the verification device 14 inputs the expected image 20 and attribute information of each character display area of the expected image 20 to a character recognition model stored in advance in the model storage unit 36, and acquires information on character strings drawn in each character display area of the expected image 20 output from the character recognition model. The character recognition unit 46 also inputs the verification image 22 and attribute information on each character display area of the verification image 22 to the character recognition model, and acquires information on character strings drawn in each character display area of the verification image 22 output from the character recognition model (S14).
[0035] The corresponding area identifying unit 48 of the verification device 14 detects feature points from each character display area of the expected image 20, and acquires information on the detected feature points. The feature points may be detected based on corners or brightness gradients. In the embodiment, the feature point information is AKAZE (Accelerated KAZE) feature values. The corresponding area identifying unit 48 identifies the coordinates of the center position, width, height, and AKAZE feature values of each character display area as attribute information of each character display area of the expected image 20. Similarly, the corresponding area identifying unit 48 identifies the coordinates of the center position, width, height, and AKAZE feature values of each character display area as attribute information of the character display area to be written in the verification image 22.
[0036] The corresponding area identifying unit 48 identifies a pair of corresponding character display areas between the expected image 20 and the verification image 22 based on the coordinates of the center position, width, height, and AKAZE feature of each character display area in the expected image 20 and the coordinates of the center position, width, height, and AKAZE feature of each character display area in the verification image 22 (S16). For example, the corresponding area identifying unit 48 may identify, as corresponding, character display areas in the expected image 20 and the verification image 22, where the differences in the coordinates of the center position, width, height, and AKAZE feature are within a predetermined threshold.
[0037] The determination unit 50 of the verification device 14 determines the identity of the position and the identity of the displayed characters (character string) for each pair of the corresponding character display area of the expected image 20 and the character display area of the verification image 22 (S18). In the embodiment, the determination unit 50 determines that the expected image 20 and the verification image 22 match when it is determined that the positions are the same and the characters are the same across all pairs of the corresponding character display areas of the expected image 20 and the character display areas of the verification image 22. In other words, the determination unit 50 determines that the expected image 20 and the verification image 22 do not match when at least one of the positions and the characters is different in at least one pair of the corresponding character display areas of the expected image 20 and the character display areas of the verification image 22.
[0038] Even if there is a deviation between the position of the character display area of the expected image 20 and the position of the character display area of the verification image 22, if the deviation is within a predetermined allowable range, the determining unit 50 determines that the position of the character display area of the expected image 20 is the same as the position of the character display area of the verification image 22. In other words, if the magnitude of the deviation between the position of the character display area of the expected image 20 and the position of the character display area of the verification image 22 exceeds the allowable range, the determining unit 50 determines that the position of the character display area of the expected image 20 and the position of the character display area of the verification image 22 do not match.
[0039] The determination unit 50 may calculate the deviation between the center coordinates of the character display area of the expected image 20 and the center coordinates of the character display area of the verification image 22 as the deviation between the positions of the character display area of the expected image 20 and the character display area of the verification image 22. The allowable range may be called a threshold and may be determined in pixel units. By allowing a certain degree of deviation between the positions of the character display area of the expected image 20 and the character display area of the verification image 22, it is possible to determine that the positions are substantially the same even when the positions of the character display areas are strictly different between a plurality of web browsers.
[0040] In the embodiment, the judgment unit 50 judges that the position of the character display area in the expected image 20 and the position of the character display area in the verification image 22 are identical if the vertical shift between the positions of the character display area in the expected image 20 and the character display area in the verification image 22 is within a predetermined vertical shift tolerance range and the horizontal shift between the positions of the character display area in the expected image 20 and the character display area in the verification image 22 is within a predetermined horizontal shift tolerance range.
[0041] The allowable range of vertical misalignment is set to be larger than the allowable range of horizontal misalignment. For example, the allowable range of vertical misalignment may be 20 pixels, while the allowable range of horizontal misalignment may be 10 pixels. The effect of vertical misalignment on the usability of a web page is relatively smaller than that of horizontal misalignment. Therefore, by making the allowable range of vertical misalignment larger than the allowable range of horizontal misalignment, the same range of character display area positions can be set more appropriately while taking usability into consideration.
[0042] Appropriate values for the allowable range of vertical misalignment and the allowable range of horizontal misalignment may be determined based on the user's knowledge or through experiments using the verification support system 10. The user terminal 12 may register data of the allowable range determined by the user in the verification device 14. The judgment unit 50 of the verification device 14 may execute the above judgment using the allowable range value registered from the user terminal 12.
[0043] The determination unit 50 generates a comparison result report and a comparison image as data (verification result 24 in FIG. 1) indicating a verification result (in other words, a determination result) regarding whether or not the expected image 20 and the verification image 22 match, and stores the generated comparison result report and comparison image in the verification result storage unit 40 (S20). The verification result output unit 52 transmits the comparison result report and comparison image stored in the verification result storage unit 40 to the user terminal 12 that issued the verification request (S22).
[0044] The comparison result report includes the verification execution date, the file name of the expected image 20, the file name of the verification image 22, the file name of the comparison image, and the comparison result between the expected image 20 and the verification image 22 ("match" or "mismatch").
[0045] The comparison images include a first comparison image corresponding to the expected image 20 and a second comparison image corresponding to the verification image 22. Fig. 6 shows an example of a first comparison image 60. The first comparison image 60 is obtained by adding an image (hereinafter referred to as a "character frame 62") indicating the outer edge of each character display area of the expected image 20. The determination unit 50 generates the first comparison image 60 by adding a character frame 62 to each of one or more character display areas detected from the expected image 20.
[0046] 7 shows an example of the second comparison image 70. The determination unit 50 generates the second comparison image 70 by adding a character frame to each of one or more character display areas detected from the verification image 22. However, the determination unit 50 generates the second comparison image 70 in which a character display area of the verification image 22 in which at least one of the position and the character is different from that of the character display area of the expected image 20 is shown in a different manner from a character display area of the verification image 22 in which both the position and the character are the same as those of the character display area of the expected image 20.
[0047] Specifically, the determination unit 50 adds a matching character frame 72 to each of the multiple character display areas of the verification image 22 when both the position and the characters match those of the corresponding character display area of the expected image 20, and adds a mismatching character frame 74 when at least one of the position and the characters does not match those of the corresponding character display area of the expected image 20. In other words, the determination unit 50 adds a matching character frame 72 to those of the multiple character display areas of the verification image 22 that match those of the character display area of the expected image 20, and adds a mismatching character frame 74 to those that do not match those of the character display area of the expected image 20. In FIG. 7, the position of the character display area displaying the character string "200" does not match the corresponding character display area of the expected image 20 (specifically, the horizontal deviation exceeds the horizontal tolerance), so the mismatching character frame 74 is added to the character display area displaying "200".
[0048] Furthermore, when there is a character display area in the verification image 22 whose position does not match that of the corresponding character display area in the expected image 20, the determination unit 50 places an expected character box 76 at the position of the corresponding character display area in the expected image 20. The expected character box 76 indicates the original position of the character display area to which the mismatched character box 74 is added. Appearances different from one another are set for the matching character box 72, the mismatched character box 74, and the expected character box 76. For example, the color, type (solid line, dashed line, etc.), width, or filling manner of the frame lines may be different. Furthermore, the determination unit 50 places a line (difference line 78) connecting the center of the mismatched character box 74 and the center of the expected character box 76.
[0049] Fig. 8 also shows an example of the second comparison image 70. Fig. 8 shows the second comparison image 70 when a character mismatch is detected, specifically, when a character display area displaying a character string "Principal" different from the expected character string "Deposit" is detected. The determination unit 50 adds a mismatch character frame 74 to the character display area where the characters do not match those of the corresponding character display area of the expected image 20.
[0050] In this way, by providing the first comparison image 60 as shown in Fig. 6 and the second comparison image 70 as shown in Fig. 7 and Fig. 8 as the verification result, the difference between the expected image 20 and the verification image 22 can be presented to the user in an easy-to-understand manner. Note that if a mismatch in position shown in the second comparison image 70 in Fig. 7 or a mismatch in characters shown in the second comparison image 70 in Fig. 8 is detected, the determination unit 50 sets the comparison result in the comparison result report to "mismatch."
[0051] The verification device 14 of the embodiment judges whether the expected image 20 and the verification image 22 match based on the identity of the positions of the character display areas and the identity of the characters. Although differences in pixel value levels are inevitable between a plurality of web browsers, the verification device 14 can effectively assist in the verification of whether the expected image 20 and the verification image 22 match by judging that the expected image 20 and the verification image 22 match if the character display areas substantially match. Furthermore, the verification device 14 can increase the accuracy of the judgment of whether the expected image 20 and the verification image 22 match by judging the identity between the corresponding character display areas of the expected image 20 and the verification image 22.
[0052] The present disclosure has been described above based on the embodiments. The contents described in the embodiments are merely examples, and it will be understood by those skilled in the art that various modifications are possible in the combination of the components and processing steps of the embodiments, and that such modifications are also within the scope of the present disclosure.
[0053] The functions of the multiple functional blocks included in the verification device 14 of the above embodiment may be distributed and implemented in multiple information processing devices (including servers on the cloud). In this case, the multiple information processing devices may cooperate as a system to execute the same processing as that of the verification device 14 of the embodiment.
[0054] Any combination of the above-mentioned examples and modifications is also useful as an embodiment of the present invention. A new embodiment resulting from the combination has the effects of each of the combined examples and modifications. It will also be understood by those skilled in the art that the functions to be performed by each component recited in the claims can be realized by each component shown in the examples and modifications alone or in cooperation with each other. [Explanation of symbols]
[0055] 10 verification support system, 12 user terminal, 14 verification device, 42 image acquisition unit, 44 character detection unit, 46 character recognition unit, 48 corresponding area identification unit, 50 judgment unit, 52 verification result output unit.
Claims
1. an image acquisition unit that acquires a first image and a second image to be compared; a character detection unit that detects a character display area in each of the first image and the second image; a character recognition unit that recognizes characters displayed in the character display areas of the first image and the second image; a determination unit that determines whether or not the first image and the second image match based on the identity of the position of the character display area and the identity of the character displayed in the character display area; an output unit that outputs a determination result by the determination unit; A verification device comprising:
2. the determination unit determines that a position of the character display area of the first image and a position of the character display area of the second image are identical when a deviation between a position of the character display area of the first image and a position of the character display area of the second image is within a predetermined allowable range. The verification device according to claim 1 .
3. The vertical tolerance is set to be larger than the horizontal tolerance. The verification device according to claim 2 .
4. the output unit outputs, as an image showing the determination result, an image showing a character display area of the second image, in which at least one of a position and a character is different from that of the character display area of the first image, in a manner different from that of a character display area of the second image, in which both a position and a character are the same as those of the character display area of the first image.
4. The verification device according to claim 1.
5. A corresponding region specifying unit is further provided, each of the first image and the second image includes one or more character display areas; the corresponding area specification unit specifies a correspondence between each character display area of the first image and each character display area of the second image based on information on a position and a feature point of each character display area of the first image and information on a position and a feature point of each character display area of the second image; the determination unit determines whether the first image and the second image match based on identity of positions and identity of characters between corresponding character display areas of the first image and character display areas of the second image.
4. The verification device according to claim 1.
Citation Information
Patent Citations
Image processing apparatus and program
JP2010146376A
Image inspection device, image inspection method, and program
JP2013214178A
Comparison program, information processor, and comparison method
JP2016218977A
Information processing device, information processing method, and program
JP2018022238A
