CN112203150B - Time-consuming acquisition method, device, equipment and computer-readable storage medium - Google Patents

Time-consuming acquisition method, device, equipment and computer-readable storage medium Download PDF

Info

Publication number
CN112203150B
CN112203150B CN202011062303.8A CN202011062303A CN112203150B CN 112203150 B CN112203150 B CN 112203150B CN 202011062303 A CN202011062303 A CN 202011062303A CN 112203150 B CN112203150 B CN 112203150B
Authority
CN
China
Prior art keywords
frame
image
page
target
similarity
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
CN202011062303.8A
Other languages
Chinese (zh)
Other versions
CN112203150A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011062303.8A priority Critical patent/CN112203150B/en
Publication of CN112203150A publication Critical patent/CN112203150A/en
Application granted granted Critical
Publication of CN112203150B publication Critical patent/CN112203150B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4781Games
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00127Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture
    • H04N1/00204Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a digital computer or a digital computer system, e.g. an internet server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/387Composing, repositioning or otherwise geometrically modifying originals
    • H04N1/3877Image rotation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits
    • H04N1/409Edge or detail enhancement; Noise or error suppression

Abstract

The embodiment of the application provides a time-consuming acquisition method, a time-consuming acquisition device, time-consuming acquisition equipment and a computer-readable storage medium; the method comprises the following steps: acquiring a page jump video, wherein the page jump video is page change information recorded when a target page displayed on target equipment receives target operation; performing frame extraction on the page jump video to obtain a frame image sequence; sequentially acquiring the similarity between two adjacent frame images in the frame image sequence; when the similarity is smaller than the preset similarity, determining a frame corresponding to a previous frame image in the two adjacent frame images as a skip ending frame; and determining the time consumed by page jump corresponding to the target page according to the frame difference between the first frame and the jump ending frame of the page jump video. By the method and the device, the time-consuming accuracy of the obtained page jump can be improved.

Description

