CN112329854A - Method and device for cutting and checking advertisement material picture - Google Patents

Method and device for cutting and checking advertisement material picture Download PDF

Info

Publication number
CN112329854A
CN112329854A CN202011224851.6A CN202011224851A CN112329854A CN 112329854 A CN112329854 A CN 112329854A CN 202011224851 A CN202011224851 A CN 202011224851A CN 112329854 A CN112329854 A CN 112329854A
Authority
CN
China
Prior art keywords
advertisement material
page
picture
tested
advertisement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011224851.6A
Other languages
Chinese (zh)
Other versions
CN112329854B (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202011224851.6A priority Critical patent/CN112329854B/en
Publication of CN112329854A publication Critical patent/CN112329854A/en
Application granted granted Critical
Publication of CN112329854B publication Critical patent/CN112329854B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • 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/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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

Abstract

The application discloses a method and a device for cutting and checking an advertisement material picture. The method comprises the following steps: when an application program enters a page to be tested, page display data corresponding to the page to be tested are obtained from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture subjected to dotting processing, and the advertisement material picture is displayed in the advertisement material area; displaying the page to be tested according to the page display data; screenshot processing is carried out on the advertisement material area in the page to be tested to obtain an advertisement material screenshot picture; and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut according to the comparison result. The application can improve the testing efficiency.

Description

Method and device for cutting and checking advertisement material picture
Technical Field
The application relates to the field of image processing, in particular to a method and a device for cutting and checking an advertisement material picture.
Background
With the rapid development of internet technology, the rise of mobile applications under the trend of mobile internet is a big trend, and the rapid update of application programs brought by iteration is required to be more and more rapidly.
After each update of an application, various tests are required on the updated mobile application. For example, an advertisement material region for displaying an advertisement card in an application program needs to be tested, however, the inventor finds that, when the advertisement material region is tested, developers or testers need to release, examine and preview different types of advertisement cards when testing the advertisement material region, the number of advertisement creatives required during testing is large, many different types of advertisement creatives are required, different advertisement types need to be released in different advertisement release systems, and the release can be performed after the advertisement engines are built for a certain time and the like to generate indexes, a link and time for creating advertisement data are very long, and the testing efficiency is very low.
Disclosure of Invention
In view of the above, a method, an apparatus, a computer device, and a computer readable storage medium for cutting and checking an advertisement material picture are provided to solve the problem of low test efficiency when an advertisement material region is tested in the prior art.
The application provides a method for cutting and checking an advertisement material picture, which comprises the following steps:
when an application program enters a page to be tested, page display data corresponding to the page to be tested are obtained from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area;
displaying the page to be tested according to the page display data;
screenshot processing is carried out on the advertisement material area in the page to be tested to obtain an advertisement material screenshot picture;
and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut according to the comparison result.
Optionally, the obtaining, from the mock server, page display data corresponding to the page to be tested includes:
intercepting page data corresponding to the page to be tested through the mock server;
reading a mock rule corresponding to the page to be tested;
and modifying the page data into the page display data according to the mock rule.
Optionally, the page data is modified into the page display data according to the mock rule:
determining a material picture to be replaced contained in the page data according to the mock rule;
determining the advertisement material picture according to the mock rule;
and modifying the material picture to be replaced in the page data into the advertisement material picture.
Optionally, the advertisement material picture is a picture after dotting, the comparing the advertisement material screenshot picture with the advertisement material picture, and determining whether the advertisement material picture is cut according to the comparison result includes:
recognizing the advertisement material screenshot picture by adopting a preset character recognition model to obtain dotting characters in the advertisement material screenshot picture;
and checking the dotting characters and preset dotting characters, and judging whether the advertisement material picture is cut according to a checking result.
Optionally, the recognizing the advertisement material screenshot picture by using a preset character recognition model to obtain the dotting characters in the advertisement material screenshot picture includes:
preprocessing the screenshot picture of the advertisement material;
and identifying the preprocessed advertisement material screenshot picture by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot picture.
Optionally, the method for cutting and checking the advertisement material picture further includes:
and controlling the application program to enter the page to be tested by adopting a UI automation technology.
Optionally, the method for cutting and checking the advertisement material picture further includes:
and generating a verification report according to the verification result.
The application also provides a verifying attachment is tailor to advertisement material picture, includes:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring page display data corresponding to a page to be tested from a mock server when an application program enters the page to be tested, the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area;
the display module is used for displaying the page to be tested according to the page display data;
the screenshot module is used for carrying out screenshot processing on the advertisement material area in the page to be tested so as to obtain an advertisement material screenshot picture;
and the judging module is used for comparing the advertisement material screenshot picture with the advertisement material picture and judging whether the advertisement material picture is cut according to a comparison result.
The present application further provides a computer 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 above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
The beneficial effects of the above technical scheme are that:
in the embodiment of the application, when an application program enters a page to be tested, page display data corresponding to the page to be tested is obtained from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area; displaying the page to be tested according to the page display data; screenshot processing is carried out on the advertisement material area in the page to be tested to obtain an advertisement material screenshot picture; and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut according to the comparison result. In the embodiment of the application, the mock server is used for simulating the advertisement material in the page to be tested of the application program, so that the advertisement does not need to be created and examined at the launching end, the advertisement material can be issued without waiting for the index generated by the advertisement engine, the time spent on creating the link of the advertisement data can be saved, and the efficiency of testing whether the advertisement material is cut is improved. Meanwhile, the advertisement materials are automatically identified through the character identification model in the embodiment of the application, and the advertisement materials are not required to be identified in a manual mode, so that the labor consumption is reduced, the test cost is reduced, and the test efficiency is further improved.
Drawings
FIG. 1 is an environment operation diagram of a method for clipping and checking an advertisement material picture according to an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment of a method for checking clipping of an advertisement material picture according to the present application;
FIG. 3 is a schematic diagram of a page to be tested according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a detailed process of acquiring page display data corresponding to the page to be tested from the mock server according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a step of modifying the page data into the page display data according to the mock rule in an embodiment of the present application;
fig. 6 is a schematic view of a detailed flow of the steps of comparing the advertisement material screenshot picture with the advertisement material picture, and determining whether the advertisement material picture is cut according to the comparison result in an embodiment of the present application;
FIG. 7 is a schematic diagram of a screenshot of an advertisement material according to an embodiment of the present application;
fig. 8 is a schematic view illustrating a detailed flow of the step of recognizing the screenshot picture of the advertisement material by using a preset character recognition model to obtain a dotting character in the screenshot picture of the advertisement material in an embodiment of the present application;
FIG. 9 is a diagram illustrating a verification report according to an embodiment of the present application;
FIG. 10 is a block diagram of a program of an embodiment of an apparatus for verifying cropping of an advertisement material picture according to the present application;
fig. 11 is a schematic diagram of a hardware structure of a computer device for executing the method for verifying clipping of an advertisement material picture according to the embodiment of the present application.
Detailed Description
The advantages of the present application are further illustrated below with reference to the accompanying drawings and specific embodiments.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order of performing the steps, but merely serve to facilitate the description of the present application and to distinguish each step, and therefore should not be construed as limiting the present application.
Fig. 1 schematically shows a frame diagram of an advertisement material picture cropping verification method according to an embodiment of the present application. In an exemplary embodiment, the system of the application environment may include a user terminal 10, a mock server 20. Wherein, the user terminal 10 forms a wireless or wired connection with the mock server 20, and an application program (APP) is installed in the user terminal 10. The user terminal 10 may be a mobile phone, an iPAD, a tablet computer, or the like. The mock server 20 is used for simulating the advertisement material in the page to be tested of the application program and sending the page to be tested with the advertisement material to the application program so as to display the page to be tested.
Fig. 2 is a schematic flow chart of a method for clipping and checking an advertisement material picture according to an embodiment of the present application. It should be understood that the flow charts in the embodiments of the present method are not used to limit the order of executing the steps. As can be seen from the figures, the method for verifying the cropping of the advertisement material picture provided in this embodiment includes:
step S20, when the application program enters a page to be tested, page display data corresponding to the page to be tested is obtained from the mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area.
In particular, the application may be various types of applications, such as a video type application, a news type application, a social type application, and the like. In the present embodiment, the type of the application is not limited.
The page to be tested is used for testing whether the advertisement material in the advertisement material area is cut. For example, assuming that the application is a video-type application called bilibili (bilibili) as shown in fig. 3, the page to be tested may be a live page, a recommended page, a hot page, a chasing page, a video page, etc. of the video-type application. In this embodiment, the live broadcast page, the recommendation page, the hit page, the catch-up page, the video page, and the like generally have an advertisement material area for delivering advertisement materials, wherein the advertisement material area can display different types of advertisement materials according to the difference of the area size corresponding to the page control included in the page to be tested.
The mock server is a script tool for quickly building a data server for a development environment, only one pre-configured JSON template file is needed for starting the server, and the server can be simulated to respond to a data request through the mock server. In this embodiment, the mock server may simulate and respond to a data request for acquiring page display data corresponding to the page to be tested, and issue the page display data acquired in response to the data request to an application program, so that the application program may display the page to be tested.
The page display data is used for displaying the page to be tested, and the page display data comprises advertisement material pictures.
In an exemplary embodiment, referring to fig. 4, the obtaining, from the mock server, page display data corresponding to the page to be tested includes:
and step S40, intercepting page data corresponding to the page to be tested through the mock server.
Specifically, when an application program enters a page to be tested, the application program requests page data corresponding to the page to be tested from a data server through a data interface corresponding to the page to be tested, so that the page to be tested can be displayed through the page data. The data server is a server for storing page data of the application program.
In this embodiment, when an application program enters a page to be tested, the mock server intercepts page data corresponding to the page to be tested as a template file, so that data construction can be performed on the intercepted page data to obtain test page data conforming to a current test scenario.
And step S41, reading the mock rule corresponding to the page to be tested.
Specifically, mock rules corresponding to various pages to be tested are configured in the mock server in advance. Illustratively, the mock rule corresponding to the live broadcast page configured with the beep-ridge application is rule A, the mock rule corresponding to the recommendation page configured with the beep-ridge application is mock rule B, the mock rule corresponding to the hot gate page configured with the beep-ridge application is rule C, the mock rule corresponding to the chasing page configured with the beep-ridge application is rule D, the mock rule corresponding to the movie page configured with the beep-ridge application is mock rule E, and the like.
In this embodiment, after intercepting page data corresponding to a page to be tested, a page category to which the page to be tested specifically belongs may be determined according to the page data of the page to be tested, and then a mock rule corresponding to the category is read according to the category to which the page to be tested belongs, for example, if the current page to be tested is a live broadcast page, the mock rule may be read and obtained as rule a.
And step S42, modifying the page data into the page display data according to the mock rule.
Specifically, the mock rule includes a rule for modifying the page data, where the rule is predefined, and for example, the rule is to replace a picture displayed in a second control for displaying pictures in the page to be tested with a preset advertisement material picture subjected to dotting processing.
In this embodiment, after the mock rule is obtained, the proxy tool of the secondary development proxy framework may be used to modify the page data according to the mock rule, so as to modify the page data into the page display data.
In an exemplary embodiment, referring to fig. 5, the modifying the page data into the page display data according to the mock rule is as follows:
and step S50, determining the material picture to be replaced contained in the page data according to the mock rule.
Specifically, the mock rule predefines a material picture that needs to be replaced in the page data, for example, the mock rule predefines that a picture displayed in a second control for displaying a picture in the page data needs to be replaced by a preset advertisement material picture that is processed by dotting, and after the mock rule is read, the picture displayed in the second control for displaying a picture in the page data can be determined as the material picture to be replaced.
And step S51, determining the advertisement material picture according to the mock rule.
Specifically, the mock rule also defines in advance an advertisement material picture after dotting that needs to be replaced with the material picture to be replaced, for example, the mock rule defines in advance that the material picture to be replaced needs to be replaced with an advertisement material picture a after dotting, and after the mock rule is read, the advertisement material picture a can be determined to be the advertisement material picture after dotting.
Step S52, modifying the material picture to be replaced in the page data into the advertisement material picture.
Specifically, when the material picture to be replaced and the advertisement material picture are determined, the advertisement material picture can be replaced by the material picture to be replaced through an agent tool, so that modification of page data is achieved.
In the embodiment of the application, the mock server is used for intercepting the page data corresponding to the page to be tested, and then the page data is modified into the page display data according to the mock rule, so that the obtained page display data can accord with the page data required by a real test scene, and the reliability of the page display data is improved.
It should be noted that, the page display data corresponding to each category of the page to be tested may also be stored in the mock server in advance, so that when the application enters the page to be tested, the page display data matched with the category of the page to be tested is directly obtained from the mock server, and the page display data is obtained without modifying the real page data corresponding to the page to be tested, thereby saving the time consumption for data modification and improving the testing efficiency.
And step S21, displaying the page to be tested according to the page display data.
Specifically, after the page display data is acquired, a page can be rendered by the page display data to display the page to be tested.
And step S22, performing screenshot processing on the advertisement material area in the page to be tested to obtain an advertisement material screenshot picture.
In particular, elements in the advertising material area may be identified to locate the advertising material area in the page to be tested. In an embodiment, when the advertisement material region is located, an identifier for marking the advertisement material picture, which is set in the page display data in advance, may be obtained, and then the advertisement material region corresponding to the advertisement material picture may be determined according to the identifier.
In an exemplary embodiment, after the screenshot process is performed on the advertisement material area, the screenshot picture of the advertisement material is obtained as shown in fig. 7.
And step S23, comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut according to the comparison result.
Specifically, when comparing the pictures, whether the advertisement material picture is cut or not may be determined by comparing whether the sizes of the advertisement material picture and the advertisement material screenshot picture are the same, or whether the advertisement material picture is cut or not may be determined by comparing whether some characters in the advertisement material picture are the same as the characters in the advertisement material screenshot picture or not.
In the embodiment of the application, when an application program enters a page to be tested, page display data corresponding to the page to be tested is obtained from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area; displaying the page to be tested according to the page display data; screenshot processing is carried out on the advertisement material area in the page to be tested to obtain an advertisement material screenshot picture; and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut according to the comparison result. In the embodiment of the application, the mock server is used for simulating the advertisement material in the page to be tested of the application program, so that the advertisement does not need to be created and examined at the launching end, the advertisement material can be issued without waiting for the index generated by the advertisement engine, the time spent on creating the link of the advertisement data can be saved, and the efficiency of testing whether the advertisement material is cut is improved. Meanwhile, the advertisement materials are automatically identified through the character identification model in the embodiment of the application, and the advertisement materials are not required to be identified in a manual mode, so that the labor consumption is reduced, the test cost is reduced, and the test efficiency is further improved.
As an example, when the advertisement material picture is a picture after dotting, referring to fig. 6, the comparing the advertisement material screenshot picture with the advertisement material picture, and determining whether the advertisement material picture is cut according to the comparison result includes:
and step S60, recognizing the screenshot picture of the advertisement material by adopting a preset character recognition model to obtain the dotting characters in the screenshot picture of the advertisement material.
In this embodiment, the dotting process is to add dotting characters to two vertex regions of at least one diagonal line in the advertisement material. In one embodiment, when the dotting process is performed, dotting characters may be added to two vertex regions of one diagonal line in the advertisement material, or to four vertex regions of two diagonal lines in the advertisement material, or to two vertex regions of one diagonal line and one vertex region of the other diagonal line in the advertisement material.
It should be noted that the dotting characters in the present embodiment may be characters, numbers, letters, etc., for example, as shown in fig. 7, the dotting characters are respectively the character "LU" located in the upper left corner region of the advertisement material picture, the character "RU" located in the upper right corner region, the character "LD" in the lower left corner region, and the character "RD" in the lower right corner region.
It is understood that, for the purpose of subsequently identifying the advertisement material picture after the dotting process, the advertisement material picture without the dotting process is preferably a picture without a background image, such as a gray picture.
The character recognition model is a model for recognizing characters included in the picture from the picture, and the character recognition model may be obtained by training a sample picture using a deep learning technique, or may be an existing character recognition model, which is not limited in this embodiment.
In this embodiment, after the character recognition model recognizes the screenshot picture of the advertisement material, a txt file containing the recognized dotting character may be output.
In an exemplary implementation manner, referring to fig. 8, in order to improve a success rate of recognizing the advertisement material screenshot picture by the character recognition model, in this embodiment, the recognizing the advertisement material screenshot picture by using a preset character recognition model to obtain a dotting character in the advertisement material screenshot picture includes:
and step S80, preprocessing the screenshot picture of the advertisement material.
And step S81, recognizing the preprocessed advertisement material screenshot picture by adopting a preset character recognition model to obtain the dotting characters in the advertisement material screenshot picture.
Specifically, the preprocessing includes processing operations of picture size conversion, picture brightness, contrast, saturation and other adjustments of the screenshot picture of the advertisement material, so as to highlight the definition and identifiability of the dotting characters contained in the screenshot picture of the advertisement material.
In the embodiment of the application, the screenshot picture of the advertisement material is preprocessed, so that the success rate of the character recognition model for recognizing dotting characters in the screenshot picture of the advertisement material can be improved.
In an embodiment, in order to further improve the success rate of identifying the dotting characters by the character identification model, when the dotting processing is performed on the advertisement material picture, according to different screen doubling models and part of android high-resolution screens of the adaptation, the dotting characters with different sizes are dotted on the advertisement material picture according to the screen doubling models, so that when page data is modified subsequently, the corresponding advertisement material picture can be replaced according to the screen doubling models.
And step S61, checking the dotting characters and preset dotting characters, and judging whether the advertisement material picture is cut according to the checking result.
Specifically, the preset dotting characters are characters added in the advertisement material picture in advance, that is, the characters added when the advertisement material picture is dotted.
In this embodiment, after the dotting character is obtained through the character recognition model, the dotting character and the preset dotting character can be verified, wherein when the recognized dotting character is the same as the preset dotting character, a verification result that the advertisement material picture is not cut is obtained; and when the recognized dotting characters are different from the preset dotting characters, obtaining a verification result of cutting the advertisement material picture.
In the embodiment of the application, when the recognized dotting characters are different from the preset dotting characters, the fact that the advertisement material picture in the page to be tested is cut when the page to be tested is displayed is shown, and therefore the dotting characters in the advertisement material picture are lost. Therefore, the embodiment of the application can judge whether the advertisement material picture is cut or not by comparing and identifying whether the obtained dotting characters are the same as the preset dotting characters or not.
In an exemplary embodiment, in order to reduce the labor consumption for the cutting verification test on the advertisement material picture, in this embodiment, a UI automation technology may be used to control the application program to enter the page to be tested.
In the embodiment, the operation that the user manually clicks the application program to perform the page to be tested is realized through the UI automation technology, so that the user does not need to click manually, and the labor consumption is saved.
In an exemplary embodiment, in order to facilitate the intuitive understanding of the test result, in this embodiment, after the verification result is obtained, a verification report may be generated according to the verification result.
In this embodiment, jenkins may be used to generate a verification report according to a verification result, where jenkins is an open source software project, is a continuous integration tool developed based on Java, is used to monitor continuous and repeated work, and aims to provide an open and easy-to-use software platform, so that continuous integration of software becomes possible.
In an exemplary embodiment, the generated verification report is shown in FIG. 9.
Fig. 10 is a block diagram of an embodiment of a cutting and checking device 90 for an advertisement material picture according to the present application.
In this embodiment, the advertisement material picture cropping checking device 90 includes a series of computer program instructions stored on a memory, and when the computer program instructions are executed by a processor, the advertisement material picture cropping checking function of the embodiments of the present application can be implemented. In some embodiments, the advertising material picture cropping verification means 90 may be divided into one or more modules based on the specific operations implemented by the portions of the computer program instructions. For example, in fig. 10, the advertisement material picture cropping verification device 90 may be divided into an acquisition module 91, a display module 92, a screenshot module 93 and a determination module 94. Wherein:
the obtaining module 91 is configured to obtain, from the mock server, page display data corresponding to a page to be tested when an application program enters the page to be tested, where the page to be tested includes an advertisement material region, the page display data includes an advertisement material picture, and the advertisement material picture is displayed in the advertisement material region.
And the display module 92 is used for displaying the page to be tested according to the page display data.
And the screenshot module 93 is configured to perform screenshot processing on the advertisement material area in the page to be tested to obtain a screenshot picture of the advertisement material.
And the judging module 94 is configured to compare the advertisement material screenshot picture with the advertisement material picture, and judge whether the advertisement material picture is cut according to a comparison result.
In an exemplary embodiment, the obtaining module 91 is further configured to intercept, by the mock server, page data corresponding to the page to be tested; reading a mock rule corresponding to the page to be tested; and modifying the page data into the page display data according to the mock rule.
In an exemplary embodiment, the obtaining module 91 is further configured to determine, according to the mock rule, a to-be-replaced material picture included in the page data; determining the advertisement material picture according to the mock rule; and modifying the material picture to be replaced in the page data into the advertisement material picture.
In an exemplary embodiment, the determining module 94 is further configured to identify the screenshot picture of the advertisement material by using a preset character identification model, so as to obtain a dotting character in the screenshot picture of the advertisement material; checking the dotting characters and preset dotting characters, and judging whether the advertisement material picture is cut according to the checking result
In an exemplary embodiment, the identifying module 94 is further configured to pre-process the screenshot picture of the advertisement material; and identifying the preprocessed advertisement material screenshot picture by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot picture.
In an exemplary embodiment, the advertisement material picture cropping verification device 90 further comprises a control module.
And the control module is used for controlling the application program to enter the page to be tested by adopting a UI automation technology.
In an exemplary embodiment, the advertisement material picture cropping verification device 90 further comprises a generation module.
And the generating module is used for generating a verification report according to the verification result.
In an exemplary embodiment, when the advertisement material is subjected to the dotting process, dotting characters are added to two vertex regions of at least one diagonal line in the advertisement material.
In the embodiment of the application, when an application program enters a page to be tested, page display data corresponding to the page to be tested is obtained from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area; displaying the page to be tested according to the page display data; screenshot processing is carried out on the advertisement material area in the page to be tested to obtain an advertisement material screenshot picture; and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut according to the comparison result. In the embodiment of the application, the mock server is used for simulating the advertisement material in the page to be tested of the application program, so that the advertisement does not need to be created and examined at the launching end, the advertisement material can be issued without waiting for the index generated by the advertisement engine, the time spent on creating the link of the advertisement data can be saved, and the efficiency of testing whether the advertisement material is cut is improved. Meanwhile, the advertisement materials are automatically identified through the character identification model in the embodiment of the application, and the advertisement materials are not required to be identified in a manual mode, so that the labor consumption is reduced, the test cost is reduced, and the test efficiency is further improved.
Fig. 11 schematically shows a hardware architecture diagram of a computer device 10 suitable for implementing the advertisement material picture cropping verification method according to an embodiment of the present application. In the present embodiment, the computer device 10 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set or stored in advance. For example, the server may be a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers). As shown in fig. 11, computer device 10 includes at least, but is not limited to: the memory 120, processor 121, and network interface 123 may be communicatively linked to each other via a system bus. Wherein:
the memory 120 includes at least one type of computer-readable storage medium, which may be volatile or non-volatile, and particularly, includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 120 may be an internal storage module of the computer device 10, such as a hard disk or a memory of the computer device 10. In other embodiments, the memory 120 may also be an external storage device of the computer device 10, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the computer device 10. Of course, memory 120 may also include both internal and external memory modules of computer device 10. In this embodiment, the memory 120 is generally used for storing an operating system installed in the computer device 10 and various types of application software, such as program codes of the advertisement material picture cropping verification method. In addition, the memory 120 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 121 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 121 is generally configured to control the overall operation of the computer device 10, such as performing control and processing related to data interaction or communication with the computer device 10. In this embodiment, the processor 121 is configured to execute the program code stored in the memory 120 or process data.
Network interface 123 may comprise a wireless network interface or a wired network interface, with network interface 123 typically being used to establish communication links between computer device 10 and other computer devices. For example, the network interface 123 is used to connect the computer device 10 to an external terminal via a network, establish a data transmission channel and a communication link between the computer device 10 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It is noted that FIG. 11 only shows a computer device having components 120-122, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the method for verifying cropping of advertisement material pictures stored in the memory 120 can be divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 121) to complete the present application.
The embodiment of the application provides a computer-readable storage medium, a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program realizes the steps of the method for cutting and checking the advertisement material picture in the embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program code of the advertisement material picture cropping verification method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on at least two network units. Some or all of the modules can be screened out according to actual needs to achieve the purpose of the scheme of the embodiment of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for cutting and checking an advertisement material picture is characterized by comprising the following steps:
when an application program enters a page to be tested, page display data corresponding to the page to be tested are obtained from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area;
displaying the page to be tested according to the page display data;
screenshot processing is carried out on the advertisement material area in the page to be tested to obtain an advertisement material screenshot picture;
and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut according to the comparison result.
2. The method for cutting and checking the advertisement material picture as claimed in claim 1, wherein the step of obtaining the page display data corresponding to the page to be tested from the mock server comprises the steps of:
intercepting page data corresponding to the page to be tested through the mock server;
reading a mock rule corresponding to the page to be tested;
and modifying the page data into the page display data according to the mock rule.
3. The method for clipping and checking advertisement material picture according to claim 2, wherein the modifying the page data into the page display data according to the mock rule comprises:
determining a material picture to be replaced contained in the page data according to the mock rule;
determining the advertisement material picture according to the mock rule;
and modifying the material picture to be replaced in the page data into the advertisement material picture.
4. The method for clipping and checking advertisement material pictures according to claim 1, wherein the advertisement material pictures are pictures subjected to dotting, and the comparing the advertisement material screenshot pictures with the advertisement material pictures and determining whether the advertisement material pictures are clipped according to the comparison result comprises:
recognizing the advertisement material screenshot picture by adopting a preset character recognition model to obtain dotting characters in the advertisement material screenshot picture;
and checking the dotting characters and preset dotting characters, and judging whether the advertisement material picture is cut according to a checking result.
5. The method for clipping and checking advertisement material picture according to claim 4, wherein the recognizing the advertisement material screenshot picture by using a preset character recognition model to obtain the dotting characters in the advertisement material screenshot picture comprises:
preprocessing the screenshot picture of the advertisement material;
and identifying the preprocessed advertisement material screenshot picture by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot picture.
6. The method for verifying cropping of picture of advertisement material as claimed in claim 1, wherein said method for verifying cropping of picture of advertisement material further comprises:
and controlling the application program to enter the page to be tested by adopting a UI automation technology.
7. The advertisement material picture cropping verification method according to any one of claims 1 to 6, wherein said advertisement material picture cropping verification method further comprises:
and generating a verification report according to the verification result.
8. The utility model provides a verifying attachment is tailor to advertisement material picture which characterized in that includes:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring page display data corresponding to a page to be tested from a mock server when an application program enters the page to be tested, the page to be tested comprises an advertisement material area, the page display data comprises an advertisement material picture, and the advertisement material picture is displayed in the advertisement material area;
the display module is used for displaying the page to be tested according to the page display data;
the screenshot module is used for carrying out screenshot processing on the advertisement material area in the page to be tested so as to obtain an advertisement material screenshot picture;
and the judging module is used for comparing the advertisement material screenshot picture with the advertisement material picture and judging whether the advertisement material picture is cut according to a comparison result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing the steps of the advertisement material picture cropping verification method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implements the steps of the method for clip-verifying advertising material pictures as claimed in any one of claims 1 to 7.
CN202011224851.6A 2020-11-05 2020-11-05 Method and device for checking picture cutting of advertisement material Active CN112329854B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011224851.6A CN112329854B (en) 2020-11-05 2020-11-05 Method and device for checking picture cutting of advertisement material

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011224851.6A CN112329854B (en) 2020-11-05 2020-11-05 Method and device for checking picture cutting of advertisement material

