CN111131812A - Broadcast time testing method and device and computer readable storage medium - Google Patents

Broadcast time testing method and device and computer readable storage medium Download PDF

Info

Publication number
CN111131812A
CN111131812A CN201911419500.8A CN201911419500A CN111131812A CN 111131812 A CN111131812 A CN 111131812A CN 201911419500 A CN201911419500 A CN 201911419500A CN 111131812 A CN111131812 A CN 111131812A
Authority
CN
China
Prior art keywords
target
video frame
area
frame image
playing
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.)
Pending
Application number
CN201911419500.8A
Other languages
Chinese (zh)
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201911419500.8A priority Critical patent/CN111131812A/en
Publication of CN111131812A publication Critical patent/CN111131812A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • 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/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • 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/485End-user interface for client configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention provides a method and a device for testing broadcasting time and a computer readable storage medium, wherein the testing method comprises the following steps: the method comprises the steps of obtaining a target video file, determining a playing area corresponding to a page of a target application program in the target video file, determining target area images corresponding to video frame images in the target video file respectively according to the playing area, determining a first video frame image when the page of the target application program jumps to the playing page and a second video frame image when a sample video file starts to play from the video frame images according to the change rate of the target area images, and calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image so as to determine the starting time of the target application program. Since only the change rate of the target area image is calculated, the accuracy of the determined second video frame image can be improved, so that the accuracy of the calculated playing time is higher compared with the accuracy of the prior art.

Description