Time-consuming acquisition method, device, equipment and computer-readable storage medium
Technical Field
The present application relates to testing technologies in the field of computer applications, and in particular, to a time-consuming acquisition method, apparatus, device, and computer-readable storage medium.
Background
With the rapid development of various applications, the running efficiency of the applications becomes more and more important, and the main factor influencing the running efficiency of the applications is the time consumed by page jump; therefore, the time-consuming acquisition of page jumps is an important part of application testing.
Generally, in order to obtain the time consumed by page jump, a table-clamping mode is usually adopted to record the time of page receiving operation and the time of page jump completion, and then the time difference between the time of page receiving operation and the time of page jump completion is taken as the time consumed by page jump. However, the process of acquiring the page jump time is realized by manually nipping the table; thus, the obtained page jump is time-consuming and has low accuracy.
Disclosure of Invention
The embodiment of the application provides a time-consuming obtaining method, a time-consuming obtaining device and a computer-readable storage medium, and the time-consuming obtaining accuracy of page jumping can be improved.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a time-consuming acquisition method, which comprises the following steps:
acquiring a page jump video, wherein the page jump video is page change information recorded when a target page displayed on target equipment receives target operation;
performing frame extraction on the page jump video to obtain a frame image sequence;
sequentially acquiring the similarity between two adjacent frames of images in the frame image sequence;
when the similarity is smaller than a preset similarity, determining that a frame corresponding to a previous frame image in the two adjacent frame images is a skip ending frame;
and determining the time consumed by page jump corresponding to the target page according to the frame difference between the first frame and the jump ending frame of the page jump video.
An embodiment of the present application provides a time-consuming acquisition apparatus, including:
the video acquisition module is used for acquiring a page jump video, wherein the page jump video is page change information recorded when a target page displayed on target equipment receives target operation;
the video frame extracting module is used for extracting frames of the page jump video to obtain a frame image sequence;
the similarity acquisition module is used for sequentially acquiring the similarity between two adjacent frames of images in the frame image sequence;
an end frame determining module, configured to determine, when the similarity is smaller than a preset similarity, a frame corresponding to a previous frame image of the two adjacent frame images as a skip end frame;
and the time-consuming acquisition module is used for determining the page jump time consumption corresponding to the target page according to the frame difference between the first frame and the jump ending frame of the page jump video.
In this embodiment of the application, the similarity obtaining module is further configured to respectively pre-process the two adjacent frames of images in the sequentially obtained frame image sequence to obtain two images to be compared; carrying out difference processing on the two images to be compared to obtain a difference image; and determining the similarity based on the counted number of preset difference pixel points in the difference image.
In this embodiment of the application, the similarity obtaining module is further configured to obtain operation position information, where the operation position information is position information of the target page acted by the target operation; respectively carrying out region interception on the two images to be compared based on the operation position information and preset region information to obtain two target images; carrying out difference processing on the two target images to obtain initial similarity;
in this embodiment of the application, the similarity obtaining module is further configured to perform difference processing on the two images to be compared when the initial similarity is greater than or equal to the preset similarity, so as to obtain the difference image.
In this embodiment of the application, the time-consuming acquiring device further includes a gradient acquiring module, configured to acquire a similarity gradient corresponding to the two adjacent frames of images when the similarity is greater than or equal to the preset similarity; and when the similarity gradient is larger than a preset gradient threshold value, determining that a frame corresponding to the previous frame image in the two adjacent frame images is the skip ending frame.
In this embodiment of the application, the similarity obtaining module is further configured to determine the initial similarity as the similarity.
In the embodiment of the present application, the video frame extracting module is further configured to extract frames from the page jump video to obtain an initial frame image sequence; performing graying processing on each initial frame image in the initial frame image sequence to obtain a gray frame image; carrying out binarization processing on the gray frame image to obtain a binary frame image; performing edge detection on the binary frame image to obtain an edge frame image; and zooming the edge frame image by using a preset image size to obtain a frame image corresponding to each initial frame image, so as to obtain the frame image sequence corresponding to the initial frame image sequence.
In the embodiment of the application, the video acquisition module is further configured to send an operation instruction corresponding to the target operation to the target device and generate a video acquisition instruction when the control device executes the target test case; when the target equipment executes an operation instruction corresponding to the target operation on the target page, the control device responds to the video acquisition instruction, controls the image acquisition device, and acquires page change information displayed on the target equipment and borne by a support base to obtain the page jump video; the control device establishes communication connection with the target equipment and the image acquisition device respectively.
In the embodiment of the application, the video acquisition module is further configured to acquire an acquisition area image corresponding to the image acquisition device; and acquiring image correction information of the acquisition area image.
In this embodiment of the application, the video acquisition module is further configured to control the image acquisition device according to the image correction information, acquire page change information displayed on the target device and borne by the support base, and obtain the page jump video.
In the embodiment of the application, the bracket base is connected with the image acquisition device through a bracket, and the acquisition area of the image acquisition device corresponds to the bearing area of the bracket base.
In an embodiment of the application, the stent comprises a first sub-stent and a second sub-stent; one end of the first sub-support is used for being connected with the support base, one end of the second sub-support is used for being connected with the image acquisition device, and the first sub-support and the second sub-support move on the other support through a buckle so as to adjust the acquisition area of the image acquisition device.
In this embodiment of the application, the video obtaining module is further configured to start a screen recording application when an operation instruction corresponding to the target operation is executed on the target page; and recording the page change information displayed on the target equipment by utilizing the started screen recording application to obtain the page jump video.
An embodiment of the present application provides a time-consuming obtaining device, including:
a memory for storing executable instructions;
the control device is used for implementing the time-consuming acquisition method provided by the embodiment of the application when the executable instructions stored in the memory are executed.
An embodiment of the present application provides a computer-readable storage medium, which stores executable instructions for causing a control device to execute the method for acquiring time consumption provided by the embodiment of the present application.
The embodiment of the application has at least the following beneficial effects: by recording page change information generated when a target page receives a target operation, accurate recording of a page jump process is realized; then, sequentially judging the similarity between two adjacent frames of images in the recorded page jump video to determine a frame (jump ending frame) corresponding to the end of the jump; and determining the frame difference between the first frame of the page jump video and the frame corresponding to the end of the jump as the page jump time consumption, thereby realizing a process of accurately determining the page jump time consumption, and improving the accuracy of the obtained page jump time consumption.
Drawings
FIG. 1 is an alternative architectural diagram of a time-consuming acquisition system provided by embodiments of the present application;
fig. 2 is a schematic structural diagram of a terminal in fig. 1 according to an embodiment of the present disclosure;
FIG. 3 is an alternative flow diagram of a time-consuming acquisition method provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram illustrating another alternative time-consuming acquisition method provided by an embodiment of the present application;
FIG. 5 is a schematic flow chart of yet another alternative time-consuming acquisition method provided by an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating components of an exemplary time-consuming acquisition device provided by an embodiment of the present application;
FIG. 7 is a schematic diagram illustrating components of another exemplary time-consuming acquisition device provided by embodiments of the present application;
FIG. 8 is a schematic flow chart diagram illustrating yet another alternative time-consuming acquisition method provided by an embodiment of the present application;
FIG. 9 is a schematic diagram of an exemplary time-consuming process for obtaining data provided by an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating components of an exemplary time-consuming acquisition device provided by an embodiment of the present application;
FIG. 11 is a schematic diagram of an exemplary image of an acquisition region provided by an embodiment of the present application;
FIG. 12 is a schematic diagram of an exemplary corrected image of an acquisition region provided by an embodiment of the present application;
fig. 13 is a schematic diagram of an exemplary batch-recorded video provided by an embodiment of the present application;
FIG. 14 is a diagram illustrating an image of two exemplary adjacent frames of images provided by an embodiment of the present application;
FIG. 15 is a schematic diagram of another exemplary image of two adjacent frames provided by an embodiment of the present application;
fig. 16 is a schematic diagram of an exemplary difference result provided by an embodiment of the present application.
Detailed Description
In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the attached drawings, the described embodiments should not be considered as limiting the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first", "second", and the like are only used for distinguishing similar objects and do not denote a particular order or importance, but rather the terms "first", "second", and the like may be used interchangeably with the order of priority or the order in which they are expressed, where permissible, to enable embodiments of the present application described herein to be practiced otherwise than as specifically illustrated and described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
Before further detailed description of the embodiments of the present application, terms and expressions referred to in the embodiments of the present application will be described, and the terms and expressions referred to in the embodiments of the present application will be used for the following explanation.
1) Frame extraction: the method refers to a process of converting a video into a plurality of frames of images according to the frame rate of the video, that is, a process of acquiring an image sequence corresponding to the video.
2) Image similarity: the method is used for measuring the similarity degree between images, and the similarity degree and the initial similarity degree in the embodiment of the application are the image similarity degree; generally, the image similarity is represented by difference information between images, so that the greater the value corresponding to the image similarity, the more dissimilar the images are; and the smaller the value corresponding to the image similarity is, the more similar the images are.
3) And (3) image correction: the method is characterized by sequentially carrying out graying, binaryzation, edge detection, minimum circumscribed rectangle solving and angle rotation processing on an image.
Generally, in order to obtain the time consumed by page jump, a table-clamping mode is usually adopted to record the time of page receiving operation and the time of page jump completion, and then the time difference between the time of page receiving operation and the time of page jump completion is taken as the time consumed by page jump. However, the process of acquiring the page jump time is realized by manually nipping the table; therefore, the labor cost is high, the intelligence and efficiency of the time consumed by acquiring the page jump are low, and the accuracy of the time consumed by acquiring the page jump is low.
In addition, in order to obtain the time consumed by page jump, the time consumed by page jump can be obtained by recording an application log; however, in the process of acquiring the page jump, the application log is recorded to invade the application, and sometimes some operation logs of the application to be tested cannot be acquired by recording the application log (for example, when testing an application of another company, a function for recording the application log cannot be added). Therefore, the safety of the application test process is low, and the feasibility of the application test is low.
Based on this, the embodiment of the application provides a time-consuming obtaining method, a time-consuming obtaining device, a time-consuming obtaining apparatus, and a computer-readable storage medium, which can improve the intelligence and efficiency of obtaining page jump time, the accuracy of the obtained page jump time, the safety of an application test process, and the feasibility of an application test.
An exemplary application of the time-consuming acquiring device provided by the embodiment of the present application is described below, and the device provided by the embodiment of the present application may be implemented as various types of user terminals such as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, and a portable game device), and may also be implemented as a server. In the following, an exemplary application will be explained when the device is implemented as a terminal.
Referring to fig. 1, fig. 1 is an alternative architecture diagram of a time-consuming acquisition system provided in an embodiment of the present application; as shown in fig. 1, in order to support a time-consuming acquisition application, in the time-consuming acquisition system 100, a terminal 400 (time-consuming acquisition device) is connected to a terminal 500 (target device), and the terminal 500 is connected to a server 200 via a network 300; the network 300 may be a wide area network or a local area network, or a combination of both, and the server 200 provides data support for running applications to the terminal 500 through the network 300.
The terminal 400 is configured to acquire a page jump video, where the page jump video is page change information recorded when a target page displayed on the terminal 500 receives a target operation; performing frame extraction on the page jump video to obtain a frame image sequence; sequentially acquiring the similarity between two adjacent frame images in the frame image sequence; when the similarity is smaller than the preset similarity, determining a frame corresponding to a previous frame image in the two adjacent frame images as a skip ending frame; and determining the time consumed by page jump corresponding to the target page according to the frame difference between the first frame and the jump ending frame of the page jump video.
In some embodiments, the server 200 may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like. The terminal 400 and the terminal 500 may be, but are not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited in the embodiment of the present invention.
Referring to fig. 2, fig. 2 is a schematic diagram of a constituent structure of the terminal in fig. 1 according to an embodiment of the present application, where the terminal 400 shown in fig. 2 includes: at least one control device 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together by a bus system 440. It is understood that the bus system 440 is used to enable communications among the components. The bus system 440 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 440 in fig. 2.
The control device 410 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 430 includes one or more output devices 431, including one or more speakers and/or one or more visual displays, that enable the presentation of media content. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. The memory 450 optionally includes one or more storage devices physically located remote from the control apparatus 410.
The memory 450 includes either volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a Random Access Memory (RAM). The memory 450 described in embodiments herein is intended to comprise any suitable type of memory.
In some embodiments, memory 450 is capable of storing data, examples of which include programs, modules, and data structures, or a subset or superset thereof, to support various operations, as exemplified below.
An operating system 451, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
a network communication module 452 for communicating to other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: bluetooth, wireless-compatibility authentication (Wi-Fi), and Universal Serial Bus (USB), etc.;
a presentation module 453 for enabling presentation of information (e.g., user interfaces for operating peripherals and displaying content and information) via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with user interface 430;
an input processing module 454 for detecting one or more user inputs or interactions from one of the one or more input devices 432 and translating the detected inputs or interactions.
In some embodiments, the time-consuming acquiring apparatus provided in the embodiments of the present application may be implemented in software, and fig. 2 illustrates the time-consuming acquiring apparatus 455 stored in the memory 450, which may be software in the form of programs and plug-ins, and includes the following software modules: a video acquisition module 4551, a video decimation module 4552, a similarity acquisition module 4553, an end frame determination module 4554, a time-consuming acquisition module 4555 and a gradient acquisition module 4556, which are logical and thus may be arbitrarily combined or further divided according to the functions implemented.
The functions of the respective modules will be explained below.
In other embodiments, the time-consuming acquiring apparatus provided in this embodiment may be implemented in hardware, and for example, the time-consuming acquiring apparatus provided in this embodiment may be a processor in the form of a hardware decoding processor, which is programmed to execute the time-consuming acquiring method provided in this embodiment, for example, the processor in the form of the hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
In the following, a time-consuming acquiring method provided by the embodiment of the present application will be described in conjunction with an exemplary application and implementation of a terminal provided by the embodiment of the present application.
Referring to fig. 3, fig. 3 is an alternative flowchart of a time-consuming acquiring method provided in an embodiment of the present application, and will be described with reference to the steps shown in fig. 3.
S301, acquiring a page jump video.
In the embodiment of the application, when an application running on a target device is tested and the page jump time consumption of a target page in the application running on the target device is acquired, a test case for triggering the target page to execute the jump processing is executed on the target device, or the test case for executing the jump processing through other devices is executed and a jump instruction is sent to the target device, or a user operates on the target page, so that the target device receives a target operation acting on the target page; meanwhile, when the test case for triggering the target page to execute the jump processing is recorded and executed, the page change information displayed on the target equipment is recorded, and the time-consuming acquisition equipment also obtains the page jump video.
It should be noted that the page jump video is page change information recorded when a target page displayed on the target device receives a target operation, that is, the page jump video records a response target operation, and a jump processing process is executed on the target page; here, the target operation is used to trigger the target page to execute a jump process, where the jump process refers to a process in which a difference exists between a page after the jump process and the target page, and may be a jump from the target page to another page, a process of changing information displayed on the target page, and the like, and this is not particularly limited in this embodiment of the present application.
It should also be noted that the time-consuming acquiring device may include the target device, or may be a device independent from the target device, which is not specifically limited in this embodiment of the application.
S302, frame extraction is carried out on the page jump video to obtain a frame image sequence.
It should be noted that after the time-consuming acquisition device obtains the page jump video, the page jump video records the page jump process, and the recording of the page jump video is triggered when the target page receives the target operation; therefore, the first frame of the page jump video corresponds to the jump starting time of the target page; furthermore, the time consumed by page jump of the target page can be obtained by identifying the image in the page jump video and combining the first frame of the page jump video; therefore, here, the time-consuming acquisition device converts the page jump video and frames the page jump video into a frame image sequence. It is easy to know that the frame image sequence refers to a sequence corresponding to each image constituting the page jump video, and a sequence number corresponding to each picture in the frame image sequence is used for representing a display sequence in the page jump video.
And S303, sequentially acquiring the similarity between two adjacent frame images in the frame image sequence.
It should be noted that, when the target page executes the jump processing, the information displayed on the target page changes, and when the information displayed on the page does not change any more, the end of the jump is indicated; thus, by analyzing whether or not the adjacent frame images in the frame image sequence are similar to each other, it can be determined that the jump end time is reached.
In the embodiment of the application, the time-consuming acquiring device sequentially acquires the similarity between two adjacent frames of images in the frame image sequence from the first frame of image according to the serial numbers of the images in the frame image sequence, and judges the acquired similarity to determine whether the two adjacent frames of images are similar according to the judgment result.
The similarity represents the similarity between two adjacent frames of images, and when the similarity is higher, the more dissimilar the two adjacent frames of images are; and when the similarity is smaller, the more similar the two adjacent images are. In addition, the two adjacent frames of images correspond to any two adjacent frames of the frame image sequence.
S304, when the similarity is smaller than the preset similarity, determining that a frame corresponding to a previous frame image in the two adjacent frame images is a skip ending frame.
In the embodiment of the application, a preset similarity is preset in the time-consuming acquiring device, or the time-consuming acquiring device can acquire the preset similarity, and the preset similarity is used for measuring whether images are similar or not; when the time consumption is consumed, the obtained similarity is compared with a preset similarity by the time consumption obtaining equipment so as to judge the similarity; if the similarity is determined to be smaller than the preset similarity, the similarity is compared between the two adjacent images obtained at the moment, and at the moment, the end of the jump of the target page is determined, so that the frame corresponding to the previous image in the two adjacent images can be determined to be a jump end frame; and the jump ending frame corresponds to the jump ending time of the target page.
S305, determining the time consumed by page jump corresponding to the target page according to the frame difference between the first frame and the jump ending frame of the page jump video.
It should be noted that, because the page jump video corresponds to the frame rate, the number of frames contained in each second is also determined, so that the corresponding time information between two adjacent frames can be determined; therefore, after the time-consuming acquiring device obtains the jump ending frame, the frame difference between the first frame and the jump ending frame of the page jump video is acquired, and according to the frame difference and the corresponding time information between two adjacent frames, for example, the frame difference is multiplied by the corresponding time information between two adjacent frames, so that the page jump time-consuming corresponding to the target page is determined.
It can be understood that the accurate recording of the page jump process is realized by recording the page change information generated when the target page receives the target operation; then, sequentially judging the similarity between two adjacent frames of images in the recorded page jump video to determine a frame (jump ending frame) corresponding to the end of the jump; and the frame difference between the first frame of the page jump video and the frame corresponding to the end of the jump is determined as the page jump time, so that the process of automatically and accurately determining the page jump time is realized, and the intelligence of obtaining the page jump time and the accuracy of obtaining the page jump time can be improved.
Referring to fig. 4, fig. 4 is a schematic flow chart of another alternative time-consuming acquiring method provided in the embodiment of the present application; as shown in fig. 4, in the embodiment of the present application, S303 (not shown in fig. 4) may be implemented by S3031 to S3033; that is, the time-consuming acquiring device sequentially acquires the similarity between two adjacent frame images in the frame image sequence, including S3031 to S3033, and the following steps are respectively described.
And S3031, respectively preprocessing two adjacent frame images in the sequentially obtained frame image sequence to obtain two images to be compared.
In the embodiment of the application, in order to improve the accuracy of the obtained similarity, the time-consuming acquisition device firstly preprocesses two adjacent frames of images respectively in the process of acquiring the similarity between the two adjacent frames of images so as to reduce image noise; here, the preprocessing may be gaussian blurring, that is, convolving the image with a normal distribution; other noise reduction processing modes may also be used, and this is not particularly limited in this embodiment of the present application.
Here, the two images to be compared are two images obtained by respectively preprocessing two adjacent frames of images.
And S3032, carrying out difference processing on the two images to be compared to obtain a difference image.
In the embodiment of the application, after the time-consuming acquisition equipment acquires two images to be compared, the two images to be compared are subjected to difference processing to acquire the difference between the two images to be compared; here, the result of the difference processing, i.e., the difference image, is used to characterize the difference between the two images to be compared.
And S3033, determining the similarity based on the counted number of preset difference pixel points in the difference image.
In the embodiment of the application, after the time-consuming acquiring device obtains the difference image, the value corresponding to each pixel point in the difference image represents the difference between the positions of the pixel points of the two adjacent frames of images, so that the larger the value corresponding to each pixel point in the difference image is, the larger the difference between the positions of the pixel points of the two adjacent frames of images is; here, a preset difference pixel point is used to represent that there is a difference between two adjacent frames of images at the position of the pixel point, for example, a white pixel point (corresponding to a value of 255); therefore, the time-consuming acquisition equipment counts the number of the preset difference pixel points contained in the difference image, and determines the similarity based on the counted number of the preset difference pixel points in the difference image.
Here, the time-consuming acquiring device may directly use the counted number of preset difference pixel points in the difference image as the similarity, or perform other processing based on the counted number of preset difference pixel points in the difference image to obtain the similarity, which is not specifically limited in this embodiment of the present application.
It should be noted that, in addition to the manner of obtaining the similarity between two adjacent frames of images by using the difference processing manner, other manners may also be used, for example, a neural network model is used, that is, two adjacent frames of images are input into the neural network model, so as to output the similarity between two adjacent frames of images; the embodiment of the present application is not particularly limited to this.
With continuing reference to fig. 4, in the present embodiment, S3032 is preceded by S3034-S3036; that is to say, before the time-consuming acquiring device performs difference processing on two images to be compared to obtain a difference image, the time-consuming acquiring method further includes S3034 to S3036, which will be described below.
S3034, obtaining the operation position information.
Here, the operation position information is position information on the target page on which the target operation acts. Such as position information relative to the display screen of the target device, and such as position information relative to the target object.
And S3035, respectively carrying out region interception on the two images to be compared based on the operation position information and the preset region information to obtain two target images.
In the embodiment of the application, the operation position information may be position information corresponding to a pixel point, and after the time-consuming acquisition device obtains the operation position information, target position information corresponding to the operation position information is respectively determined in the two images to be compared based on the size ratios of the target page and the two images to be compared and the position information of the target page corresponding to the operation position information; and then intercepting an area with the size of the preset area information by taking the target position information as a center, thereby obtaining two target images which correspond to the two images to be compared one by one.
And S3036, carrying out difference processing on the two target images to obtain initial similarity.
In the embodiment of the application, after the time-consuming acquisition device obtains two target images, the two target images are subjected to difference processing, and the difference result of the two obtained target images is the initial similarity.
Here, the initial similarity degree characterizes the degree of similarity between two target images, and the greater the initial similarity degree is, the less the initial similarity degree is, the more similar the two target images are.
In the embodiment of the present application, S3032 may be implemented by S30321; that is to say, the time-consuming acquiring device performs difference processing on two images to be compared to obtain a difference image, including S30321, where:
and S30321, when the initial similarity is greater than or equal to the preset similarity, carrying out difference processing on the two images to be compared to obtain a difference image.
It should be noted that after the time-consuming acquisition device obtains the initial similarity, the initial similarity is compared with the preset similarity, and if the initial similarity is greater than or equal to the preset similarity, it indicates that the two target images are not similar; the two target images are local areas corresponding to the two images to be compared, so that the dissimilarity of the two target images cannot indicate that the two images to be compared are dissimilar; at this time, the time-consuming acquisition device judges whether the two images to be compared are similar.
With reference to fig. 4, the time-consuming acquiring device may directly use the initial similarity corresponding to the two target images as the similarity between the two adjacent frames of images; that is, after S3036, that is, after the time-consuming acquisition device performs difference processing on two target images to obtain the initial similarity, the time-consuming acquisition method further includes:
s3037, determining the initial similarity as the similarity.
Based on fig. 4, it is easy to know that, in the embodiment of the present application, S303 may be implemented by S3031 to S3033, or by S3031, S3034 to S3036, S30321 and S3033, or by S3031, S3034 to S3037.
It can be understood that the time-consuming acquisition device may determine the similarity based on the whole of two adjacent frames of images (i.e., two images to be compared); similarity can also be determined based on parts (two target images) of two adjacent frames of images; and when the similarity representation based on local determination of the two adjacent frame images is not similar, the similarity can be determined based on the whole of the two adjacent frame images. In this way, the amount of calculation and the accuracy of acquiring the similarity between two adjacent frames of images can be reduced.
Referring to fig. 5, fig. 5 is a schematic flow chart of still another alternative time-consuming acquiring method provided in the embodiment of the present application; as shown in fig. 5, in the embodiment of the present application, when the similarity is the number of preset difference pixel points in the difference image obtained by statistics, S306 and S307 are further included after S303; that is to say, after the time-consuming acquiring device sequentially acquires the similarity between two adjacent frame images in the frame image sequence, the time-consuming acquiring method further includes S306 and S307, which are described below.
And S306, when the similarity is greater than or equal to the preset similarity, acquiring a similarity gradient corresponding to two adjacent frames of images.
In the embodiment of the application, when the similarity is determined based on the whole of the two adjacent frames of images, if the similarity is greater than or equal to the preset similarity, the two adjacent frames of images are not similar; the time-consuming acquisition equipment can acquire the similarity gradients corresponding to two adjacent frames of images, and eliminate the influence of small changes (such as image background changes) according to the change information of the similarity gradients.
And S307, when the similarity gradient is larger than a preset gradient threshold value, determining a frame corresponding to a previous frame image in two adjacent frame images as a skip ending frame.
It should be noted that, if the similarity gradient is greater than the preset gradient threshold, indicating that the gradient change of the two adjacent frames of images is large, it may be determined that the page changes from the two adjacent frames to the unchanged page, and thus it may be determined that the skip is finished; further, in this case, it is possible to specify that a frame corresponding to a previous frame image of two adjacent frame images is a skip end frame.
In the embodiment of the application, S302 can be realized through S3021-S3025; that is, the time-consuming acquisition device frames the page jump video to obtain a frame image sequence, including S3021 to S3025, which will be described below.
S3021, frame extraction is carried out on the page jump video, and an initial frame image sequence is obtained.
In the embodiment of the application, after the time-consuming acquisition device obtains the page jump video, the page jump video is converted into the image sequence according to the frame rate of the page jump video, and then the initial frame image sequence is obtained.
Illustratively, if the page jump video is 5 seconds long video and the frame rate is 30 frames/second, an initial frame image sequence including 150 pictures can be obtained.
And S3022, performing graying processing on each initial frame image in the initial frame image sequence to obtain a grayscale frame image.
In the embodiment of the present application, in order to obtain a feature capable of representing a form of an image, a time-consuming obtaining device performs a graying process on each initial frame image in an initial frame image sequence, and each obtained grayed initial frame image is a grayscale frame image.
It should be noted that the gray frame image can avoid visible banding distortion, and the gray frame image is convenient for calculation; in general, the graying process is a process of changing a color image having brightness and color into a grayscale image, and the graying process can be implemented by a maximum value method, a weighted average value, taking a single channel value, or the like.
And S3023, performing binarization processing on the gray frame image to obtain a binary frame image.
It should be noted that, in order to highlight the outline of each initial frame image, the time-consuming acquisition device performs binarization processing on the gray frame image, so that the gray frame image exhibits an obvious black-and-white effect; here, the binarized gray frame image is a binary frame image.
And S3024, performing edge detection on the binary frame image to obtain an edge frame image.
In the embodiment of the application, the time-consuming acquisition equipment carries out edge detection on the binary frame image so as to detect points with obvious brightness change in the binary frame image; here, the result of the edge detection is an edge frame image.
S3025, zooming the edge frame image by using the preset image size to obtain a frame image corresponding to each initial frame image, so as to obtain a frame image sequence corresponding to the initial frame image sequence.
It should be noted that the time-consuming acquiring device may directly take the edge frame image as the frame image corresponding to each initial frame image, or may zoom the edge frame image by using a preset image size to obtain the frame image corresponding to each initial frame image; here, after obtaining the frame images corresponding to all the initial frame images in the initial frame image sequence, combining the frame images corresponding to all the initial frame images according to the frame sequence in the page jump video, so as to obtain the frame image sequence corresponding to the initial frame image sequence.
It can be understood that, because the resolutions of the devices adopted when the page jump video is acquired are different, the time-consuming acquisition device scales the edge frame image according to the preset image size, so that the scaled images have the same size, and the efficiency of acquiring the similarity can be improved.
In the embodiment of the present application, S301 may be implemented by S3011 and S3012; that is, the time-consuming acquiring device acquires the page jump video, including S3011 and S3012, and the following steps are described separately.
S3011, when the target test case is executed through the control device, sending an operation instruction corresponding to target operation to the target equipment, and generating a video acquisition instruction.
It should be noted that, when the time-consuming acquiring device includes the target device, the image collecting device and the control device which are independent from the target device; when the control device executes the target test case, the control device sends an operation instruction corresponding to the target operation to the target equipment, so that the target equipment executes the operation instruction corresponding to the target operation on a target page; meanwhile, the control device can also generate a video acquisition instruction, wherein the video acquisition instruction is used for instructing the image acquisition device to acquire page change information of a display screen on the target device.
S3012, when the target device executes an operation instruction corresponding to the target operation on the target page, the control device responds to the video acquisition instruction, controls the image acquisition device, and acquires page change information displayed on the target device borne by the support base to obtain a page jump video.
It should be noted that, after the control device generates the video acquisition instruction, the control device controls the image acquisition device to record the page change information displayed on the target device borne by the support base in response to the video acquisition instruction, so as to obtain the page jump video.
Here, the duration of the recorded page jump video is a preset duration, for example, 5 seconds; in addition, the control device establishes communication connection with the target device and the image acquisition device respectively.
In the embodiment of the application, the page jump video can be obtained by the following method: when an operation instruction corresponding to a target operation is executed on a target page, a video acquisition instruction is received through a control device; and the control device responds to the video acquisition instruction, controls the image acquisition device, and acquires page change information displayed on target equipment borne by the bracket base to obtain a page jump video.
It should be noted that, when the time-consuming acquiring device includes the target device, the image collecting device and the control device which are independent from the target device; if the target device executes an operation instruction corresponding to the target operation on the target page, the target device sends a video acquisition instruction to the control device, and at the moment, the control device receives the video acquisition instruction. After the control device obtains the video acquisition instruction, the control device responds to the video acquisition instruction and controls the image acquisition device to record page change information displayed on target equipment borne by the bracket base, and then a page jump video is obtained.
It can be understood that the time-consuming acquiring device records the page jump video by controlling the image acquisition device independent of the target device, so that the recording of the video does not affect the operation of the application on the target device, the page jump video accurately records the jump process of the target page, and the page jump time-consuming can be accurately acquired based on the page jump video.
In this embodiment of the application, before the time-consuming acquiring device in S3012 controls the image acquiring device to acquire page change information displayed on the target device borne by the support base and obtain the page jump video, the time-consuming acquiring method further includes S3013 and S3014, which are described below.
And S3013, acquiring an acquisition area image corresponding to the image acquisition device.
In the embodiment of the application, when the image acquisition device is controlled to record the page jump video, in order to obtain a positive image of each frame in the page jump video, the time-consuming acquisition equipment firstly acquires an image in an acquisition area of the image acquisition device, and then acquires an image of the acquisition area.
And S3014, acquiring image correction information of the acquired area image.
It should be noted that the control device in the time-consuming acquisition device processes the acquired region image to obtain the minimum circumscribed rectangle information and the rotation angle corresponding to the acquired region image, so as to obtain the image correction information.
Correspondingly, in S3012, the time-consuming acquiring device controls the image acquiring device to acquire page change information displayed on the target device borne by the support base, and obtain a page jump video, including S30121, where:
s30121, controlling the image acquisition device according to the image correction information, and acquiring page change information displayed on the target equipment borne by the support base to obtain a page jump video.
It should be noted that after the control device in the time-consuming acquisition device obtains the image correction information, and the image correction information adjusts the recording parameter, the image acquisition device is further controlled according to the adjusted recording parameter, and page change information displayed on the target device borne by the support base is acquired, so as to obtain the page jump video.
In addition, the page jump video is recorded when the operation instruction corresponding to the target operation is executed on the target page, so that the first frame of the page jump video corresponds to the starting time of the target page jump.
It can be understood that the time-consuming acquisition equipment adjusts the recording parameters before the page jump video is recorded, so that an image convenient to process can be obtained through one-time adjustment, the video processing efficiency is improved, and the time-consuming acquisition efficiency is further improved.
In the embodiment of the application, in the time-consuming acquisition equipment, the support base is connected with the image acquisition device through the support, and the acquisition area of the image acquisition device corresponds to the bearing area of the support base.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating a composition of an exemplary time-consuming acquisition device provided in an embodiment of the present application; as shown in fig. 6, in the time-consuming acquisition device 6-1, the support base 6-11 is connected with the image acquisition device 6-13 through the support 6-12, and the acquisition area 6-131 of the image acquisition device 6-13 corresponds to the bearing area 6-111 of the support base 6-11; in addition, the time-consuming acquisition equipment 6-1 further comprises control devices 6-14, and the control devices 6-14 are respectively connected with target equipment 6-15 on the support bases 6-11 and the image acquisition devices 6-13.
In the embodiment of the application, in the time-consuming acquisition device, the support comprises a first sub-support and a second sub-support; one end of the first sub-bracket is used for connecting with the bracket base, one end of the second sub-bracket is used for connecting with the image acquisition device, and the first sub-bracket and the second sub-bracket move on the other sub-bracket through being buckled to adjust the acquisition area of the image acquisition device; the first sub-bracket and the second sub-bracket move on the other sub-bracket through a buckle, the other end of the first sub-bracket moves on the second sub-bracket through a buckle, and/or the other end of the second sub-bracket moves on the first sub-bracket through a buckle.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a composition of another exemplary time-consuming acquisition device provided in an embodiment of the present application; as shown in FIG. 7, based on FIG. 6, in the time-consuming acquisition apparatus 6-1, the holder 6-12 includes a first sub-holder 7-11 and a second sub-holder 7-12; one end 7-111 of the first sub-bracket 7-11 is used for connecting with the bracket base 7-2, one end 7-121 of the second sub-bracket 7-12 is used for connecting with the image acquisition device 6-13, the first sub-bracket 7-11 moves on the second sub-bracket 7-12 through the buckle 7-4, and the second sub-bracket 7-12 moves on the first sub-bracket 7-11 through the buckle 7-4 so as to adjust the acquisition area of the image acquisition device 6-13.
In the embodiment of the present application, S301 may be implemented by S3015 and S3016; that is, the time-consuming acquisition device acquires the page jump video, including S3015 and S3016, and the following steps are described separately.
And S3015, when the operation instruction corresponding to the target operation is executed on the target page, starting the screen recording application.
In the embodiment of the application, the time-consuming acquisition device comprises a target device, and when an operation instruction corresponding to a target operation is executed on a target page of the target device, the screen recording application is started. Here, the screen recording application is used to record information displayed on the target device, for example, screen recording software.
S3016, recording page change information displayed on the target device by using the started screen recording application, and obtaining a page jump video.
It should be noted that, since the page jump video is obtained by recording when the operation instruction corresponding to the target operation is executed on the target page, the first frame of the page jump video corresponds to the start time of the target page adjustment.
It can be understood that the obtained page jump video has no inclination angle through the jump process of recording the target page by the screen recording application, so that the angle rotation is not needed in the page jump video processing process, and the video processing efficiency is improved.
In the embodiment of the present application, referring to fig. 8, fig. 8 is a schematic flowchart of yet another alternative time-consuming obtaining method provided in the embodiment of the present application; referring to fig. 8, in the embodiment of the present application, S309 is further included after S305; that is to say, after the time-consuming acquiring device determines that the page jump time corresponding to the target page is consumed according to the frame difference between the first frame and the jump ending frame of the page jump video, the time-consuming acquiring method further includes S309, where:
s309, determining a page jump test result according to the page jump time consumption.
It should be noted that after the time-consuming acquisition device obtains the page jump time-consuming, the page jump time-consuming can be displayed; the page jump time consumption can be compared with the previously acquired page jump time consumption or preset jump time consumption, the obtained comparison result is a page jump test result, and the page jump test result can be displayed.
In the embodiment of the application, the page jump time consumption of the target page can be automatically and accurately acquired by recording the process of the jump change of the video record aiming at the one-time jump change of the target page; therefore, the time spent on jumping of each page can be efficiently obtained in batches, and accurate batch processing is realized.
Next, an exemplary application of the embodiment of the present application in a practical application scenario will be described.
Exemplarily, referring to fig. 9, fig. 9 is a schematic flowchart illustrating an exemplary time-consuming acquisition process provided by an embodiment of the present application; as shown in fig. 9, the method comprises the following steps:
and S901, recording an automatic test case.
It should be noted that, a game application is tested on a mobile phone (target device), and an automatic test case for a game page click (target operation) is recorded in order to obtain a jump time of a game page (target page).
And S902, carrying out image correction on the image of the acquisition area of the camera (image acquisition device).
It should be noted that, the mobile phone 10-1 is placed on the carrying area of the stand base 10-2 shown in fig. 10, and the computer 10-3 detects an image (a captured area image) of the captured area of the camera 10-4; as shown in fig. 11, in the image 11-1, the region 11-11 in the image 11-1 is the information that needs to be acquired most, and the region 11-1 is at an angle with the edge of the acquired region. Thus, the computer 10-3 (control device) determines the minimum bounding rectangle of the image of the capture area, i.e., the area 11-11 in fig. 11, and the rotation angle, and performs image correction based on the minimum bounding rectangle and the rotation angle, and the image of the capture area after image correction is the image 12-1 shown in fig. 12.
The hardware environment adopted by the computer is a Windows 10 operating system, a processor of Intel i 7-77003.6 GHz and a memory of 16 GB.
And S903, when the automatic test case is executed on the computer, sending an operation instruction to the mobile phone, and controlling the camera to record video of page change information generated by the mobile phone responding to the operation instruction.
It should be noted that, with continued reference to fig. 10, when the computer 10-3 executes an automated test case for a game application, the computer 10-3 sends a click instruction to the mobile phone 10-1 and generates a video recording signal (a video capture instruction), so that the computer 10-3 controls the camera 10-4 in response to the video recording signal, and records a video with a length of 5 seconds at a frame rate of 30 frames/second for page change information occurring when the mobile phone 10-1 responds to the click instruction, thereby obtaining a page jump video in the embodiment of the present application.
It should be further noted that when a plurality of automation test cases are recorded, a plurality of corresponding videos may be recorded by executing the plurality of automation test cases. Illustratively, referring to fig. 13, when 30 test cases are automatically executed, 30 videos are also recorded: expression _1.avi, expression _2.avi, expression _3.avi, expression _4.avi, expression _5.avi, expression _6.avi, weapons _1.avi, warehouse _2.avi, warehouse _3.avi, warehouse _4.avi, warehouse _5.avi, warehouse _6.avi, warehouse _7.avi, warehouse _8.avi, warehouse _9.avi, warehouse _10.avi, warehouse _11.avi, warehouse _12.avi, warehouse _13.avi, warehouse _14.avi, warehouse _15.avi, warehouse _16.avi, warehouse _17.avi, warehouse _18.avi, warehouse _19.avi, warehouse _20.avi, warehouse _21.avi, warehouse _22.avi, and warehouse _23. avi.
And S904, extracting frames from the video to obtain an initial frame image sequence.
Here, the computer performs frame extraction processing on the recorded video, and obtains a sequence of 150 images for a 5-second video with a frame rate of 30 frames/second in S903.
S905, image correction is carried out on the initial frame image sequence to obtain an image frame sequence.
It should be noted that, the computer performs the graying process, the binarization process, the edge detection process and the scaling process on each image in the initial frame image sequence in sequence, and then completes the image correction on the initial frame image sequence. One image of two adjacent images in the image frame sequence is shown as an image 14-1 in fig. 14, and the other image is shown as an image 15-1 in fig. 15.
S906, two local areas (two target images) at the corresponding click positions of two adjacent images of the image frame sequence are subjected to difference processing in sequence to obtain local similarity (initial similarity).
Firstly, the computer respectively performs gaussian fuzzy processing (preprocessing) on two adjacent frames of images according to preset parameters;
then, the computer makes difference between two rectangular areas of 200 × 200 taking the click position as the center and respectively corresponding to two adjacent frames of images to obtain an absolute value, and the obtained images are subjected to binarization processing to obtain a black-and-white binary image;
finally, the computer uses the one-dimensional vector to count the number of white pixels (preset difference pixels) in the black-and-white binary image, so as to obtain the local similarity vector, and further obtain the local similarity according to the local similarity vector.
S907, judging whether the local similarity is smaller than a similarity threshold value; if so, go to S908; if not, S909 is executed.
And S908, determining a skip ending frame.
And S909, carrying out difference processing on the two adjacent frames of images to obtain the global similarity.
Here, the process of obtaining the global similarity by performing difference processing on the two adjacent frames of images by the computer is similar to the process of obtaining the local similarity described in S906, and the description of the embodiment of the present application is omitted here.
Illustratively, the image 14-1 in fig. 14 and the image 15-1 in fig. 15 are subjected to a difference process, and the obtained difference result is shown as an image 16-1 in fig. 16.
S910, judging whether the global similarity is smaller than a similarity threshold value; if so, go to S908; if not, S911 is executed.
And S911, acquiring a similarity gradient corresponding to two adjacent frames of images.
S912, judging whether the similarity gradient is larger than a preset gradient threshold value or not; if so, go to S908; if not, S906 is performed.
S913, obtaining the time consumed by page jump according to the frame difference between the end frame and the first frame.
It can be understood that the time-consuming acquisition method provided by the embodiment of the application is automatically executed from the execution of the test case to the time-consuming acquisition, so that the manual participation is greatly reduced, the intelligence is improved, zero intrusion is realized on the application of the test, the error is about 30 milliseconds, and the precision is high; in addition, the camera is adopted to record the page jump process, so that the performance of the mobile phone is not influenced. In addition, due to the fact that time-consuming obtaining efficiency is high, the method can help a tester to quickly locate the page with problems.
Continuing with the exemplary structure of the time-consuming acquisition device 455 provided by the embodiments of the present application as software modules, in some embodiments, as shown in fig. 2, the software modules stored in the time-consuming acquisition device 455 of the memory 450 may include:
the video obtaining module 4551 is configured to obtain a page jump video, where the page jump video is page change information recorded when a target page displayed on a target device receives a target operation;
the video frame extracting module 4552 is configured to perform frame extraction on the page jump video to obtain a frame image sequence;
a similarity obtaining module 4553, configured to sequentially obtain similarities between two adjacent frame images in the frame image sequence;
an end frame determining module 4554, configured to determine, when the similarity is smaller than a preset similarity, a frame corresponding to a previous frame image in the two adjacent frame images as a skip end frame;
and the time-consuming acquiring module 4555 is configured to determine page jump time-consuming corresponding to the target page according to a frame difference between a first frame of the page jump video and the jump ending frame.
In this embodiment of the application, the similarity obtaining module 4553 is further configured to respectively perform preprocessing on the two adjacent frames of images in the frame image sequence obtained in sequence, so as to obtain two images to be compared; carrying out difference processing on the two images to be compared to obtain a difference image; and determining the similarity based on the counted number of preset difference pixel points in the difference image.
In this embodiment of the application, the similarity obtaining module 4553 is further configured to obtain operation position information, where the operation position information is position information of the target page acted by the target operation; respectively carrying out region interception on the two images to be compared based on the operation position information and preset region information to obtain two target images; carrying out difference processing on the two target images to obtain initial similarity;
in this embodiment of the application, the similarity obtaining module 4553 is further configured to perform difference processing on the two images to be compared when the initial similarity is greater than or equal to the preset similarity, so as to obtain the difference image.
In this embodiment of the application, the time-consuming acquiring device 455 further includes a gradient acquiring module 4556, configured to acquire a similarity gradient corresponding to the two adjacent frames of images when the similarity is greater than or equal to the preset similarity; and when the similarity gradient is larger than a preset gradient threshold value, determining that a frame corresponding to the previous frame image in the two adjacent frame images is the skip ending frame.
In this embodiment of the application, the similarity obtaining module 4553 is further configured to determine the initial similarity as the similarity.
In this embodiment of the present application, the video frame extracting module 4552 is further configured to perform frame extraction on the page jump video to obtain an initial frame image sequence; performing graying processing on each initial frame image in the initial frame image sequence to obtain a gray frame image; carrying out binarization processing on the gray frame image to obtain a binary frame image; performing edge detection on the binary frame image to obtain an edge frame image; and zooming the edge frame image by using a preset image size to obtain a frame image corresponding to each initial frame image, so as to obtain the frame image sequence corresponding to the initial frame image sequence.
In this embodiment of the application, the video obtaining module 4551 is further configured to send an operation instruction corresponding to the target operation to the target device and generate a video acquisition instruction when the target test case is executed by the control device; when the target equipment executes an operation instruction corresponding to the target operation on the target page, the control device responds to the video acquisition instruction, controls the image acquisition device, and acquires page change information displayed on the target equipment and borne by a support base to obtain the page jump video; the control device establishes communication connection with the target equipment and the image acquisition device respectively.
In this embodiment of the application, the video obtaining module 4551 is further configured to obtain an image of a collecting area corresponding to the image collecting apparatus; and acquiring image correction information of the acquisition area image.
In this embodiment of the application, the video obtaining module 4551 is further configured to control the image collecting device according to the image correction information, collect page change information displayed on the target device and borne by the support base, and obtain the page jump video.
In the embodiment of the application, the bracket base is connected with the image acquisition device through a bracket, and the acquisition area of the image acquisition device corresponds to the bearing area of the bracket base.
In an embodiment of the application, the stent comprises a first sub-stent and a second sub-stent; one end of the first sub-support is used for being connected with the support base, one end of the second sub-support is used for being connected with the image acquisition device, and the first sub-support and the second sub-support move on the other support through a buckle so as to adjust the acquisition area of the image acquisition device.
In this embodiment of the application, the video obtaining module 4551 is further configured to start a screen recording application when an operation instruction corresponding to the target operation is executed on the target page; and recording the page change information displayed on the target equipment by utilizing the started screen recording application to obtain the page jump video.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the time-consuming acquisition method described in the embodiment of the present application.
Embodiments of the present application provide a computer-readable storage medium storing executable instructions, which when executed by a processor, cause the processor to perform the time-consuming acquisition method provided by the embodiments of the present application, for example, the time-consuming acquisition method shown in fig. 3.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
In summary, according to the embodiment of the application, the page change information generated when the target page receives the target operation is recorded, so that the accurate recording of the page jump process is realized; then, sequentially judging the similarity between two adjacent frames of images in the recorded page jump video to determine a frame (jump ending frame) corresponding to the end of the jump; and determining the frame difference between the first frame of the page jump video and the frame corresponding to the end of the jump as the page jump time, thereby realizing a process of automatically and accurately determining the page jump time, and therefore, improving the accuracy of the obtained page jump time and obtaining the intelligence of the page jump time.
The above description is only an example of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims (13)