Publications (2)

Publication Number Publication Date
CN112329854A true CN112329854A (en) 2021-02-05
CN112329854B CN112329854B (en) 2023-07-28

Family

ID=74315444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011224851.6A Active CN112329854B (en) 2020-11-05 2020-11-05 Method and device for checking picture cutting of advertisement material

Country Status (1)

Country Link
CN (1) CN112329854B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420712A (en) * 2010-09-28 2012-04-18 中国移动通信集团公司 Testing method and equipment
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
CN106529529A (en) * 2016-10-31 2017-03-22 腾讯科技(深圳)有限公司 Video subtitle identification method and system
CN106803975A (en) * 2017-03-31 2017-06-06 微梦创科网络科技(中国)有限公司 Advertising testing method and apparatus, test platform
CN109885484A (en) * 2019-01-16 2019-06-14 深圳壹账通智能科技有限公司 Application page test method, device, computer equipment and storage medium
CN110825651A (en) * 2019-12-11 2020-02-21 北京海益同展信息科技有限公司 Webpage compatibility testing method, device, system and storage medium
CN111143188A (en) * 2018-11-02 2020-05-12 中移(杭州)信息技术有限公司 Method and equipment for automatically testing application

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102420712A (en) * 2010-09-28 2012-04-18 中国移动通信集团公司 Testing method and equipment
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
CN106529529A (en) * 2016-10-31 2017-03-22 腾讯科技(深圳)有限公司 Video subtitle identification method and system
CN106803975A (en) * 2017-03-31 2017-06-06 微梦创科网络科技(中国)有限公司 Advertising testing method and apparatus, test platform
CN111143188A (en) * 2018-11-02 2020-05-12 中移(杭州)信息技术有限公司 Method and equipment for automatically testing application
CN109885484A (en) * 2019-01-16 2019-06-14 深圳壹账通智能科技有限公司 Application page test method, device, computer equipment and storage medium
CN110825651A (en) * 2019-12-11 2020-02-21 北京海益同展信息科技有限公司 Webpage compatibility testing method, device, system and storage medium