Broadcast time testing method and device and computer readable storage medium
Technical Field
The invention belongs to the field of application program testing, and particularly relates to a method and a device for testing broadcasting time and a computer readable storage medium.
Background
The playing time refers to the time from the start of clicking the video file to the time when the video file formally starts playing. Airtime is an important indicator of video applications. In the playing process, the shorter the playing time is, which means that the waiting time is shorter after the user clicks the video file, and the better the user experience is.
At present, in the testing process of a video application program, an automatic video analysis method is mostly adopted to test the playing time of the video application program, and the specific testing process is as follows: recording a page of a video application program between a certain time point before a sample video file is played by clicking and a certain time point after the sample video file begins to be played to obtain a target video file, calculating the change rate of each video frame image in the target video file (the change rate is the percentage of pixels of the current video frame image which are changed relative to the previous video frame image in the total pixels of the current video frame image), and determining the playing time according to the change rate of the video frame image. However, the accuracy of the obtained play time is relatively low in the current play time testing method.
Disclosure of Invention
The embodiment of the invention aims to provide a playing time testing method to improve the accuracy of the obtained playing time in the process of testing the playing time of a video application program.
In a first aspect of the present invention, there is provided a method for testing airtime, including:
acquiring a target video file; the target video file is obtained after recording a page of a target application program between a first time point and a second time point, wherein the first time point is located before a time point corresponding to a sample video file played by clicking, and the second time point is located after a time point corresponding to the start of playing of the sample video file;
determining a playing area corresponding to a page of the target application program in the target video file, and determining target area images respectively corresponding to video frame images included in the target video file according to the playing area;
determining a first video frame image when a page of the target application program jumps to a playing page and a second video frame image when the sample video file starts to play from the video frame images according to the change rate of the target area image corresponding to the video frame images;
and calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image so as to determine the broadcasting time of the target application program.
In a second aspect of the present invention, there is also provided a airtime testing apparatus, including:
the acquisition module is used for acquiring a target video file; the target video file is obtained after recording a page of a target application program between a first time point and a second time point, wherein the first time point is located before a time point corresponding to a sample video file played by clicking, and the second time point is located after a time point corresponding to the start of playing of the sample video file;
the first determining module is used for determining a playing area corresponding to a page of the target application program in the target video file and determining target area images respectively corresponding to video frame images included in the target video file according to the playing area;
a second determining module, configured to determine, according to a change rate of the target area image corresponding to the video frame image, a first video frame image when a page of the target application program jumps to a playing page and a second video frame image when the sample video file starts to be played from the video frame image;
and the calculating module is used for calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image so as to determine the starting time of the target application program.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the first embodiment of the present invention when executing the computer program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method according to the first embodiment of the present invention.
After the target video file is obtained, determining a playing area corresponding to a page of a target application program in the target video file, determining a target area image corresponding to each video frame image in the target video file according to the playing area, determining a first video frame image when the page of the target application program jumps to the playing page and a second video frame image when the sample video file starts to play according to the change rate of the target area image, and calculating a time difference between a time point corresponding to the second video frame image and a time point corresponding to the first video frame image to obtain the playing time of the target application program. The method comprises the steps of determining a target area image in each video frame image in a target video file, only calculating the change rate of the target area image in each video frame image, not calculating the change rates of other areas except the target area image, and not influencing the change rate of the target area image by the change of pixels in the other areas except the target area, so that the second video frame image when the sample video file starts to play is accurately determined, the accuracy of the obtained start-up time is improved, and the problem that the accuracy of the start-up time obtained in the prior art is not high is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic diagram of a page of a target application during a airtime test;
FIG. 2 is a schematic diagram of another page of a target application during airtime testing;
fig. 3 is a flowchart illustrating steps of a broadcast time testing method according to a first embodiment of the present invention;
FIG. 4 is a flowchart illustrating another method for measuring the broadcasting time according to a second embodiment of the present invention;
FIG. 5 is a flowchart illustrating a step of acquiring a target video file according to a second embodiment of the present invention;
fig. 6 is a schematic diagram of a foreground mask image in the second embodiment of the present invention;
fig. 7 is a schematic diagram of a binarized foreground mask image in the second embodiment of the present invention;
fig. 8 is a schematic diagram of another binarized foreground mask image according to a second embodiment of the present invention;
fig. 9 is a block diagram of a play time testing apparatus according to a third embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device in a fourth embodiment of the present invention.
Detailed Description
For a clearer introduction of the present invention, a brief introduction of a method for testing the airtime of a video application in the prior art is first provided.
In the prior art, in the process of testing the playing time, a page of a target application program in the process of starting playing a sample video file is recorded to obtain a target video file. Then, the rate of change of each video frame image other than the first video frame image in the target video file is calculated. According to the change rate of each video frame image, firstly, determining that the video frame image with the change rate larger than a first preset threshold value in a target video file is the first video frame image when a page of a target application program jumps to a playing page, and after the first video frame image when the page of the target application program jumps to the playing page is a click playing instruction received by the target application program, starting to load a sample video file, and entering the corresponding video frame image in the state of playing the sample video file. And then determining that the video frame image with the change rate larger than a second preset threshold value is a second video frame image when the sample video file in the target video file starts playing, wherein the second video frame image when the sample video file starts playing is a corresponding video frame image when the target application program formally starts playing the sample video file. And calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image, and determining the playing time of the target application program.
Referring to fig. 1, fig. 1 is a schematic view of a page of a target application in a playing time testing process, where a middle page 101 in fig. 1 is a whole area occupied by the page of the target application, a video frame image corresponding to the page 101 is one of video frame images included in a recorded video file, and a playing area 102 is an area in the page 101 where a sample video file is played (i.e., an area actually occupied by a playing window when the sample video file is played). Specifically, taking the lower left corner of the video frame image corresponding to the page 101 as the origin of coordinates as an example, the area corresponding to the playing area 102 may be, for example, an area corresponding to a pixel point in the corresponding video frame image in the coordinate range from (200, 480) to (580, 880). As shown in fig. 1, in the related art, when determining the second video frame image at the start of playing of the sample video file in the target video file, the rate of change of each video frame image (image corresponding to the entire page 101) is calculated. Since the playing area 102 only occupies a part of the entire page 101, when the change rate of the other areas except the playing area 102 in the video frame image is large, the change rate of the video frame image is not completely determined by the pixel change caused when the sample video file is played in the playing area 102, and is also affected by the pixel change in the other areas except the playing area 102. Under the condition that the pixels in other areas change more, the second video frame image with the change rate reaching the second preset value may not be the second video frame image when the sample video file formally starts playing, so that the video frame image determined according to the second preset threshold value is not necessarily the video frame image when the sample video file starts playing, which causes the determined second video frame image to be inaccurate, and the calculated playing time to be inaccurate.
Meanwhile, the video application program may adopt different forms of playing pages to play the video file, and in the different forms of playing pages, the proportion of the playing area in the pages of the video application program is different. Referring to fig. 2, fig. 2 is a schematic diagram of another target application page during the airtime test process, as shown in fig. 1 and fig. 2, the ratio of the playing area 202 in fig. 2 to the target application page 201 is higher than the ratio of the playing area 102 in fig. 1 to the target application page 101. In the playing process of the sample video file, the change rate of the video frame image is greatly influenced by the playing area, and the larger the proportion of the playing area in the page is, the larger the influence on the change rate of the video frame image is. Since the ratio of the playing area 202 to the page 201 is higher than the ratio of the playing area 102 to the page 101, in the process of determining the second video frame image, the second preset threshold corresponding to fig. 2 is higher than the second preset threshold corresponding to fig. 1. Therefore, in the process of testing the broadcasting time, the size of the second preset threshold needs to be adjusted according to the proportion of the broadcasting area to the page, so as to accurately determine the second video frame image, and the testing process is relatively complicated.
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Referring to fig. 3, fig. 3 is a flowchart of steps of a playing time testing method according to a first embodiment of the present invention, and the playing time testing method provided in this embodiment is suitable for testing the playing time of a video application program, so as to reduce an error of the determined playing time of the video application program and improve accuracy of the determined playing time of the video application program. The airtime testing method provided by this embodiment may be executed by the airtime testing apparatus, and the airtime testing apparatus may be disposed in the first electronic device. The airtime testing apparatus is generally implemented in software and/or hardware, and the method may include:
step 301, a target video file is obtained.
In the embodiment of the invention, the target video file comprises a video file obtained after recording the page of the target application program between a first time point and a second time point, wherein the first time point is positioned before the time point corresponding to the sample video file played by clicking, and the second time point is positioned after the time point corresponding to the start of playing the sample video file. The target video file comprises a continuous change image of a page of the target application program between a certain time before the target application program receives an instruction of clicking to play the sample video file and a period of formally starting to play the sample video file.
For example, in the testing process, a sample video file may be determined first, and then recording of a page of a target application program may be started, where a corresponding time point when recording is started is a first time point. And in the recording process, sending a click playing instruction to the target application program, and indicating the target application program to click and play the sample video file. And after the sample video file starts to be played for a period of time, sending a playing stopping instruction to the target application program, indicating the target application program to stop recording to obtain the target video file, wherein the corresponding time point when the recording is stopped is a second time point.
In practical use, the manner of acquiring the target video file may include, but is not limited to, the manner of transmitting the target video file to the first electronic device through the second electronic device and receiving the target video file by the first electronic device.
Step 302, determining a playing area corresponding to a page of a target application program in a target video file, and determining target area images respectively corresponding to video frame images included in the target video file according to the playing area.
In the embodiment of the disclosure, the playing area is an area where the playing window occupies a page of the target application program in the process that the target application program plays the sample video file. The target area image is an area image corresponding to the playing window in each video frame image in the target video file. As shown in fig. 1, in the process of playing the sample video file by the target application program, in a page 101 of the target application program, the playing area 102 is used for playing the sample video file, and other areas except the playing area 102 are used for displaying other information (such as an identifier, a time length, a playing progress, and the like of the sample video file), and an area image corresponding to the playing area 102 is a target area image in a video frame image corresponding to the page 101.
In this embodiment, after the target video file is obtained, a playing area corresponding to a page of a target application program in the target video file may be first determined, and then a target area image corresponding to each video frame image included in the target video file is determined according to the playing area. For example, if the target video file includes 100 video frame images, after the play area corresponding to the page of the target application program in the target video file is determined, the target area image corresponding to each of the 100 video frame images may be sequentially determined. With reference to fig. 1, it can be determined that the area image corresponding to the coordinate range of the pixel point from (200, 480) to (580, 880) in each video frame image is the target area image. The method for determining the playing area corresponding to the page of the target application program in the target video file may be selected according to requirements, which is not limited in this embodiment.
Step 303, determining a first video frame image when the page of the target application program jumps to the playing page and a second video frame image when the sample video file starts to play from the video frame images according to the change rate of the target area image corresponding to the video frame images.
In the process of testing the playing time, the whole process that a user clicks a video file until the video file formally starts to be played needs to be simulated. Therefore, the related information of the sample video file (the related information may be information such as an identifier of the sample video file, a summary of the sample video file, and a click-to-play button corresponding to the sample video file) may be first presented in a page of the target application program, and then a click-to-play instruction is sent to the target application program, so that the target application program responds to the click-to-play instruction, jumps from the page presenting the related information of the sample video file to the page playing the sample video file, and plays the sample video file. For example, taking an episode of a tv show played by a target application as an example, an episode page may be first displayed in the target application, an overview of the episode of the tv show is displayed in the episode page, then a click play instruction is sent to the target application, and after receiving the click play instruction, the target application loads the episode of the tv show (sample video file) and starts playing the sample video file until the sample video file formally starts playing. The method comprises the steps that after a video frame image when a target application program jumps to a playing page from a collection page is a target application program and receives a click playing instruction, a sample video file begins to be loaded, the corresponding video frame image when the target application program enters a playing state represents the click playing instruction received by the video application program, and the video frame image enters the playing state and is a first video frame image. And opening the sample video file after the second video frame image is in a playing state as a target application program, and formally starting to play the corresponding video frame image when the sample video file is played.
In this embodiment, after determining the target area image corresponding to each video frame image included in the target video file, a first video frame image when the page of the target application program jumps to the playing page and a second video frame image when the sample video file starts to play may be determined according to the change rate of the target area image corresponding to the video frame image.
In practical use, the process of calculating the change rate of the target area image is the same as the process of calculating the change rate of the video frame image in the prior art, namely, the percentage of the changed pixel points in the target area image corresponding to the current video frame image relative to the target area image corresponding to the previous video frame image is calculated. The process of determining the first video frame image and the second video frame image according to the change rate of the target area image corresponding to the video frame image may refer to the process of determining the first video frame image and the second video frame image according to the change rate of the video frame image in the prior art, which is not repeated herein in this embodiment.
And step 304, calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image to determine the playing time of the target application program.
Wherein, in the video file, each video frame image corresponds to a time point which represents the relative time of the video frame image in the video file. For example, in combination with the example in step 302, if the video file includes 100 video frame images, and the time length of the video file is 4 seconds, the time point corresponding to the first video frame image may be 1 st millisecond, the time point corresponding to the second video frame image may be 40 th millisecond, the time point corresponding to the third video frame image may be 80 th millisecond, and so on, there should be a time point for each video frame image.
In the embodiment of the present disclosure, each video frame image in the target video file corresponds to a time point, and in combination with step 303, the first video frame image is a video frame image when the page jumps to the playing page after the target application program receives the click operation, and the second video frame image is a video frame image when the sample video file formally starts to be played. And taking the time difference between the time point corresponding to the first video frame image and the time point corresponding to the second video frame image as the starting time, namely, the target application program receives a click playing instruction and starts to load the sample video file until the starting time when the sample video file formally starts to play.
In this embodiment, after determining that the first video frame image when the page jumps to the playing page and the second video frame image when the sample video file starts to be played, calculating a time difference between a time point corresponding to the second video frame image and a time point corresponding to the first video frame image, so as to obtain the start time of the target application program. In the process of determining the second video frame image, only the change rate of the target area image is calculated, and the change rate of the target area image is completely determined by the change of the pixels in the playing area and is not influenced by the change of the pixels in other area images, so that the second video frame image can be accurately determined. Meanwhile, with reference to fig. 1 and 2, since only the change rate of the target area image is calculated, when the ratio of the playing area to the page changes in the testing process, the second preset threshold does not need to be adjusted according to the ratio of the playing area to the page, thereby simplifying the testing process.
In this embodiment, after the target video file is obtained, a playing area corresponding to a page of a target application program in the target video file is first determined, a target area image corresponding to each video frame image in the target video file is determined according to the playing area, a first video frame image when the page of the target application program jumps to the playing page and a second video frame image when the sample video file starts to play are determined according to a change rate of the target area image, and a time difference between a time point corresponding to the second video frame image and a time point corresponding to the first video frame image is calculated to obtain a play start time of the target application program. In the process of determining the second video frame image when the sample video file starts to play, only the change rate of the target area image in each video frame image is calculated, the change rate of the target area image is not influenced by the pixel change in other area images except the target area, and the second video frame image when the sample video file starts to play can be accurately determined, so that the playing time determined by the time difference between the first video frame image and the second video frame image is higher in accuracy compared with the prior art.
Referring to fig. 4, fig. 4 is a flowchart of another method for testing the playing time according to a second embodiment of the present invention, where the method for testing the playing time provided by this embodiment is suitable for testing the playing time of a video application program, so as to reduce an error of the determined playing time of the video application program and improve accuracy of the determined playing time of the video application program. The airtime testing method provided by this embodiment may be executed by the airtime testing apparatus, and the airtime testing apparatus may be disposed in the first electronic device. The airtime testing device is usually implemented in software and/or hardware, and the method mainly comprises:
step 401, a target video file is obtained.
Optionally, the step of obtaining the target video file may include:
step 4011, sending a recording start instruction to the second electronic device.
The second electronic device may be an electronic device running a target application, and the start recording instruction is used to instruct the second electronic device to start recording a page of the target application, so as to obtain a target video file.
Referring to fig. 5, fig. 5 is a flowchart illustrating a step of acquiring a target video file according to a second embodiment of the present invention, as shown in fig. 5, a first electronic device may send a recording start instruction to a second electronic device, and after receiving the recording start instruction, the second electronic device may start recording a page of a target application in response to the recording start instruction. For example, the second electronic device is a mobile phone running a target application, and the first electronic device sends a recording start command to the mobile phone to instruct the mobile phone to start recording a page of the target application running in the mobile phone. The second electronic device may be a terminal device such as a mobile phone, a computer, and a tablet, and the specific form of the second electronic device is not limited in this embodiment.
Step 4012, sending a click play command to the second electronic device,
and the click playing instruction is used for indicating the second electronic equipment to click the sample video file so as to execute the operation of playing the sample video file.
In this embodiment, after the instruction to start recording is sent to the second electronic device, so that the second electronic device starts recording the page of the target application program, a click play instruction is sent to the second electronic device, and the second electronic device is instructed to click the sample video file to start playing the sample video file. For example, in combination with step 4011, after sending the recording start instruction to the second electronic device, the first electronic device may send a click playing instruction to the second electronic device, instructing the second electronic device to click and play the sample video file. And after receiving the click playing instruction, the second electronic equipment responds to the click playing instruction, clicks the sample video file, starts to load the sample video file, and starts to play the sample video file.
And 4013, sending a recording stopping instruction to the second electronic equipment.
And the recording stopping instruction is used for indicating the second electronic equipment to stop recording the target application program page and storing the recorded target video file.
In this embodiment, after sending the click play instruction to the second electronic device, the recording stop instruction may be sent to the second electronic device, and after receiving the recording stop instruction, the second electronic device may stop recording the target application page in response to the recording stop instruction, and store and record the target application page to obtain the target video file. For example, in combination with step 4012, the electronic device may send a recording stop instruction to the second electronic device 4 seconds after sending the click play instruction to the second electronic device, and the second electronic device stops recording the target application page in response to the recording stop instruction sent by the first electronic device, so as to obtain the target video file, and store the recorded target video file.
It should be noted that, in actual use, the recording stop instruction may be sent to the second electronic device within a predetermined time period after the click play instruction is sent, so that the second electronic device stops recording to obtain the target video file. And in the preset time period, the second electronic equipment receives a click playing instruction, plays the sample video file and enables the sample video file to formally start playing.
Step 4014, send a data request to the second electronic device.
In the embodiment of the disclosure, after sending the recording stop instruction to the second electronic device, the first electronic device may send a data request to the second electronic device to obtain a target video file recorded and stored by the second electronic device.
Step 4015, receiving the target video file sent by the second electronic device
In the embodiment of the disclosure, after receiving a data request sent by a first electronic device, a second electronic device may send a target video file to the first electronic device in response to the data request, and the first electronic device receives the target video file sent by the second electronic device to test the play time. The prior art may be referred to in the process of receiving the data request by the second electronic device and sending the target video file to the first electronic device, which is not limited in this embodiment.
Step 402, determining a playing area corresponding to a page of a target application program in a target video file.
In this embodiment, the method for determining the playing area corresponding to the page of the target application program in the target video file may be implemented in the following manner:
step 4021, determining a foreground mask image corresponding to the target video file.
In this embodiment, in the process of determining the playing area, a foreground mask image corresponding to the target video file may be determined first. For example, a preset number of video frame images may be sequentially acquired from the last video frame image in the target video file, and foreground mask images corresponding to the preset number of video frame images are determined by using a background removal algorithm to serve as the foreground mask images corresponding to the target video file. For example, 20 video frame images from the last video frame image in the target video file, i.e., the last 20 video frame images in the target video file, are acquired. In practical use, all the video frame images in the target video file may also be obtained, the foreground mask image corresponding to the target video file is determined according to all the video frame images, and the specific number of the obtained video frame images may be set according to requirements, which is not limited in this embodiment. After the preset number of video frame images are obtained, a background removal algorithm, such as a gaussian background removal algorithm, may be used to determine a foreground mask image corresponding to the target video file according to the preset number of video frame images. For example, the last 20 video frame images in the obtained target video file may be sequentially input into a gaussian background removal algorithm, and a foreground mask image corresponding to the last 20 video frame images is determined through the gaussian background removal algorithm. Specifically, the process of determining the foreground mask images corresponding to the preset number of video frame images by using the gaussian background removal algorithm may refer to the process of determining the foreground mask images corresponding to the video file by using the gaussian background removal algorithm in the prior art, which is not described in detail in this embodiment. The method and the device only obtain the preset number of video frame images starting from the last video frame image in the target video file, avoid determining the foreground mask image corresponding to the target video file according to all the video frame images of the target video file, reduce the data volume and improve the efficiency.
It should be noted that the process of determining the playing area corresponding to the target video file may include, but is not limited to, a background removal algorithm, which is not limited in this embodiment.
And 4022, carrying out binarization on the foreground mask image according to the first preset threshold value.
In the binarized foreground mask image, pixels with the gray value greater than or equal to a first preset threshold are foreground pixels, and pixels with the gray value smaller than the first preset threshold are background pixels.
Referring to fig. 6, fig. 6 is a schematic diagram of a foreground mask image in the second embodiment of the present invention, in the foreground mask image, the larger the gray value of a pixel point is, the higher the probability that the pixel point is a foreground pixel point is, a first preset threshold may be preset, for example, the first preset threshold is set to 125, after the foreground mask image is obtained, the pixel point with the gray value greater than or equal to 125 in the foreground mask image is determined as the foreground pixel point, and the pixel point with the gray value less than 125 in the foreground mask image is determined as the background pixel point.
Referring to fig. 7, fig. 7 is a schematic diagram of a binarized foreground mask image in the second embodiment of the present invention, and as shown in fig. 7, after the foreground mask image is binarized, a value corresponding to each pixel point is 0 or 1, where 1 indicates that the pixel point is a foreground pixel point, and 0 indicates that the pixel point is a background pixel point. The specific value of the first preset threshold may be set as required, and the process of binarizing the foreground mask image may refer to the process of binarizing the image in the prior art, which is not limited in this embodiment.
Step 4023, dividing the binarized foreground mask image into a plurality of first regions along a first direction.
As shown in fig. 7, each line of pixels in the foreground mask image may be divided into a first region along the vertical direction (first direction) of the foreground mask image, that is, the binarized foreground mask image shown in fig. 7 is divided into ten first regions along the vertical direction, and each first region corresponds to a line of pixels. In practical use, the size of the first area may be set according to requirements, which is not limited in this embodiment.
Generally, when an electronic device, such as a mobile phone, is in a portrait screen state, a playing window in a target application program is as wide as a page of the target application program (the playing window is as long as a horizontal screen). Therefore, in the foreground mask image corresponding to the target video file, the foreground area 601 corresponding to the playing window is also as wide as the foreground mask image, at this time, only the upper boundary and the lower boundary of the foreground area 601 need to be determined, the left boundary and the right boundary of the foreground area 601 are the left boundary and the right boundary of the foreground mask image, and the specific position of the foreground area 601 can be determined according to the upper boundary and the lower boundary of the foreground area 601 and the left boundary and the right boundary of the foreground mask image. Therefore, when the mobile phone is in a portrait screen state, the foreground mask image may be divided into a plurality of first regions along the vertical direction, and the foreground region 601 may be determined according to the plurality of first regions. Similarly, when the mobile phone is in a landscape state, the foreground mask image can be divided into a plurality of first areas along the horizontal direction. The first direction may be determined according to practical situations, and the embodiment does not limit this.
Step 4024, determining a first foreground area and/or a first background area in each first area according to a second preset threshold.
The occupation ratio of the foreground pixel points in the first foreground region is greater than or equal to a second preset threshold, and the occupation ratio of the foreground pixel points in the first background region is smaller than the second preset threshold. The higher the percentage of the foreground pixels in the first region is, the more the foreground pixels in the first region are, and the higher the probability that the first region is the foreground region is. As shown in fig. 7, in the first row of pixels (first area) in fig. 7, 10 pixels, 7 foreground pixels, 3 background pixels are total, and the ratio of the foreground pixels is 0.7. In a similar way, in the pixels in the second to tenth rows, the occupation ratios of the foreground pixels are as follows in sequence: 0.3, 0.8, 0.4, 0.3, 0.6, 0.8, 0.3, 0 and 0. The second preset threshold may be set as required, for example, 0.5, and it may be determined that the first foreground region in the binarized foreground mask image shown in fig. 7 is the first line of pixels, the third line of pixels, the sixth line of pixels, and the seventh line of pixels, and the first background region is the second line of pixels, the fourth line of pixels, the fifth line of pixels, the eighth line of pixels, the ninth line of pixels, and the tenth line of pixels. The specific value of the second preset threshold may be selected according to the requirement, which is not limited in this embodiment.
Step 4025, determining a plurality of continuous first foreground regions as first target regions.
In this embodiment, if a plurality of first foreground regions exist in the foreground mask image, the plurality of continuous first foreground regions may be determined as the first target region. As shown in fig. 7, the continuous sixth and seventh rows of pixels may be used as the first target area.
Optionally, after determining the first foreground region and/or the first background region, the method may further include: and determining the first background area as the first foreground area when the first areas adjacent to the first background area are the first foreground area. As shown in fig. 7, the second row of pixels is the first background area, and the first row of pixels and the third row of pixels adjacent to the second row of pixels are both the first foreground pixels, so that the second row of pixels can be determined as the first foreground area again. After the second row of pixels is re-determined as the first foreground region, the first to third rows of pixels are consecutive first foreground regions, and then the first to third rows of pixels may be determined as the first target region.
Step 4026, determining a playing area according to the at least one first target area.
In this embodiment, a play area may be determined according to at least one first target area, and in combination with step 4025, when it is determined that the first to third rows of pixels are the first target area, and the sixth row of pixels and the seventh row of pixels are the first target area, the first to third rows of pixels (the first target area) may be selected as the play area, or the sixth row of pixels and the seventh row of pixels (the first target area) may be selected as the play area. The method for determining the playing area according to the at least one first target area may be set according to requirements, which is not limited in this embodiment.
Optionally, determining the playing area according to the at least one first target area may include: and taking the first target area with the largest area in the at least one first target area as a playing area.
As shown in fig. 7, if the area of the first foreground region (the first to third rows of pixels) is larger than that of the second first foreground region (the sixth and seventh rows of pixels), the regions corresponding to the first to third rows of pixels may be determined as the playing region, that is, the upper boundary of the playing region is the first row of pixels, the lower boundary is the third row of pixels, and the region between the first row of pixels and the third row of pixels is the playing region (including the first and third rows of pixels). In actual operation, the larger the area of the first target region, the greater the possibility that the first target region is the playing region, so when determining a plurality of first target regions, the first target region with the largest area among the plurality of first target regions may be selected as the playing region to improve the accuracy of the determined playing region.
In this embodiment, in the foreground mask image corresponding to the target video file, the gray values corresponding to the pixel points in the foreground region 601 are different, so that in the binarized foreground mask image, the foreground pixel points in the foreground region 601 may be divided into background pixel points, and therefore, the foreground region cannot be accurately determined according to the binarized foreground mask image. According to the occupation ratio of foreground pixel points in the first area, dividing the plurality of first areas into a first foreground area and a first background area, if other areas adjacent to the first background area are all the first foreground area, that is, the first background area is located between two first foreground areas, for example, the second row of pixels in fig. 7, it is described that other areas behind or in front of the first background area are all foreground areas, the first background area is also a foreground area, and the first background area is determined as the first foreground area again. Similarly, when the first background area is not located between the two first foreground areas, as shown in the sixth row of pixels in fig. 7, it is illustrated that the first background area is the background area. By dividing the binarized foreground mask image and re-determining whether each region is a foreground region or a background region through the continuity among a plurality of regions, the background region can be prevented from being determined as the foreground region, for example, the fourth row and the fifth row of pixels are determined as the foreground region; meanwhile, the foreground area can be prevented from being determined as the background area, for example, the second line of pixels is determined as the background area, and the accuracy of the determined playing area is improved.
Optionally, in the process of determining the play area, the method may further include:
dividing the binarized foreground mask image into a plurality of second areas along a second direction, wherein the first direction and the second direction are two directions which are vertical to each other;
determining a second foreground area and/or a second background area in each second area according to a second preset threshold;
determining a plurality of continuous second foreground areas as second target areas;
correspondingly, determining the playing area according to the at least one first target area includes: and determining a playing area according to the at least one first target area and the at least one second target area.
In this embodiment, the occupation ratio of the foreground pixels in the second foreground region is greater than or equal to the second preset threshold, and the occupation ratio of the foreground pixels in the second background region is smaller than the second preset threshold. As can be seen from the foregoing, the playing window in the target application may also be located at other positions in the target application page, such as the middle position of the target application page. Therefore, in the foreground mask image corresponding to the target video file, the foreground region 601 corresponding to the playing window is not as wide as or equal to the foreground mask image, and at this time, the upper boundary, the lower boundary, the left boundary, and the right boundary of the foreground region 601 need to be determined at the same time. Referring to fig. 8, fig. 8 is a schematic diagram of another binarized foreground mask image according to a second embodiment of the present invention, and as shown in fig. 8, when a foreground region corresponding to a playing window is located at a middle position of the binarized foreground mask image, the foreground mask image may be divided in the horizontal and vertical directions of the binarized foreground mask image, that is, the foreground mask image is divided into a plurality of first regions in the vertical direction and a plurality of second regions in the horizontal direction. Each line of pixels in the binarized foreground mask image is divided into a first region along the vertical direction (first direction), and each column of pixels in the binarized foreground mask image is divided into a second region along the horizontal direction (second direction). The process of determining the second target area according to the plurality of second areas may refer to the process of determining the first target area according to the plurality of first areas, which is not described herein again.
In this embodiment, after determining at least one first target area and at least one second target area, an intersecting area between the first target area and the second target area may be determined, and the intersecting area between the first target area and the second target area is used as a playing area. The method for determining the playing area according to the at least one first target area and the at least one second target area may be set according to requirements, which is not limited in this embodiment.
Optionally, after determining the second foreground region and/or the second background region, the method may further include: and determining the second background area as the second foreground area under the condition that the second areas adjacent to the second background area are the second foreground area. The process of determining the second background area as the second foreground area may refer to the process of determining the first background area as the first foreground area, which is not described herein in detail.
Optionally, the step of determining the playing area according to the at least one first target area and the at least one second target area may include: determining a first target area with the largest area in the at least one first target area and a second target area with the largest area in the at least one second target area; and taking the area of the intersection between the first target area with the largest area and the second target area with the largest area as a playing area.
In this embodiment, after the first target area and the second target area are determined, a first target area with a largest area in the at least one first target area and a second target area with a largest area in the at least one second target area may be determined, and an intersection area between the first target area with the largest area and the second target area with the largest area is used as the playing area. As shown in fig. 8, when it is determined that the pixels in the fourth to seventh rows are the first target area with the largest area and the pixels in the fourth to seventh columns are the second target area with the largest area, it may be determined that the area where the pixels in the fourth to seventh rows and the pixels in the fourth to seventh columns intersect is the playing area, that is, the upper boundary of the playing area is the pixel in the fourth row, the lower boundary is the pixel in the seventh row, the left boundary is the pixel in the fourth column, the right boundary is the pixel in the seventh column, and the specific position of the playing area may be determined according to the ordinate of the pixel in the fourth row and the pixel in the seventh row. The first target region with the largest area and the second target region with the largest area are arranged
It should be noted that, when the binarized foreground mask image is divided along the first direction and the second direction to determine the playing area, the first direction and the second direction may be other directions except the vertical direction and the horizontal direction, which is not limited in this embodiment.
Step 403, clipping each video frame image according to the playing area to obtain a target area image corresponding to each video frame image.
In this embodiment, after the play area corresponding to the page of the target application program in the target video file is determined, the video frame images included in the target video file may be clipped according to the play area, so as to obtain a target area image corresponding to each video frame image. For example, with reference to the example in the first embodiment, the target area images corresponding to the coordinate ranges of the pixel points in each of the video frame images (200, 480) to (580, 880) may be obtained by respectively cropping 100 video frame images included in the target video file according to the determined pixel point range corresponding to the play area.
When the method is used in practice, after the playing area of the target video file is determined, the video frame images in the target video file are cut to obtain the target area image corresponding to each video frame image, so that the change rate of the target area images can be calculated conveniently, and the calculation efficiency is improved.
Step 404, according to the change rate of the target area image corresponding to the video frame image, determining a first video frame image when the page of the target application program jumps to the playing page from the video frame image, and a second video frame image when the sample video file starts to play.
In the embodiment of the present disclosure, according to the change rates of the target area images respectively corresponding to the video frame images, a first video frame image when a page of a target application program jumps to a playing page and a second video frame image when a sample video file starts to play are determined from the video frame images, which may be implemented by:
the first method is as follows:
sequentially calculating the change rate of the target area image corresponding to each video frame image from the second video frame image in the target video file, and sequentially judging whether the change rate of the target area image corresponding to each video frame image obtained by calculation is larger than or equal to a first preset threshold value;
if the change rate of the target area image corresponding to the video frame image is greater than or equal to a first preset threshold value, determining the video frame image with the change rate of the target area image greater than or equal to the first preset threshold value as a first video frame image;
after the first video frame image is determined, sequentially calculating and judging whether the change rate of the target area image corresponding to each video frame image behind the first video frame image is greater than or equal to a second preset threshold value or not;
and if the change rate of the target area image corresponding to the video frame image after the first video frame image is greater than or equal to a second preset threshold, determining the video frame image with the change rate of the target area image greater than or equal to the second preset threshold as a second video frame image.
In the embodiment of the disclosure, starting from the second video frame image in the target video file, the change rate of the target area image corresponding to each video frame image is sequentially calculated, and meanwhile, whether the change rate of the calculated target area image is greater than or equal to a first preset threshold value is judged, and when the change rate of the calculated target area image is greater than or equal to the first preset threshold value, the video frame image corresponding to the target area image can be determined to be the first video frame image when the page of the target application program jumps to the playing page. For example, the change rate of the target area image corresponding to the second video frame image may be calculated from the second video frame image, and whether the calculated change rate of the target area image corresponding to the second video frame image is greater than or equal to a preset threshold value is determined; then calculating the change rate of the target area image corresponding to the third video frame image, and judging whether the change rate of the target area image corresponding to the third video frame image obtained by calculation is greater than or equal to a first preset threshold value or not; and then calculating the change rate of the target area image corresponding to the fourth video frame image, judging whether the calculated change rate of the target area image corresponding to the fourth video frame image is greater than or equal to a first preset threshold value or not, and repeating the steps until the first video frame image with the change rate greater than or equal to the first preset threshold value is determined.
Similarly, after the first video frame image is determined, the change rate of the target area image corresponding to the video frame image after the first video frame image is continued, whether the calculated change rate of the target area image is greater than or equal to a second preset threshold value or not is judged, and when the calculated change rate of the target area image is greater than or equal to the second preset threshold value, the video frame image corresponding to the target area image can be determined to be the second video frame image when the sample video file starts to play.
In this embodiment, the change rates of the target area images corresponding to the video frame images are sequentially calculated and determined according to the sequence of each video frame image in the target video file, and after determining that the first video frame image when the page of the target application program jumps to the playing page and the second video frame image when the sample video file starts to play, the change rates of the target area images corresponding to other video frame images after the second video frame image can be stopped from being calculated, so that the calculation amount is reduced, and the test efficiency is improved.
The second method comprises the following steps:
calculating the change rate of the target area image corresponding to each video frame image except the first video frame image in the target video file;
starting from the second video frame image, sequentially judging whether the change rate of the target area image corresponding to the video frame image obtained by calculation is larger than or equal to a first preset threshold value or not;
if the change rate of the target area image corresponding to the video frame image is greater than or equal to a first preset threshold value, determining the video frame image with the change rate of the target area image greater than or equal to the first preset threshold value as a first video frame image;
after the first video frame image is determined, sequentially judging whether the change rate of the target area image corresponding to the video frame image behind the first video frame image is greater than or equal to a second preset threshold value or not;
and if the change rate of the target area image corresponding to the video frame image after the first video frame image is greater than or equal to a second preset threshold, determining the video frame image with the change rate of the target area image greater than or equal to the second preset threshold as a second video frame image.
In the embodiment of the present disclosure, the change rate of the target area image corresponding to each video frame image except the second video frame image may be calculated, and after the change rate of the target area image corresponding to each video frame image is obtained, the change rate of the target area image corresponding to each video frame image is sequentially determined according to the sequence of each video frame image, so as to determine the first video frame image and the second video frame image. For example, in connection with step 304, the rate of change of each of the 100 video frame images except the first video frame image may be first calculated. And then, starting from the second video frame image, sequentially judging the change rate of the target area image corresponding to each video frame image, after determining the first video frame image with the change rate being greater than or equal to a first preset threshold value, sequentially judging the change rate of the target area image corresponding to each video frame image after the first video frame image, and determining the second video frame image with the change rate being greater than or equal to a second preset threshold value.
The second embodiment differs from the first embodiment in that: in this embodiment, the change rates of the target area images respectively corresponding to all the video frame images except the first video frame image are first calculated, and then the first video frame image and the second video frame image are determined after the subsequent steps are executed. The method is that each time the change rate of the target area image corresponding to one video frame image is calculated, whether the change rate of the target area image corresponding to the obtained video frame image is larger than or equal to a first preset threshold value or not is judged. In the process of determining the first video frame image and the second video frame image, the change rates of the target area images corresponding to all the video frame images except the first video frame image are calculated uniformly, then the change rate of the target area image corresponding to each video frame image is judged in sequence, and the first video frame image and the second video frame image are determined, so that the calculation process can be simplified, and the efficiency is improved.
It should be noted that specific values of the first preset threshold and the second preset threshold may be set according to requirements. In the process of determining the first video frame image when the page of the target application program jumps to the playing page and the second video frame image when the sample video file starts to be played, other methods may also be used, which is not limited in this embodiment.
Step 405, calculating a time difference between a time point corresponding to the second video frame image and a time point corresponding to the first video frame image to determine the broadcasting time of the target application program.
Step 304 may be referred to for understanding of step 405, and this embodiment is not described herein again.
In this embodiment, after the target video file is obtained, a playing area corresponding to a page of a target application program in the target video file is first determined, a target area image corresponding to each video frame image in the target video file is determined according to the playing area, a first video frame image when the page of the target application program jumps to the playing page and a second video frame image when the sample video file starts to play are determined according to a change rate of the target area image, and a time difference between a time point corresponding to the second video frame image and a time point corresponding to the first video frame image is calculated to obtain a play start time of the target application program. In the process of determining the second video frame image when the sample video file starts to play, only the change rate of the target area image in each video frame image is calculated, the change rate of the target area image is not influenced by the pixel change in other area images except the target area, and the second video frame image when the sample video file starts to play can be accurately determined, so that the playing time determined by the time difference between the first video frame image and the second video frame image is higher in accuracy compared with the prior art.
Referring to fig. 9, fig. 9 is a block diagram of a start time testing apparatus in a third embodiment of the present invention, and the present embodiment provides the start time testing apparatus suitable for a start time test of a video application program, so as to reduce an error of a determined start time of the video application program and improve accuracy of the determined start time of the video application program. The airtime testing apparatus provided in this embodiment may be disposed in the first electronic device. The airtime testing apparatus is typically implemented in software and/or hardware, and may include: an acquisition module 901, a first determination module 902, a second determination module 903, and a calculation module 904.
The obtaining module 901 is configured to obtain a target video file; the target video file is obtained after recording a page of a target application program between a first time point and a second time point, the first time point is located before a time point corresponding to the sample video file which is clicked to play, and the second time point is located after a time point corresponding to the sample video file which is started to play.
The first determining module 902 is configured to determine a playing area corresponding to a page of a target application program in a target video file, and determine target area images corresponding to video frame images included in the target video file respectively according to the playing area.
The second determining module 903 is configured to determine, according to a change rate of a target area image corresponding to a video frame image, a first video frame image when a page of a target application program jumps to a playing page from the video frame image, and a second video frame image when a sample video file starts to be played.
The calculating module 904 is configured to calculate a time difference between a time point corresponding to the second video frame image and a time point corresponding to the first video frame image, so as to determine a play time of the target application program.
In this embodiment, after the target video file is obtained, a playing area corresponding to a page of a target application program in the target video file is first determined, a target area image corresponding to each video frame image in the target video file is determined according to the playing area, a first video frame image when the page of the target application program jumps to the playing page and a second video frame image when the sample video file starts to play are determined according to a change rate of the target area image, and a time difference between a time point corresponding to the second video frame image and a time point corresponding to the first video frame image is calculated to obtain a play start time of the target application program. In the process of determining the second video frame image when the sample video file starts to play, only the change rate of the target area image in each video frame image is calculated, the change rate of the target area image is not influenced by pixel changes in other areas except the target area, and the second video frame image when the sample video file starts to play can be accurately determined, so that the accuracy of the playing time determined by the time difference between the first video frame image and the second video frame image is higher than that of the prior art.
Optionally, the first determining module 902 is specifically configured to crop each video frame image according to the playing area, so as to obtain a target area image corresponding to each video frame image.
Optionally, the first determining module 902 is specifically configured to determine a foreground mask image corresponding to the target video file;
and carrying out binarization on the foreground mask image according to a first preset threshold value.
And dividing the binarized foreground mask image into a plurality of first areas along a first direction.
And determining a first foreground area and/or a first background area in each first area according to a second preset threshold value.
And determining a plurality of continuous first foreground areas as first target areas.
And determining a playing area according to the at least one first target area.
Optionally, determining the playing area according to the at least one first target area includes: and taking the first target area with the largest area in the at least one first target area as a playing area.
Optionally, the first determining module 902 is further configured to divide the binarized foreground mask image into a plurality of second regions along a second direction, where the first direction and the second direction are two directions perpendicular to each other.
And determining a second foreground area and/or a second background area in each second area according to a second preset threshold value.
And determining a plurality of continuous second foreground areas as second target areas.
Determining a play area according to at least one first target area, comprising: and determining a playing area according to the at least one first target area and the at least one second target area.
Optionally, determining the playing area according to the at least one first target area and the at least one second target area includes: determining a first target area with the largest area in the at least one first target area and a second target area with the largest area in the at least one second target area; and taking the area of the intersection between the first target area with the largest area and the second target area with the largest area as a playing area.
Optionally, the second determining module 903 is specifically configured to:
and sequentially calculating the change rate of the target area image corresponding to each video frame image from the second video frame image in the target video file, and sequentially judging whether the change rate of the target area image corresponding to each video frame image obtained by calculation is greater than or equal to a first preset threshold value.
And if the change rate of the target area image corresponding to the video frame image is greater than or equal to a first preset threshold value, determining the video frame image with the change rate of the target area image greater than or equal to the first preset threshold value as the first video frame image.
After the first video frame image is determined, whether the change rate of the target area image corresponding to each video frame image after the first video frame image is larger than or equal to a second preset threshold value or not is calculated and judged in sequence.
And if the change rate of the target area image corresponding to the video frame image after the first video frame image is greater than or equal to a second preset threshold, determining the video frame image with the change rate of the target area image greater than or equal to the second preset threshold as a second video frame image.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an electronic device in a fourth embodiment of the present invention, as shown in fig. 10, including a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, where the processor 1001, the communication interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004;
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
the acquisition module is used for acquiring a target video file; the target video file comprises a video file obtained after recording a page of a target application program between a first time point and a second time point, wherein the first time point is positioned before a time point corresponding to the sample video file played by clicking, and the second time point is positioned after a time point corresponding to the start of playing the sample video file;
determining a playing area corresponding to a page of a target application program in a target video file, and determining target area images respectively corresponding to video frame images included in the target video file according to the playing area;
determining a first video frame image when a page of a target application program jumps to a playing page and a second video frame image when a sample video file starts to play from the video frame images according to the change rate of a target area image corresponding to the video frame images;
and calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image so as to determine the starting time of the target application program.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, which when executed on a computer, cause the computer to perform the method of any of the above embodiments.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A broadcast time testing method is characterized by comprising the following steps:
acquiring a target video file; the target video file is obtained after recording a page of a target application program between a first time point and a second time point, wherein the first time point is located before a time point corresponding to a sample video file played by clicking, and the second time point is located after a time point corresponding to the start of playing of the sample video file;
determining a playing area corresponding to a page of the target application program in the target video file, and determining target area images respectively corresponding to video frame images included in the target video file according to the playing area;
determining a first video frame image when a page of the target application program jumps to a playing page and a second video frame image when the sample video file starts to play from the video frame images according to the change rate of the target area image corresponding to the video frame images;
and calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image so as to determine the broadcasting time of the target application program.
2. The method of claim 1, wherein the determining the playing area corresponding to the page of the target application in the target video file comprises:
determining a foreground mask image corresponding to the target video file;
carrying out binarization on the foreground mask image according to a first preset threshold value;
dividing the binarized foreground mask image into a plurality of first regions along a first direction;
determining a first foreground area and/or a first background area in each first area according to a second preset threshold;
determining a plurality of continuous first foreground areas as first target areas;
and determining the playing area according to at least one first target area.
3. The method of claim 2, wherein the determining the playing area according to the at least one first target area comprises:
and taking the first target area with the largest area in at least one first target area as the playing area.
4. The method of claim 2, further comprising:
dividing the binarized foreground mask image into a plurality of second regions along a second direction, wherein the first direction and the second direction are two directions which are vertical to each other;
determining a second foreground area and/or a second background area in each second area according to the second preset threshold;
determining a plurality of continuous second foreground areas as second target areas;
the determining the playing area according to at least one of the first target areas includes:
and determining the playing area according to at least one first target area and at least one second target area.
5. The method of claim 4, wherein determining the playback zone based on the at least one first target zone and the at least one second target zone comprises:
determining a first target area with the largest area in at least one first target area and a second target area with the largest area in at least one second target area;
and taking the area of the intersection between the first target area with the maximum area and the second target area with the maximum area as the playing area.
6. The method according to claim 1, wherein the determining, from the video frame images, a first video frame image when the page of the target application program jumps to a playing page and a second video frame image when the sample video file starts to play according to the change rate of the target area image corresponding to the video frame image comprises:
sequentially calculating the change rate of the target area image corresponding to each video frame image from a second video frame image in the target video file, and sequentially judging whether the change rate of the target area image corresponding to each video frame image obtained by calculation is greater than or equal to a first preset threshold value;
if the change rate of the target area image corresponding to the video frame image is greater than or equal to the first preset threshold, determining that the video frame image of which the change rate of the target area image is greater than or equal to the first preset threshold is the first video frame image;
after the first video frame image is determined, sequentially calculating and judging whether the change rate of a target area image corresponding to each video frame image behind the first video frame image is larger than or equal to a second preset threshold value or not;
if the change rate of the target area image corresponding to the video frame image after the first video frame image is greater than or equal to the second preset threshold, determining that the video frame image of which the change rate of the target area image is greater than or equal to the second preset threshold is the second video frame image.
7. The method according to claim 1, wherein the determining, according to the playing area, target area images respectively corresponding to video frame images included in the target video file comprises:
and according to the playing area, clipping each video frame image to obtain the target area image corresponding to each video frame image.
8. A play time testing apparatus, comprising:
the acquisition module is used for acquiring a target video file; the target video file is obtained after recording a page of a target application program between a first time point and a second time point, wherein the first time point is located before a time point corresponding to a sample video file played by clicking, and the second time point is located after a time point corresponding to the start of playing of the sample video file;
the first determining module is used for determining a playing area corresponding to a page of the target application program in the target video file and determining target area images respectively corresponding to video frame images included in the target video file according to the playing area;
a second determining module, configured to determine, according to a change rate of the target area image corresponding to the video frame image, a first video frame image when a page of the target application program jumps to a playing page and a second video frame image when the sample video file starts to be played from the video frame image;
and the calculating module is used for calculating the time difference between the time point corresponding to the second video frame image and the time point corresponding to the first video frame image so as to determine the starting time of the target application program.
9. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the computer program stored on the memory, implementing the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201911419500.8A 2019-12-31 2019-12-31 Broadcast time testing method and device and computer readable storage medium Pending CN111131812A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911419500.8A CN111131812A (en) 2019-12-31 2019-12-31 Broadcast time testing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911419500.8A CN111131812A (en) 2019-12-31 2019-12-31 Broadcast time testing method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111131812A true CN111131812A (en) 2020-05-08