1.A time-consuming acquisition method, comprising:
acquiring a page jump video, wherein the page jump video is page change information recorded when a target page displayed on target equipment receives target operation;
performing frame extraction on the page jump video to obtain a frame image sequence;
sequentially acquiring similarity between two adjacent frame images in the frame image sequence, wherein the similarity represents difference information between the two adjacent frame images;
when the similarity is smaller than a preset similarity, determining that a frame corresponding to a previous frame image in the two adjacent frame images is a skip ending frame;
when the similarity is greater than or equal to the preset similarity, acquiring a similarity gradient corresponding to the two adjacent frames of images; when the similarity gradient is larger than a preset gradient threshold value, determining a frame corresponding to the previous frame image in the two adjacent frame images as the skip ending frame;
determining the page jump time consumption corresponding to the target page according to the frame difference between the first frame and the jump ending frame of the page jump video;
the acquiring of the page jump video comprises the following steps: when a target test case is executed, sending an operation instruction corresponding to the target operation to the target equipment, and generating a video acquisition instruction; when the target equipment executes an operation instruction corresponding to the target operation on the target page, responding to the video acquisition instruction, controlling an image acquisition device, acquiring page change information displayed on the target equipment and borne by a support base, and obtaining the page jump video, wherein the duration of the page jump video is preset duration.
2. The method according to claim 1, wherein the sequentially obtaining the similarity between two adjacent frame images in the frame image sequence comprises:
respectively preprocessing the two adjacent frames of images in the frame image sequence to obtain two images to be compared;
carrying out difference processing on the two images to be compared to obtain a difference image;
and determining the similarity based on the counted number of preset difference pixel points in the difference image.
3. The method according to claim 2, wherein before the difference processing is performed on the two images to be compared to obtain a difference image, the method further comprises:
acquiring operation position information, wherein the operation position information is position information of the target page acted by the target operation;
respectively carrying out region interception on the two images to be compared based on the operation position information and preset region information to obtain two target images;
carrying out difference processing on the two target images to obtain initial similarity;
the step of performing difference processing on the two images to be compared to obtain a difference image comprises the following steps:
and when the initial similarity is greater than or equal to the preset similarity, carrying out difference processing on the two images to be compared to obtain the difference image.
4. The method according to claim 3, wherein after the difference processing is performed on the two target images to obtain the initial similarity, the method further comprises:
and determining the initial similarity as the similarity.
5. The method according to any one of claims 1 to 4, wherein the step of decimating the page jump video to obtain a frame image sequence comprises:
performing frame extraction on the page jump video to obtain an initial frame image sequence;
performing graying processing on each initial frame image in the initial frame image sequence to obtain a gray frame image;
carrying out binarization processing on the gray frame image to obtain a binary frame image;
performing edge detection on the binary frame image to obtain an edge frame image;
and zooming the edge frame image by using a preset image size to obtain a frame image corresponding to each initial frame image, so as to obtain the frame image sequence corresponding to the initial frame image sequence.
6. The method of claim 1, wherein before the controlling the image capturing device to capture page change information displayed on the target device carried by a cradle base to obtain the page jump video, the method further comprises:
acquiring an acquisition area image corresponding to the image acquisition device;
acquiring image correction information of the acquisition area image;
the control image collecting device collects page change information displayed on the target equipment and borne by the support base to obtain the page jump video, and the control image collecting device comprises:
and controlling the image acquisition device according to the image correction information, acquiring page change information displayed on the target equipment borne by the bracket base, and obtaining the page jump video.
7. The method of claim 1, wherein the support base is connected to the image capture device by a support, and wherein a capture area of the image capture device corresponds to a carrying area of the support base.
8. The method of claim 7, wherein the scaffold comprises a first sub-scaffold and a second sub-scaffold;
one end of the first sub-support is used for being connected with the support base, one end of the second sub-support is used for being connected with the image acquisition device, and the first sub-support and the second sub-support move on the other support through a buckle so as to adjust the acquisition area of the image acquisition device.
9. The method of claim 1, wherein the obtaining the page jump video comprises:
starting a screen recording application when an operation instruction corresponding to the target operation is executed on the target page;
and recording the page change information displayed on the target equipment by utilizing the started screen recording application to obtain the page jump video.
10.A time-consuming acquisition device, comprising:
the video acquisition module is used for acquiring a page jump video, wherein the page jump video is page change information recorded when a target page displayed on target equipment receives target operation;
the video frame extracting module is used for extracting frames of the page jump video to obtain a frame image sequence;
the similarity obtaining module is used for sequentially obtaining the similarity between two adjacent frame images in the frame image sequence, wherein the similarity represents the difference information between the two adjacent frame images;
an end frame determining module, configured to determine, when the similarity is smaller than a preset similarity, a frame corresponding to a previous frame image of the two adjacent frame images as a skip end frame;
the time-consuming acquisition module is used for determining the page jump time consumption corresponding to the target page according to the frame difference between the first frame and the jump ending frame of the page jump video;
the end frame determining module is further configured to obtain a similarity gradient corresponding to the two adjacent frames of images when the similarity is greater than or equal to the preset similarity; when the similarity gradient is larger than a preset gradient threshold value, determining a frame corresponding to the previous frame image in the two adjacent frame images as the skip ending frame;
the video acquisition module is further configured to send an operation instruction corresponding to the target operation to the target device when executing the target test case, and generate a video acquisition instruction; when the target equipment executes an operation instruction corresponding to the target operation on the target page, responding to the video acquisition instruction, controlling an image acquisition device, acquiring page change information displayed on the target equipment and borne by a support base, and obtaining the page jump video, wherein the duration of the page jump video is preset duration.
11.A time-consuming acquisition device, comprising:
a memory for storing executable instructions;
control means for implementing the method of any one of claims 1 to 9 when executing executable instructions stored in said memory.
12. The apparatus of claim 11, further comprising: the device comprises an image acquisition device, a bracket base and a bracket for connecting the image acquisition device and the bracket base;
the support base is used for bearing target equipment, the acquisition area of the image acquisition device corresponds to the bearing area of the support base, and the control device is in communication connection with the target equipment and the image acquisition device respectively.
13.A computer-readable storage medium storing executable instructions for implementing the method of any one of claims 1 to 9 when executed by a control device.
CN202011062303.8A 2020-09-30 2020-09-30 Time-consuming acquisition method, device, equipment and computer-readable storage medium Active CN112203150B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011062303.8A CN112203150B (en) 2020-09-30 2020-09-30 Time-consuming acquisition method, device, equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011062303.8A CN112203150B (en) 2020-09-30 2020-09-30 Time-consuming acquisition method, device, equipment and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN112203150A CN112203150A (en) 2021-01-08
CN112203150B true CN112203150B (en) 2022-03-11