Also Published As

Publication number Publication date
CN112329854B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN111061526B (en) Automatic test method, device, computer equipment and storage medium
KR20190026641A (en) Method of character recognition of claims document, apparatus, server and storage medium
CN107911227B (en) Breakpoint data follow-up method, electronic device and computer-readable storage medium
CN110765015B (en) Method for testing tested application and electronic equipment
CN111198815B (en) Compatibility testing method and device for user interface
CN113448862B (en) Software version testing method and device and computer equipment
CN113704110A (en) Automatic testing method and device for user interface
CN109324956B (en) System testing method, apparatus and computer readable storage medium
CN113515453A (en) Webpage testing system
CN110727595B (en) Application login interface identification method, intelligent terminal and storage medium
CN111145143B (en) Problem image determining method and device, electronic equipment and storage medium
CN110727576B (en) Web page testing method, device, equipment and storage medium
CN116719736A (en) Test case generation method and device for testing software interface
CN112329854B (en) Method and device for checking picture cutting of advertisement material
CN111401465A (en) Training sample optimization method, device, equipment and storage medium
CN115858049A (en) RPA flow componentization arrangement method, device, equipment and medium
CN111325012A (en) word report generation method and system
CN115687146A (en) BIOS (basic input output System) test method and device, computer equipment and storage medium
CN108021353B (en) Device, method, equipment and storage medium for generating description document of software product
CN112733509B (en) Actuarial report generation method, actuarial report generation device, actuarial report generation equipment and actuarial report generation medium
CN112817816B (en) Embedded point processing method and device, computer equipment and storage medium
CN114663975A (en) Model training method and device, electronic equipment and storage medium
CN113590564A (en) Data storage method and device, electronic equipment and storage medium
CN110674119A (en) Data processing method, system and computer readable storage medium
CN110661678B (en) Abnormity monitoring method and device

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