Family

ID=70507359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911419500.8A Pending CN111131812A (en) 2019-12-31 2019-12-31 Broadcast time testing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111131812A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111859019A (en) * 2020-07-17 2020-10-30 腾讯音乐娱乐科技(深圳)有限公司 Method for acquiring page switching response time and related equipment
CN113778825A (en) * 2021-08-24 2021-12-10 北京达佳互联信息技术有限公司 Method and device for determining page index parameters, storage medium and electronic equipment
CN114827712A (en) * 2021-01-18 2022-07-29 中国移动通信有限公司研究院 Video playing detection method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080177994A1 (en) * 2003-01-12 2008-07-24 Yaron Mayer System and method for improving the efficiency, comfort, and/or reliability in Operating Systems, such as for example Windows
CN107870856A (en) * 2016-09-28 2018-04-03 广州市动景计算机科技有限公司 Video playback starting duration method of testing, device and electric terminal
CN108093246A (en) * 2017-11-21 2018-05-29 青岛海信电器股份有限公司 A kind of recognition methods of top box of digital machine video playback area and device
CN108111914A (en) * 2016-11-24 2018-06-01 广州市动景计算机科技有限公司 Video playback area recognition methods, device and apparatus for media playing
CN109785386A (en) * 2017-11-14 2019-05-21 中国电信股份有限公司 Object identification localization method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080177994A1 (en) * 2003-01-12 2008-07-24 Yaron Mayer System and method for improving the efficiency, comfort, and/or reliability in Operating Systems, such as for example Windows
CN107870856A (en) * 2016-09-28 2018-04-03 广州市动景计算机科技有限公司 Video playback starting duration method of testing, device and electric terminal
CN108111914A (en) * 2016-11-24 2018-06-01 广州市动景计算机科技有限公司 Video playback area recognition methods, device and apparatus for media playing
CN109785386A (en) * 2017-11-14 2019-05-21 中国电信股份有限公司 Object identification localization method and device
CN108093246A (en) * 2017-11-21 2018-05-29 青岛海信电器股份有限公司 A kind of recognition methods of top box of digital machine video playback area and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111859019A (en) * 2020-07-17 2020-10-30 腾讯音乐娱乐科技(深圳)有限公司 Method for acquiring page switching response time and related equipment
CN114827712A (en) * 2021-01-18 2022-07-29 中国移动通信有限公司研究院 Video playing detection method and device and electronic equipment
CN113778825A (en) * 2021-08-24 2021-12-10 北京达佳互联信息技术有限公司 Method and device for determining page index parameters, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN108769776B (en) Title subtitle detection method and device and electronic equipment
CN111131812A (en) Broadcast time testing method and device and computer readable storage medium
CN108495185B (en) Video title generation method and device
CN111698553B (en) Video processing method and device, electronic equipment and readable storage medium
CN111193965B (en) Video playing method, video processing method and device
CN110691259A (en) Video playing method, system, device, electronic equipment and storage medium
CN108737885A (en) A kind of analysis Online Video plays the method and device of interim card
CN110996154A (en) Video playing method and device and electronic equipment
CN110827245A (en) Method and equipment for detecting screen display disconnection
CN111401238A (en) Method and device for detecting character close-up segments in video
CN110781427A (en) Method, device, equipment and storage medium for calculating first screen time
CN109168044B (en) Method and device for determining video characteristics
CN111046230A (en) Content recommendation method and device, electronic equipment and storable medium
CN110324707B (en) Video playing time consumption testing method and device
CN112995765B (en) Network resource display method and device
CN113014993B (en) Picture display method, device, equipment and storage medium
CN112055258B (en) Time delay testing method and device for loading live broadcast picture, electronic equipment and storage medium
CN110569097B (en) Information display method and device
CN111698548B (en) Video playing method and device
CN115904883A (en) RPA flow execution visualization abnormity monitoring method, device and medium
CN113886273A (en) Performance test method, device, test equipment and medium of application program
US11463493B2 (en) Method and apparatus for playing media file
CN114490215A (en) Stuck detection method, detection device and computer readable storage medium
CN113886272A (en) Performance test method, system and device of application program and test equipment
CN113961526A (en) Method and device for detecting screen shot picture

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508