Family

ID=74013869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011062303.8A Active CN112203150B (en) 2020-09-30 2020-09-30 Time-consuming acquisition method, device, equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN112203150B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778825A (en) * 2021-08-24 2021-12-10 北京达佳互联信息技术有限公司 Method and device for determining page index parameters, storage medium and electronic equipment
CN114827754B (en) * 2022-02-23 2023-09-12 阿里巴巴(中国)有限公司 Video first frame time detection method and device
CN115695851B (en) * 2022-12-28 2023-03-28 海马云(天津)信息技术有限公司 End-to-end delay calculation method and device, storage medium and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569946A (en) * 2016-10-31 2017-04-19 惠州Tcl移动通信有限公司 Mobile terminal performance testing method and system
CN107678895A (en) * 2017-09-11 2018-02-09 上海斐讯数据通信技术有限公司 A kind of method of testing and system of intelligent terminal page jump time
CN110688602A (en) * 2019-09-25 2020-01-14 杭州安恒信息技术股份有限公司 Method, device and system for testing webpage loading speed
CN110992299A (en) * 2018-09-28 2020-04-10 华为终端有限公司 Method and device for detecting browser compatibility
CN111091146A (en) * 2019-12-10 2020-05-01 广州品唯软件有限公司 Image similarity obtaining method and device, computer equipment and storage medium
CN111338954A (en) * 2020-02-26 2020-06-26 平安银行股份有限公司 Test report generation method and equipment
CN111338934A (en) * 2020-02-13 2020-06-26 北京字节跳动网络技术有限公司 Page refreshing test method and device, computer equipment and storage medium
CN111506488A (en) * 2019-01-30 2020-08-07 阿里巴巴集团控股有限公司 Application page response test method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2914170B2 (en) * 1994-04-18 1999-06-28 松下電器産業株式会社 Image change point detection method
CN102929782A (en) * 2012-11-14 2013-02-13 北京奇虎科技有限公司 Device and method for testing software performances
CN103777980B (en) * 2014-01-08 2016-08-31 北京奇虎科技有限公司 A kind of method loading website comment information and browser
CN107562610B (en) * 2017-09-21 2021-04-27 北京字节跳动网络技术有限公司 Method, device, terminal and medium for acquiring page loading time
CN108900776B (en) * 2018-08-22 2020-11-27 北京百度网讯科技有限公司 Method and apparatus for determining response time
CN110825456B (en) * 2019-11-01 2024-01-23 北京博睿宏远数据科技股份有限公司 Loading time calculation method, loading time calculation device, computer equipment and storage medium
CN111209215B (en) * 2020-02-24 2021-08-24 腾讯科技(深圳)有限公司 Application program testing method and device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569946A (en) * 2016-10-31 2017-04-19 惠州Tcl移动通信有限公司 Mobile terminal performance testing method and system
CN107678895A (en) * 2017-09-11 2018-02-09 上海斐讯数据通信技术有限公司 A kind of method of testing and system of intelligent terminal page jump time
CN110992299A (en) * 2018-09-28 2020-04-10 华为终端有限公司 Method and device for detecting browser compatibility
CN111506488A (en) * 2019-01-30 2020-08-07 阿里巴巴集团控股有限公司 Application page response test method and device
CN110688602A (en) * 2019-09-25 2020-01-14 杭州安恒信息技术股份有限公司 Method, device and system for testing webpage loading speed
CN111091146A (en) * 2019-12-10 2020-05-01 广州品唯软件有限公司 Image similarity obtaining method and device, computer equipment and storage medium
CN111338934A (en) * 2020-02-13 2020-06-26 北京字节跳动网络技术有限公司 Page refreshing test method and device, computer equipment and storage medium
CN111338954A (en) * 2020-02-26 2020-06-26 平安银行股份有限公司 Test report generation method and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WebGIS系统中决定用户响应速度的因素;陈小平;《计算机仿真》;20030930;全文 *

