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

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

Info

Publication number
CN112329854B
CN112329854B CN202011224851.6A CN202011224851A CN112329854B CN 112329854 B CN112329854 B CN 112329854B CN 202011224851 A CN202011224851 A CN 202011224851A CN 112329854 B CN112329854 B CN 112329854B
Authority
CN
China
Prior art keywords
advertisement material
page
pictures
picture
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011224851.6A
Other languages
Chinese (zh)
Other versions
CN112329854A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

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

Description

Method and device for checking picture cutting of advertisement material
Technical Field
The application relates to the field of image processing, in particular to a method and a device for checking picture cutting of advertisement materials.
Background
With the rapid development of internet technology, the rise of mobile applications under the climax of the mobile internet is a trend, and the rapid updating of application programs is brought about by increasingly rapid demand iteration.
After each update of the application program, various tests need to be performed on the updated mobile application. For example, an advertisement material area for displaying advertisement cards in an application program needs to be tested, however, the inventor discovers that when the advertisement material area is tested, a developer or a tester needs to throw in, examine and preview different advertisement cards when testing the advertisement material area, the number of advertisement creatives needed in the test is relatively large, a plurality of advertisement creatives of different types are needed, different advertisement types need to be thrown in different advertisement throwing systems, and after the advertisement engines are built, the advertisement engines generate indexes for a certain time, and then can be issued, the link and the time for creating advertisement data are very long, and the test efficiency is very low.
Disclosure of Invention
In view of this, a method, an apparatus, a computer device and a computer readable storage medium for verifying the cutting of advertisement material pictures are now provided to solve the problem of low testing efficiency when testing advertisement material areas in the prior art.
The application provides an advertising material picture clipping and checking method, which comprises the following steps:
when an application program enters a page to be tested, acquiring page display data corresponding to the page to be tested from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises advertisement material pictures, and the advertisement material pictures are displayed in the advertisement material area;
Displaying the page to be tested according to the page display data;
performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures;
and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut or not according to a comparison result.
Optionally, the acquiring, 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 modifying the page data into the page presentation 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 advertising material pictures according to the mock rules;
and modifying the material pictures to be replaced in the page data into the advertisement material pictures.
Optionally, the advertisement material picture is a picture after dotting, comparing the advertisement material screenshot picture with the advertisement material picture, and determining whether the advertisement material picture is cut according to a comparison result includes:
Identifying the advertisement material screenshot pictures by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot pictures;
and checking the dotting characters with preset dotting characters, and judging whether the advertisement material pictures are cut or not according to the checking result.
Optionally, the identifying the advertisement material screenshot picture by using a preset character identification model, and obtaining the dotting character in the advertisement material screenshot picture includes:
preprocessing the advertisement material screenshot pictures;
and identifying the preprocessed advertisement material screenshot pictures by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot pictures.
Optionally, the method for checking the cutting of the advertisement material picture further comprises the following steps:
and controlling the application program to enter the page to be tested by adopting a UI automation technology.
Optionally, the method for checking the cutting of the advertisement material picture further comprises the following steps:
and generating a verification report according to the verification result.
The application also provides an advertising material picture tailors verifying attachment, include:
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, wherein the page to be tested comprises an advertisement material area, the page display data comprises advertisement material pictures, and the advertisement material pictures are 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 performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures;
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 or not according to a comparison result.
The application also 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 executed by a processor performs the steps of the above method.
The beneficial effects of the 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 advertisement material pictures, and the advertisement material pictures are displayed in the advertisement material area; displaying the page to be tested according to the page display data; performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures; and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut or not according to a comparison result. In the embodiment of the application, the mock server is used for simulating the advertisement materials in the page to be tested of the application program, so that the advertisement is not required to be created and checked at the delivery end, the advertisement materials can be issued without waiting for the advertisement engine to generate the index, the time spent on creating the link of the advertisement data can be saved, and the test efficiency of whether the advertisement materials are cut or not is improved. Meanwhile, in the embodiment of the application, the advertisement materials are automatically identified through the character identification model, and the advertisement materials do not need to be identified in a manual mode, so that the labor consumption is reduced, the testing cost is reduced, and the testing efficiency is further improved.
Drawings
FIG. 1 is an environmental operation diagram of an advertisement material picture cropping verification method according to an embodiment of the present application;
FIG. 2 is a flow chart of one embodiment of a method for cropping and verifying an advertisement material picture as described herein;
FIG. 3 is a schematic diagram of a page to be tested in an embodiment of the present application;
fig. 4 is a detailed flowchart of a step of acquiring page display data corresponding to the page to be tested from a mock server according to an embodiment of the present application;
FIG. 5 is a detailed flowchart of the step of modifying the page data into the page display data according to the mock rule in one embodiment of the present application;
FIG. 6 is a detailed flowchart of steps for 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 diagram of a screenshot of advertising material according to an embodiment of the present application;
FIG. 8 is a detailed flowchart of steps for identifying the advertisement material screenshot pictures by using a preset character identification model to obtain dotting characters in the advertisement material screenshot pictures according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a verification report in an embodiment of the present application;
FIG. 10 is a block diagram illustrating an embodiment of an apparatus for verifying cropping of advertising material according to the present application;
fig. 11 is a schematic hardware structure diagram of a computer device for executing the method for checking the cutting of the advertisement material pictures according to the embodiment of the present application.
Detailed Description
Advantages of the present application are further described below in conjunction with the drawings and detailed description.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying 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 or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these 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 "at … …" or "responsive 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 are only used for convenience in describing the present application and distinguishing each step, and thus should not be construed as limiting the present application.
Fig. 1 schematically shows a frame diagram of an advertising material picture cropping verification method according to an embodiment of the application. In an exemplary embodiment, the system of the application environment may include a user terminal 10, a mock server 20. The user terminal 10 and the mock server 20 form a wireless or wired connection, and an Application (APP) is installed in the user terminal 10. The user terminal 10 may be a cell phone, an iPAD, a tablet computer, etc. The mock server 20 is used for simulating advertisement materials in a page to be tested of an application program, and sending the page to be tested with the advertisement materials to the application program so as to display the page to be tested.
Fig. 2 is a flow chart of an advertisement material picture cropping verification method according to an embodiment of the present application. It will be appreciated that the flow charts in the method embodiments are not intended to limit the order in which the steps are performed. As can be seen from the following description with the computer device as the execution body, the method for clipping and checking the advertisement material picture provided in the present embodiment includes:
step S20, 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 advertisement material pictures, and the advertisement material pictures are displayed in the advertisement material area.
Specifically, the application may be various kinds 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 to-be-tested page is a page for testing whether the advertisement materials in the advertisement material area are cut or not. For example, assuming that the application is a video-type application (bilibili) shown in fig. 3, the page to be tested may be a live page, a recommended page, a hot page, a chase page, a movie page, etc. of the beep. In this embodiment, a live page, a recommended page, a popular page, a toppage, a video page, and the like generally have advertisement material areas for delivering advertisement materials, where the advertisement material areas can display different types of advertisement materials according to different sizes of areas corresponding to page controls included in a page to be tested.
The mock server is a script tool for quickly constructing a data server for a development environment, the starting server only needs one pre-configured JSON template file, and the mock server can simulate the server to respond to a data request. In this embodiment, the mock server may simulate and respond to a data request for obtaining page display data corresponding to the page to be tested, and send the page display data obtained 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 are page data used for displaying the page to be tested, and the page display data comprise advertisement material pictures.
In an exemplary embodiment, referring to fig. 4, the acquiring, from the mock server, page presentation data corresponding to the page to be tested includes:
and 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, page data corresponding to the page to be tested is intercepted by the mock server as a template file, so that test page data conforming to a current test scene can be obtained by data construction through the intercepted page data.
Step S41, reading the mock rule corresponding to the page to be tested.
Specifically, the mock rules corresponding to various pages to be tested are configured in advance in the mock server. Exemplary, a mock rule corresponding to a live page of the curry application is configured as rule a, a mock rule corresponding to a recommended page of the curry application is configured as mock rule B, a mock rule corresponding to a hot page of the curry application is configured as rule C, a mock rule corresponding to a chase page of the curry application is configured as rule D, a mock rule corresponding to a movie page of the curry application is configured as mock rule E, and the like.
In this embodiment, after intercepting page data corresponding to a page to be tested, a page type 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 type is read according to the type to which the page to be tested belongs, for example, if the current page to be tested is a live page, the mock rule may be read to be 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, for example, the rule is to replace a picture displayed in a control for displaying a picture in a second to-be-tested page with a preset advertisement material picture subjected to dotting processing.
In this embodiment, after acquiring the mock rule, 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 presentation data according to the mock rule:
and S50, determining the material pictures to be replaced contained in the page data according to the mock rules.
Specifically, the mock rule is predefined that a material picture that needs to be replaced in the page data is predefined, for example, the mock rule predefined that a picture displayed in a control for displaying a picture in a second one of the page data needs to be replaced with a preset advertisement material picture subjected to dotting processing, and after the mock rule is read, it may be determined that a picture displayed in the control for displaying a picture in the second one of the page data is used as a material picture to be replaced.
And step S51, determining the advertising material pictures according to the mock rule.
Specifically, the mock rule further defines that the advertisement material picture subjected to the dotting processing, which needs to be replaced, is required to be replaced in advance, for example, the mock rule defines that the advertisement material picture to be replaced is required to be replaced by the advertisement material picture a subjected to the dotting processing in advance, and after the mock rule is read, the advertisement material picture a can be determined to be the advertisement material picture subjected to the dotting processing.
And step S52, modifying the material picture to be replaced in the page data into the advertisement material picture.
Specifically, when the to-be-replaced material picture and the advertisement material picture are determined, the advertisement material picture can be replaced by the to-be-replaced material picture through a proxy tool, so that the page data is modified.
According to 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 are 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, page display data corresponding to each type of page to be tested may be stored in advance in the mock server, so when an application program enters a page to be tested, page display data matched with the type 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 time consumption for data modification and improving test efficiency.
And S21, displaying the page to be tested according to the page display data.
Specifically, after the page display data is obtained, the page display data can be rendered on a page so as to display the page to be tested.
And S22, performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures.
Specifically, 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 area is located, an identifier for marking the advertisement material picture, which is preset in the page display data, may be obtained, and then the advertisement material area corresponding to the advertisement material picture is determined according to the identifier.
In an exemplary embodiment, after the screenshot processing is performed on the advertisement material area, an advertisement material screenshot picture as shown in fig. 7 is obtained.
And S23, comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut or not according to a comparison result.
Specifically, when comparing the pictures, whether the advertisement material picture is cut or not can be determined by adopting a mode of comparing whether the sizes of the advertisement material picture and the advertisement material screenshot picture are consistent or not, and whether the advertisement material picture is cut or not can also be determined by adopting a mode of comparing whether certain characters in the advertisement material picture are the same as 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 advertisement material pictures, and the advertisement material pictures are displayed in the advertisement material area; displaying the page to be tested according to the page display data; performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures; and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut or not according to a comparison result. In the embodiment of the application, the mock server is used for simulating the advertisement materials in the page to be tested of the application program, so that the advertisement is not required to be created and checked at the delivery end, the advertisement materials can be issued without waiting for the advertisement engine to generate the index, the time spent on creating the link of the advertisement data can be saved, and the test efficiency of whether the advertisement materials are cut or not is improved. Meanwhile, in the embodiment of the application, the advertisement materials are automatically identified through the character identification model, and the advertisement materials do not need to be identified in a manual mode, so that the labor consumption is reduced, the testing cost is reduced, and the testing efficiency is further improved.
As an example, when the advertisement material picture is a picture after the dotting process, referring to fig. 6, the comparing the advertisement material screenshot picture with the advertisement material picture, and determining whether the advertisement material picture is cropped according to the comparison result includes:
and step S60, recognizing the advertisement material screenshot pictures by adopting a preset character recognition model to obtain dotting characters in the advertisement material screenshot pictures.
In this embodiment, the dotting process adds dotting characters to two vertex regions of at least one diagonal in the advertising material. In one embodiment, when the dotting process is performed, dotting characters may be added to two vertex areas of one diagonal line in the advertisement material, dotting characters may be added to four vertex areas of two diagonal lines in the advertisement material, or dotting characters may be added to two vertex areas of one diagonal line in the advertisement material and one vertex area of the other diagonal line.
Note that, in this embodiment, the dotting characters may be letters, numbers, letters, and the like, for example, as shown in fig. 7, the dotting characters are respectively a character "LU" located in an upper left corner region, a character "RU" located in an upper right corner region, a character "LD" located in a lower left corner region, and a character "RD" located in a lower right corner region of the advertisement material picture.
It will be appreciated that, for subsequent identification of the ad material picture that has been subjected to the dotting process, the ad material picture that has not been subjected to the dotting process is preferably a picture without a background image, such as a gray scale picture.
The character recognition model is a model for recognizing characters contained in the picture from the picture, and the character recognition model can be obtained by training a sample picture by using a deep learning technology, or can be an existing character recognition model, which is not limited in this embodiment.
In this embodiment, after the character recognition model recognizes the advertisement material screenshot picture, a txt file containing the recognized dotting characters may be output.
In an exemplary embodiment, referring to fig. 8, in order to improve the success rate of the character recognition model in recognizing the advertisement material screenshot picture, in this embodiment, the recognizing the advertisement material screenshot picture by using a preset character recognition model, to obtain the dotting character in the advertisement material screenshot picture includes:
and step S80, preprocessing the advertisement material screenshot pictures.
Step S81, a preset character recognition model is adopted to recognize the preprocessed advertisement material screenshot pictures, and dotting characters in the advertisement material screenshot pictures are obtained.
Specifically, the preprocessing includes processing operations of performing picture size conversion and adjustment of brightness, contrast, saturation and the like of the advertisement material screenshot picture so as to highlight the definition and the identifiability of dotting characters contained in the advertisement material screenshot picture.
In the embodiment of the application, the advertisement material screenshot pictures are preprocessed, so that the success rate of the character recognition model on the dotting character recognition in the advertisement material screenshot pictures can be improved.
In an embodiment, in order to further improve the success rate of recognizing the dotting characters by the character recognition model, when the advertisement material picture is subjected to dotting processing, the dotting characters with different sizes can be dotted on the advertisement material picture according to different screen doubling types and partial Zhuo Gao resolution screens which are matched, so that the corresponding advertisement material picture can be replaced according to the screen doubling type when page data is modified later.
And step S61, checking the dotting characters with preset dotting characters, and judging whether the advertisement material pictures are cut or not according to the checking result.
Specifically, the preset dotting characters are characters added in advance in the advertisement material pictures, namely, the characters added when the advertisement material pictures are dotted.
In this embodiment, after a dotting character is obtained through a character recognition model, the dotting character and a preset dotting character are subjected to verification processing, wherein when the recognized dotting character is identical to 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 pictures.
In the embodiment of the application, when the recognized dotting character is different from the preset dotting character, the fact that the advertisement material picture in the page to be tested is cut when the page to be tested is displayed is indicated, so that the dotting character in the advertisement material picture is lost is caused. 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 character is the same as the preset dotting character or not.
In an exemplary embodiment, in order to reduce the manpower consumption for the verification test for cutting out the advertisement material pictures, 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 of manually clicking the application program by the user to perform the page to be tested is realized through the UI automation technology, so that a manual clicking mode is not needed, and the manpower consumption is saved.
In an exemplary embodiment, to facilitate use in intuitively knowing the test results, in this embodiment, after the verification results are obtained, a verification report may also be generated according to the verification results.
In this embodiment, jenkins may be used to generate a verification report according to the verification result, where jenkins is an open source software project, and is a continuous integration tool developed based on Java, and is used to monitor continuous repeated work, so as to provide an open and easy-to-use software platform, and enable continuous integration of software.
In an exemplary embodiment, the generated verification report is shown in FIG. 9.
Referring to fig. 10, a block diagram of a process of an embodiment of the apparatus 90 for verifying the cropping of advertising material is shown.
In this embodiment, the apparatus 90 for verifying the cutting of advertisement material pictures includes a series of computer program instructions stored in a memory, and when the computer program instructions are executed by a processor, the function of verifying the cutting of advertisement material pictures in each embodiment of the present application can be implemented. In some embodiments, the advertising material picture cropping verification device 90 may be divided into one or more modules based on the particular operations implemented by the portions of the computer program instructions. For example, in fig. 10, the apparatus 90 for verifying the cropping of advertisement material picture 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 a 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 area, the page display data includes advertisement material pictures, and the advertisement material pictures are displayed in the advertisement material area.
And the display module 92 is configured to display the page to be tested according to the page display data.
And the screenshot module 93 is used for performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures.
And the judging module 94 is used for comparing the advertisement material screenshot picture with the advertisement material picture and judging whether the advertisement material picture is cut or not according to the comparison result.
In an exemplary embodiment, the obtaining module 91 is further configured to intercept, by using 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 a to-be-replaced material picture included in the page data according to the mock rule; determining the advertising material pictures according to the mock rules; and modifying the material pictures to be replaced in the page data into the advertisement material pictures.
In an exemplary embodiment, the determining module 94 is further configured to identify the advertisement material screenshot picture by using a preset character identification model, so as to obtain a dotting character in the advertisement material screenshot picture; checking the dotting character with a preset dotting character, and judging whether the advertisement material picture is cut or not according to a checking result
In an exemplary embodiment, the determining module 94 is further configured to pre-process the advertisement material screenshot picture; and identifying the preprocessed advertisement material screenshot pictures by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot pictures.
In an exemplary embodiment, the advertising material picture cropping verification device 90 further includes 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 advertising material picture cropping verification apparatus 90 further includes a generation module.
And the generation module is used for generating a verification report according to the verification result.
In an exemplary embodiment, in the dotting process on the advertisement material, dotting characters are added to two vertex areas 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 advertisement material pictures, and the advertisement material pictures are displayed in the advertisement material area; displaying the page to be tested according to the page display data; performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures; and comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut or not according to a comparison result. In the embodiment of the application, the mock server is used for simulating the advertisement materials in the page to be tested of the application program, so that the advertisement is not required to be created and checked at the delivery end, the advertisement materials can be issued without waiting for the advertisement engine to generate the index, the time spent on creating the link of the advertisement data can be saved, and the test efficiency of whether the advertisement materials are cut or not is improved. Meanwhile, in the embodiment of the application, the advertisement materials are automatically identified through the character identification model, and the advertisement materials do not need to be identified in a manual mode, so that the labor consumption is reduced, the testing cost is reduced, and the testing efficiency is further improved.
Fig. 11 schematically illustrates a hardware architecture diagram of a computer device 10 adapted to implement the method for clipping verification of advertising material pictures according to an embodiment of the 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 instructions set or stored in advance. For example, the server may be a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack server (including a stand-alone server or a server cluster formed by a plurality of servers), etc. As shown in fig. 11, the computer device 10 includes at least, but is not limited to: memory 120, processor 121, and network interface 123 may be communicatively linked to each other by a system bus. Wherein:
memory 120 includes at least one type of computer-readable storage medium that may be volatile or nonvolatile, and specifically, readable storage media include flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 120 may be an internal storage module of the computer device 10, such as a hard disk or 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 Card (Flash Card) or the like, which are provided on the computer device 10. Of course, the memory 120 may also include both internal memory modules of the computer device 10 and external memory devices. In this embodiment, the memory 120 is generally used to store an operating system installed in the computer device 10 and various application software, such as program codes of an 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.
The processor 121 may be a central processing unit (Central Processing Unit, simply CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 121 is typically used 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, and the like. In this embodiment, the processor 121 is configured to execute program codes or process data stored in the memory 120.
The network interface 123 may include a wireless network interface or a wired network interface, the network interface 123 typically being used to establish a communication link between the 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 through 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 for mobile communications (Global System of Mobile communication, abbreviated as GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated as WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that FIG. 11 only shows a computer device having components 120-122, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
In this embodiment, the method for checking the cropping of the advertisement material picture stored in the memory 120 may be divided into one or more program modules and executed by one or more processors (the processor 121 in this embodiment) to complete the present application.
The embodiment of the application provides a computer readable storage medium, and the computer readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the method for checking the cutting of the advertising material picture in the embodiment are realized.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card 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 a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. that are provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer readable storage medium is generally used to store an operating system installed in a computer device and various application software, such as program codes of the method for checking the cropping of an advertisement material picture in the embodiment. Furthermore, 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 apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over at least two network elements. Some or all modules in the system can be screened out according to actual needs to achieve the purpose of the embodiment of the application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, or may be implemented by hardware. Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program may include processes implementing 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 (RandomAccessMemory, RAM), or the like.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution 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 scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (9)

1. The method for checking the cutting of the advertising material picture is characterized by comprising the following steps:
when an application program enters a page to be tested, acquiring page display data corresponding to the page to be tested from a mock server, wherein the page to be tested comprises an advertisement material area, the page display data comprises advertisement material pictures, and the advertisement material pictures are displayed in the advertisement material area;
displaying the page to be tested according to the page display data;
performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures, wherein an identifier for marking the advertisement material pictures, which is preset in the page display data, is obtained, and the advertisement material area corresponding to the advertisement material pictures is determined according to the identifier;
Comparing the advertisement material screenshot picture with the advertisement material picture, and judging whether the advertisement material picture is cut or not according to a comparison result;
the step of 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 comprises the following steps:
identifying the advertisement material screenshot pictures by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot pictures;
and checking the dotting characters with preset dotting characters, and judging whether the advertisement material pictures are cut or not according to the checking result.
2. The method for clipping and checking an advertisement material picture according to claim 1, wherein the obtaining page presentation data corresponding to the page to be tested from a mock server 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.
3. The method according to claim 2, wherein modifying the page data into the page presentation 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 advertising material pictures according to the mock rules;
and modifying the material pictures to be replaced in the page data into the advertisement material pictures.
4. The method for clipping and verifying the advertisement material picture according to claim 1, wherein the step of identifying the advertisement material screenshot picture by using a preset character identification model to obtain the dotting character in the advertisement material screenshot picture comprises the steps of:
preprocessing the advertisement material screenshot pictures;
and identifying the preprocessed advertisement material screenshot pictures by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot pictures.
5. The method of claim 1, further comprising:
and controlling the application program to enter the page to be tested by adopting a UI automation technology.
6. The advertising material picture cropping verification method as claimed in any one of claims 1 to 5, further comprising:
and generating a verification report according to the verification result.
7. An advertising material picture cropping and checking device is characterized by comprising:
the acquisition module is used for acquiring the page to be tested from the mock server when the application program enters the page to be tested
The method comprises the steps of facing corresponding page display data, wherein the page to be tested comprises an advertisement material area, the page display data comprises advertisement material pictures, and the advertisement material pictures are 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 performing screenshot processing on the advertisement material area in the page to be tested to obtain advertisement material screenshot pictures, wherein identifiers which are preset in the page display data and used for marking the advertisement material pictures are obtained, and the advertisement material areas corresponding to the advertisement material pictures are determined according to the identifiers;
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 or not according to a comparison result;
The judging module is further used for identifying the advertisement material screenshot pictures by adopting a preset character identification model to obtain dotting characters in the advertisement material screenshot pictures; and checking the dotting characters with preset dotting characters, and judging whether the advertisement material pictures are cut or not according to the checking result.
8. 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 method for crop verification of advertising material pictures of any one of claims 1 to 6 when the computer program is executed.
9. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program when executed by a processor implements the steps of the method for cropping and verifying an advertising material picture as claimed in any one of claims 1 to 6.
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 CN112329854A (en) 2021-02-05
CN112329854B true 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
CN112329854A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN109165162B (en) Test method and related equipment for vehicle-mounted system
CN111061526B (en) Automatic test method, device, computer equipment and storage medium
CN111198815B (en) Compatibility testing method and device for user interface
CN110765015B (en) Method for testing tested application and electronic equipment
CN113704110A (en) Automatic testing method and device for user interface
CN109726110B (en) Document testing method, device, apparatus and computer readable storage medium
CN112423135B (en) Information processing method, apparatus, computer device and storage medium for video playback
CN112381092A (en) Tracking method, device and computer readable storage medium
CN111552603A (en) Mobile payment machine tool testing method and testing system
CN111966600B (en) Webpage testing method, webpage testing device, computer equipment and computer readable storage medium
CN112329854B (en) Method and device for checking picture cutting of advertisement material
CN111401465A (en) Training sample optimization method, device, equipment and storage medium
CN111145143A (en) Problem image determination method and device, electronic equipment and storage medium
CN108021353B (en) Device, method, equipment and storage medium for generating description document of software product
CN115687146A (en) BIOS (basic input output System) test method and device, computer equipment and storage medium
CN115860827A (en) Mobile terminal advertisement testing method and system
CN114663975A (en) Model training method and device, electronic equipment and storage medium
CN112819885A (en) Animal identification method, device and equipment based on deep learning and storage medium
CN106775701B (en) Client automatic evidence obtaining method and system
CN112306838A (en) Page layout compatibility testing method, device and equipment and readable storage medium
CN110674119A (en) Data processing method, system and computer readable storage medium
CN113886745B (en) Page picture testing method and device and electronic equipment
CN110661678B (en) Abnormity monitoring method and device
CN113407455B (en) Automatic evaluation method and device for intelligent white electric products
CN113742553B (en) Data processing 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