Also Published As

Publication number Publication date
CN112203150A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN112203150B (en) Time-consuming acquisition method, device, equipment and computer-readable storage medium
CN110059468B (en) Applet risk identification method and device
CN109344044B (en) Method and system for calculating rendering time of first screen of page
CN113126937B (en) Display terminal adjusting method and display terminal
CN109684008B (en) Card rendering method, device, terminal and computer readable storage medium
CN109726110B (en) Document testing method, device, apparatus and computer readable storage medium
CN109492163B (en) List display recording method and device, terminal equipment and storage medium
WO2022011905A1 (en) Notification information pushing method, smart terminal, and storage medium
CN108289176B (en) Photographing question searching method, question searching device and terminal equipment
CN112559309A (en) Method and device for adjusting page performance acquisition algorithm
CN112419257A (en) Method and device for detecting definition of text recorded video, computer equipment and storage medium
CN112465497A (en) Payment method, payment device, electronic equipment and medium
CN109871465B (en) Time axis calculation method and device, electronic equipment and storage medium
US20170171462A1 (en) Image Collection Method, Information Push Method and Electronic Device, and Mobile Phone
CN111767098A (en) Method and device for adjusting font size
CN113468066A (en) User interface testing method and device
CN114422777A (en) Image recognition-based time delay testing method and device and storage medium
CN110730342B (en) Video quality analysis method and device, server and terminal
CN114116418A (en) Information processing method and device, computer storage medium and electronic equipment
CN111931465A (en) Method and system for automatically generating user manual based on user operation
CN112650872A (en) Dynamic picture playing method, device and equipment and computer readable storage medium
CN114398247A (en) Application program starting time counting method and system
CN111428806B (en) Image tag determining method and device, electronic equipment and storage medium
CN110704294B (en) Method and apparatus for determining response time
CN113760414B (en) Method and device for drawing graph

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40038142

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant