[go: up one dir, main page]

CN108882019B - Video playing test method, electronic equipment and system - Google Patents

Video playing test method, electronic equipment and system Download PDF

Info

Publication number
CN108882019B
CN108882019B CN201710322491.5A CN201710322491A CN108882019B CN 108882019 B CN108882019 B CN 108882019B CN 201710322491 A CN201710322491 A CN 201710322491A CN 108882019 B CN108882019 B CN 108882019B
Authority
CN
China
Prior art keywords
target
video
time
image
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710322491.5A
Other languages
Chinese (zh)
Other versions
CN108882019A (en
Inventor
年奇东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710322491.5A priority Critical patent/CN108882019B/en
Publication of CN108882019A publication Critical patent/CN108882019A/en
Application granted granted Critical
Publication of CN108882019B publication Critical patent/CN108882019B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a video playing test method, which comprises the following steps: triggering a target video to start playing; the initial playing content of the target video comprises target characteristics; sequentially acquiring images displayed on a screen according to a time sequence, and sequentially identifying the images according to the acquisition sequence by an image identification technology; and under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the target image is displayed on the screen according to the time when the target video is triggered to start playing to the time when the target image is displayed on the screen. The invention also discloses electronic equipment and a system, and solves the technical problems that in the prior art, the time consumption is very long and the testing efficiency is low when the image of the first frame of the video is found manually.

Description

Video playing test method, electronic equipment and system
Technical Field
The present invention relates to the field of computers, and in particular, to a video playing test method, an electronic device, and a video playing test system.
Background
The internet is increasingly powerful, and the number of net citizens is increasing, which is accompanied by the arrival of the internet public age. People's demand for the internet does not need to browse web pages and view news singly, but provides diversified application demands. With the increasing development of electronic communication technology, the network bandwidth is larger and larger, and online movie and television, remote office, network television, online live broadcast and the like are more and more concerned and favored by people.
People can watch videos by installing various video Applications (APPs), video software or browsers on intelligent electronic devices. The time consumed between the start of clicking a play button and the appearance of a video frame when a video play page is opened in a browser or video software can be referred to as the first frame time consumed. The time consumed by the first frame is the first ever-looking feeling and experience of people watching videos, and is one of the items of the intensive tests of developers.
In the prior art, the image of the first frame of the video is often found manually, however, the time for the first frame to appear is indefinite due to the influence of factors such as network and the like, the first frame of the video is often tested for many times (more than 10 times), and the requirement of the test can be met only when the number of the tested images reaches 50-100. The manual work needs to find a specific picture in 100 pictures, the action needs to be repeated for many times in the test, time is consumed, the operation is repetitive, and the test efficiency is low.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a video playing test method, an electronic device, and a video playing test system, so as to solve the technical problems in the prior art that it takes time to manually search for an image of a first frame of a video, and the test efficiency is low.
In order to solve the above technical problem, a first aspect of an embodiment of the present invention discloses a video playing test method, including:
entering a target interface, and triggering a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics;
sequentially acquiring images displayed on a screen according to a time sequence, and sequentially identifying the images according to the acquisition sequence by an image identification technology;
and under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image.
With reference to the first aspect, in a first possible implementation manner, the acquiring images displayed on the screen sequentially according to time sequence includes:
sequentially acquiring N images displayed on a screen according to a time sequence, wherein N is a positive integer greater than 0;
and stopping playing the target video, and re-executing the step of entering the target interface.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the acquiring, in order of time, N images displayed on a screen includes:
triggering a screenshot program to screenshot the content displayed on the screen according to a preset screenshot interval;
and acquiring and storing the N images of the screenshot.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner, the sequentially acquiring, according to a time sequence, N images displayed on a screen includes:
triggering a video recording program to record the video of the content displayed on the screen;
and performing frame division processing on the recorded video, and acquiring and storing the first N frames of images of the recorded video.
With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner, after the sequentially identifying the images according to the acquisition order by using an image identification technology, the method further includes:
and in the case that the target feature is identified to appear in the target image, or in the case that the target feature is not identified in any of the N images, re-executing the step of entering the target interface.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner, the method further includes:
and under the condition that the number of the time lengths required from the triggering of the target video to the display of the first video frame of the target video on the screen is calculated in an accumulated manner to reach a preset threshold value, averaging all the calculated time lengths to obtain a time length result.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, or the fourth possible implementation manner of the first aspect, or the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner, the file name of the image includes timestamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
the calculating a time length required by the target video from the moment when the target video is triggered to start playing to the moment when the screen displays the target image according to the moment when the target video is triggered to start playing to the moment when the screen displays the target image includes:
subtracting the T0 from the T1 to obtain the time length required by the target video from the time of being triggered to play to the time when the screen displays the first video frame of the target video.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, or the third possible implementation manner of the first aspect, or the fourth possible implementation manner of the first aspect, or the fifth possible implementation manner of the first aspect, in a seventh possible implementation manner, the sequentially identifying, by an image identification technology, the images according to an acquisition order includes:
clipping each image to clip a video playing area displayed on a screen;
and identifying the video playing area through an image identification technology so as to identify whether target characteristics appear.
A second aspect of an embodiment of the present invention discloses an electronic device, including:
the trigger module is used for entering a target interface and triggering a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics;
the image acquisition module is used for sequentially acquiring images displayed on a screen according to a time sequence;
the first image identification module is used for sequentially identifying the images according to the acquisition sequence by an image identification technology;
and the first time length calculating module is used for calculating the time length required by the target video from the time of starting playing from being triggered to the time of displaying the first video frame of the target video on the screen according to the time of starting playing of the target video from being triggered to the time of displaying the target image on the screen under the condition of identifying the target feature in the target image.
With reference to the second aspect, in a first possible implementation manner, the image obtaining module includes:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for sequentially acquiring N images displayed on a screen according to a time sequence, and N is a positive integer greater than 0;
and the return stopping unit is used for stopping playing the target video and re-executing the step of entering the target interface.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the obtaining unit includes:
the screen capture unit is used for triggering a screen capture program to capture the screen of the content displayed on the screen according to a preset screen capture interval;
and the acquisition and storage unit is used for acquiring and storing the N images of the screenshot.
With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner, the obtaining unit includes:
the recording unit is used for triggering a video recording program to record the video of the content displayed on the screen;
and the framing processing unit is used for framing the recorded video and acquiring and storing the first N frames of images of the recorded video.
With reference to the first possible implementation manner of the second aspect, in a fourth possible implementation manner, the method further includes:
and the re-triggering module is used for re-triggering the triggering module to execute the step of entering the target interface under the condition that the target characteristics appear in the target image or the target characteristics are not identified in the N images after the first image identification module sequentially identifies the images according to the acquisition sequence through an image identification technology.
With reference to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner, the method further includes:
the first average calculation module is used for averaging all calculated time lengths to obtain a time length result under the condition that the number of the time lengths required by the target video from the time when the target video is triggered to start playing to the time when the first video frame of the target video is displayed on the screen reaches a preset threshold value is calculated in an accumulated mode.
With reference to the second aspect, or the first possible implementation manner of the second aspect, or the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, or the fourth possible implementation manner of the second aspect, or the fifth possible implementation manner of the second aspect, in a sixth possible implementation manner, the file name of the image includes timestamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
the first time length calculating module is specifically configured to subtract the T0 from the T1 to obtain a time length required by the target video from being triggered to start playing to the time when the screen displays the first video frame of the target video.
With reference to the second aspect, or the first possible implementation manner of the second aspect, or the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, or the fourth possible implementation manner of the second aspect, or the fifth possible implementation manner of the second aspect, in a seventh possible implementation manner, the first image recognition module includes:
the first clipping unit is used for clipping each image to clip a video playing area displayed on a screen;
and the first identification unit is used for identifying the video playing area through an image identification technology so as to identify whether the target characteristic appears.
The third aspect of the embodiments of the present invention discloses an electronic device, including:
the image receiving module is used for receiving an image sent by external equipment; the image is the image which is displayed on a screen and is sequentially obtained according to the time sequence after the external equipment enters a target interface and triggers a target video to start playing on the target interface, wherein the initial playing content of the target video comprises target characteristics;
the second image identification module is used for sequentially identifying the images according to the acquisition sequence by an image identification technology;
and the second duration calculation module is used for calculating the duration required by the target video from the time when the target video is triggered to start playing to the time when the first video frame of the target video is displayed on the screen according to the time when the target video is triggered to start playing to the time when the target image is displayed on the screen under the condition that the second image recognition module recognizes that the target feature appears in the target image.
With reference to the third aspect, in a first possible implementation manner, the images received by the image receiving module include N images, where N is a positive integer greater than 0;
the electronic equipment further comprises a re-triggering playing module, which is used for re-triggering the external equipment to execute the step of entering the target interface under the condition that the target characteristics appear in the target image or the target characteristics are not identified in the N images after the second image identification module sequentially identifies the images according to the acquisition sequence through the image identification technology.
With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner, the method further includes:
and the second average calculation module is used for averaging all calculated time lengths to obtain a time length result under the condition that the number of the time lengths required by the target video from the time when the target video is triggered to start playing to the time when the first video frame of the target video is displayed on the screen reaches a preset threshold value is calculated in an accumulated mode.
With reference to the third aspect, or the first possible implementation manner of the third aspect, or the second possible implementation manner of the third aspect, in a third possible implementation manner, the file name of the image includes timestamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
the second duration calculating module is specifically configured to subtract the T0 from the T1 to obtain a duration required by the target video from being triggered to start playing to the screen displaying the first video frame of the target video.
With reference to the third aspect, or the first possible implementation manner of the third aspect, or the second possible implementation manner of the third aspect, in a fourth possible implementation manner, the second image recognition module includes:
the second clipping unit is used for clipping each image to clip a video playing area displayed on a screen;
and the second identification unit is used for identifying the video playing area through an image identification technology so as to identify whether the target characteristics appear.
A fourth aspect of the embodiments of the present invention discloses an electronic device, including a memory and a processor, where the memory is configured to store a plurality of video playing test instructions, and the processor is configured to load the video playing test instructions and execute:
entering a target interface, and triggering a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics;
sequentially acquiring images displayed on a screen according to a time sequence, and sequentially identifying the images according to the acquisition sequence by an image identification technology;
and under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image.
With reference to the fourth aspect, in a first possible implementation manner, the processor loads the video playing test instruction to further execute steps of implementing the method in the first possible implementation manner, or the second possible implementation manner, or the third possible implementation manner, or the fourth possible implementation manner, or the fifth possible implementation manner, or the seventh possible implementation manner of the first aspect.
The fifth aspect of the embodiments of the present invention discloses an electronic device, including a memory and a processor, where the memory is configured to store a plurality of video playing test instructions, and the processor is configured to load the video playing test instructions and execute:
receiving an image sent by an external device; the image is the image which is displayed on a screen and is sequentially obtained according to the time sequence after the external equipment enters a target interface and triggers a target video to start playing on the target interface, wherein the initial playing content of the target video comprises target characteristics;
sequentially identifying the images according to the acquisition sequence by an image identification technology;
and under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image.
With reference to the fifth aspect, in a first possible implementation manner, the images received by the image receiving module include N images, where N is a positive integer greater than 0;
the processor loads the video playing test instruction to further execute: and after the images are sequentially identified according to the acquisition sequence by an image identification technology, under the condition that the target features appear in the target images or under the condition that the target features are not identified in the N images, triggering the external equipment to execute the step of entering the target interface again.
With reference to the fifth aspect or the first possible implementation manner of the fifth aspect, in a second possible implementation manner, the file name of the image includes timestamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
specifically, the calculating, by the processor, a time period required by the target video to start playing from being triggered to the screen displaying the first video frame of the target video includes subtracting the T0 from the T1 to obtain a time period required by the target video to start playing from being triggered to the screen displaying the first video frame of the target video.
With reference to the fifth aspect or the first possible implementation manner of the fifth aspect, in a third possible implementation manner, the sequentially recognizing, by the processor, the images according to the acquisition order through an image recognition technology specifically includes: clipping each image to clip a video playing area displayed on a screen; and identifying the video playing area through an image identification technology so as to identify whether target characteristics appear.
The sixth aspect of the present invention discloses a video playing test system, including:
the system comprises a first electronic device and a second electronic device, wherein;
the first electronic equipment enters a target interface and triggers a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics; the first electronic equipment sequentially acquires images displayed on a screen according to a time sequence and sends the acquired images to the second electronic equipment;
the second electronic equipment receives the images sent by the external equipment and sequentially identifies the images according to the acquisition sequence by an image identification technology; and under the condition that the image recognition module recognizes that the target feature appears in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image.
With reference to the sixth aspect, in a first possible implementation manner, the second electronic device is the electronic device in the above fifth aspect, or the first possible implementation manner of the fifth aspect, or the second possible implementation manner of the fifth aspect, or the third possible implementation manner of the fifth aspect.
With reference to the sixth aspect, in a second possible implementation manner, the first electronic device includes a first memory and a first processor, where the first memory is configured to store a plurality of video playback test instructions, and the first processor is configured to load the video playback test instructions and execute:
entering a target interface, triggering a target video to start playing on the target interface, and sequentially acquiring N images displayed on a screen according to a time sequence, wherein N is a positive integer greater than 0;
and stopping playing the target video, and re-executing the step of entering the target interface.
With reference to the second possible implementation manner of the sixth aspect, in a third possible implementation manner, the acquiring, by the first processor, N images displayed on the screen sequentially in time sequence specifically includes: triggering a screenshot program to screenshot the content displayed on the screen according to a preset screenshot interval; and acquiring and storing the N images of the screenshot.
With reference to the second possible implementation manner of the sixth aspect, in a fourth possible implementation manner, the acquiring, by the first processor, N images displayed on the screen sequentially in time sequence specifically includes: triggering a video recording program to record the video of the content displayed on the screen; and performing frame division processing on the recorded video, and acquiring and storing the first N frames of images of the recorded video.
By implementing the embodiment of the invention, the images are sequentially identified according to the acquisition sequence by the image identification technology. Under the condition that the target characteristics appear in the target image, calculating the time length (namely the time consumed by the first frame) required by the target video from the moment that the target video is triggered to start playing to the moment that the screen displays the target image according to the moment that the target video is triggered to start playing, so as to automatically find out the first frame of the video and calculate the time consumed by the first frame; the technical problems that time is consumed for finding the image of the first frame of the video through manual work and the testing efficiency is low in the prior art are solved, especially when multiple APPs or video software or browsers need to be tested for multiple times, repetitive operations are greatly reduced, and the testing efficiency is improved.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a video playing test system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another architecture of a video playback testing system according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a video playing test method according to an embodiment of the present invention;
fig. 4 is a schematic view of a scene interface for triggering play according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a video playing test method according to another embodiment of the present invention;
fig. 6 is a scene schematic diagram of a live video provided by an embodiment of the present invention;
FIG. 7 is a schematic diagram of cropping an image according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of an image acquisition module according to an embodiment of the present invention;
FIG. 10 is a schematic structural diagram of another embodiment of an electronic device provided in the present invention;
FIG. 11 is a schematic structural diagram of another embodiment of an electronic device provided in the present invention;
FIG. 12 is a schematic structural diagram of another embodiment of an electronic device provided in the present invention;
FIG. 13 is a schematic structural diagram of another embodiment of an electronic device provided in the present invention;
fig. 14 is a schematic structural diagram of another embodiment of the electronic device provided in the present invention.
Detailed Description
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.
As shown in fig. 1, the video playing test system according to the embodiment of the present invention may include a first electronic device and a second electronic device, where a user may view a target video through a video APP, video software, or a browser installed on the first electronic device, then send an acquired image displayed on a screen to the second electronic device, automatically identify the image through the second electronic device, find out a first frame of the target video, and then calculate time consumed by the first frame.
It should be noted that the target video in the embodiment of the present invention is a video including a target feature, the target video may be a video generated by a technical developer or a tester, and the target feature is a feature specific to the target video, such as a special pattern or pattern, or a special number or letter, and the like. The target video can be placed in a network server, and the first electronic equipment plays and watches the target video through the Internet; the target video can also be downloaded locally for the first electronic device to play and watch.
The target video in the embodiment of the invention can be a certain video which is recorded or designated in advance, and can also be a live video which is recorded in a live way. Taking a live video scene as an example, as shown in fig. 2, another schematic view of an architecture of a video playing test system provided in the embodiment of the present invention is that the video playing test system may include a first electronic device, a second electronic device, and a third electronic device, a live user may initiate live broadcast through the third electronic device, and send live broadcast content to the first electronic device through a network server, and a spectator user may watch live broadcast video in real time after clicking and playing through the first electronic device, and then send the obtained image displayed on a screen to the second electronic device, and automatically identify the image through the second electronic device, find out a video first frame of a target video, and then calculate time consumed by the first frame.
It should be noted that, in the video playing test method according to the embodiment of the present invention, the step of identifying the image may also be completed by the first electronic device itself, that is, the image may not need to be sent to the second electronic device for image identification. The connection between the first electronic device and the second electronic device in the embodiment of the present invention may be established through wired or wireless communication connection.
It should be further noted that the electronic devices (including the first electronic device, the second electronic device, or the third electronic device) in the embodiments of the present invention may include, but are not limited to, a Personal computer, an intelligent mobile terminal (e.g., a mobile phone, a mobile computer, a tablet computer), a Personal Digital Assistant (PDA), a smart television, a smart watch, smart glasses, a smart bracelet, and other electronic devices or terminals. For example, in a mobile video live broadcast scene, the first electronic device may be an intelligent mobile terminal with a display screen to watch a video live broadcast, such as a smart phone; the third electronic equipment can be an intelligent mobile terminal with a video recording function so as to record video and initiate live broadcast; the second electronic device may be a personal computer or the like that establishes a connection with the first electronic device.
With reference to the flow diagram of the video playing test method provided by the embodiment of the present invention shown in fig. 3, how to implement the video playing test is described below, including the following steps:
step S300: entering a target interface, and triggering a target video to start playing on the target interface;
specifically, the starting playing content of the target video includes target features; as shown in fig. 4, in the scene interface schematic diagram for triggering play provided in the embodiment of the present invention, when a user wants to watch a target video through a video APP, video software, or a browser installed on a first electronic device, the user first enters the video play interface or the video play page of fig. 4 and displays a play button. And when the user clicks the play button, the first electronic device triggers the target video to start playing after receiving an instruction of the user for clicking the play button.
It should be noted that the target interface in the embodiment of the present invention may include a video playing interface or a video playing page on which a playing button is displayed, or may also be a certain page in the video APP, the video software, or the browser, as long as the target video can be directly started to start playing through the certain page, which is not limited in the present invention.
Step S302: sequentially acquiring images displayed on a screen according to a time sequence, and sequentially identifying the images according to the acquisition sequence by an image identification technology;
specifically, the first electronic device acquires images displayed on a screen of the first electronic device in a time sequence from a moment when the target video is triggered to start playing. The method for acquiring the image can comprise triggering a screenshot program to screenshot the content displayed on the screen according to a preset screenshot interval, or triggering a video recording program to record the content displayed on the screen, and then performing framing processing on the recorded video according to a time sequence, wherein each frame of image is the acquired image; and so on. Embodiments of the present invention are not limited to the manner in which images are acquired.
After the first electronic device acquires and stores the images, the images can be sequentially identified at the local end according to the acquisition sequence through an image identification technology, and the images can also be sent to a second electronic device, and the second electronic device sequentially identifies the images according to the acquisition sequence through the image identification technology; the image Recognition technology in the embodiments of the present invention may include Optical Character Recognition (OCR), etc., and the embodiments of the present invention are not limited thereto.
Step S304: and under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image.
Specifically, image recognition is sequentially performed according to the sequence of the acquired images, that is, a first acquired image is recognized according to a time sequence, and if the first image has no target feature, recognition of a next image is continued until an image with the target feature is recognized, where the image with the target feature is the target image in the embodiment of the present invention. It can be understood that, the first electronic device starts timing before the step of triggering the target video to start playing or at the same time of triggering the target video to start playing, and records the time T0 when the target video is triggered to start playing and the time T1 when the screen displays the target image, then the time required by the target video from being triggered to start playing to the first video frame of the screen display target video, that is, the time consumed by the first frame, can be calculated by subtracting T0 from T1.
By implementing the embodiment of the invention, the images are sequentially identified according to the acquisition sequence by the image identification technology. Under the condition that the target characteristics appear in the target image, calculating the time length (namely the time consumed by the first frame) required by the target video from the moment that the target video is triggered to start playing to the moment that the screen displays the target image according to the moment that the target video is triggered to start playing, so as to automatically find out the first frame of the video and calculate the time consumed by the first frame; the technical problems that time is consumed for finding the image of the first frame of the video through manual work and the testing efficiency is low in the prior art are solved, especially when multiple APPs or video software or browsers need to be tested for multiple times, repetitive operations are greatly reduced, and the testing efficiency is improved.
With reference to the flowchart of fig. 5, which illustrates another embodiment of the video playing testing method provided by the present invention, the video playing testing method provided by the embodiment of the present invention is described in detail by taking a live video testing scenario as an example and taking a first electronic device, a second electronic device, and a third electronic device as an architecture, and includes the following steps:
step S500: the first electronic equipment initializes an empty result list;
specifically, the first electronic device is a device for watching a live video, and an empty result list is initialized at the beginning of the program for storing valid test results.
Step S502: the method comprises the steps that first electronic equipment enters a target interface and triggers a target video to start playing on the target interface;
specifically, before triggering the target video to start playing, the first electronic device may first obtain Uniform Resource Locator (URL) information of a live video, and then enter a live video interface (corresponding to the target interface) through the URL; or the user can log in a live system or platform and then enter a video live interface (relative to a target interface) of a live room. Understandably, a play button is displayed in the video live interface. And when the user clicks the play button, the first electronic device triggers the target video to start playing after receiving an instruction of the user for clicking the play button.
Specifically, the first electronic device may record a command called play, which is used for playing a video, in advance by using a record tool, where the command is an adb shell/data/local/tmp/record play cmd and is equivalent to a script for triggering a target video to start playing, and then the command may be run to automatically trigger the target video to start playing without a user clicking a play button, so that labor force is further released, and workload of a tester is reduced.
Step S504: the method comprises the steps that a first electronic device receives a live target video sent by a third electronic device through the Internet;
specifically, after the first electronic device triggers the target video to start playing, a live target video sent by a third electronic device may be received through the internet, where the start playing content of the target video includes a target feature, for example, as shown in fig. 6, which is a scene diagram of live video provided by the embodiment of the present invention, a developer or a tester may set live content information of the third electronic device, such as writing a HyperText Markup Language (HTML) page, where the HTML page includes the target feature, for example, a word 888888 in fig. 6. The developer or tester may also set the camera of the third electronic device to be always directed to the live test content, such as a piece of paper printed with 888888, etc. The embodiment of the present invention is not limited, as long as the initial playing content of the target video, in which the third electronic device initiates the live broadcast, includes the target feature.
Step S506: the method comprises the steps that a first electronic device triggers a screenshot program to screenshot contents displayed on a screen according to a preset screenshot interval, and N images of the screenshot are obtained and stored;
specifically, N in the embodiment of the present invention is a positive integer greater than 0; the first electronic device can be pre-installed or imported with screenshot tools, such as a vcapex tool and a record tool, and after triggering the target video to start playing, the first electronic device can trigger a screenshot program to screenshot the content displayed on the screen according to a preset screenshot interval, and acquire and store the N images of the screenshot. For example, the following commands are executed:
adb shell/data/local/tmp/vcapex-c 100 -x 0 -y 0 -w 1080 -h 1920 -r 0.2 -s 66 -cmd playcmd
wherein c 100 represents 100 images of the screenshot, i.e. N may be equal to 100; x, y, w, h represent the region of the screenshot; r 0.2 represents a 20% reduction in the screen shot scale; s 66 represents the time interval of the screenshot being 66 milliseconds; the planecmd is the name of the operation of playing the video made before the video test starts.
It should be noted that step S506 and step S504 may be executed simultaneously; after the first electronic device executes the screenshot program, a return value is obtained, that is, the timestamp T0 for triggering the playing of the target video is obtained.
It should be further noted that, in step S506 in the embodiment of the present invention, a screenshot is taken as an example to obtain N images sequentially obtained in time sequence, and a screenshot program is triggered to capture the content displayed on the screen according to a preset screenshot interval, so that the images displayed on the screen can be quickly and conveniently obtained, and the implementation cost is low and the implementation effect is good. The embodiment of the invention can also record the video of the content displayed on the screen by triggering the video recording program, then perform framing processing on the recorded video (each framing represents an image), and acquire and store the first N frames of images of the recorded video.
Step S508: the first electronic device stops playing the target video and re-executes step S502;
specifically, after acquiring N images displayed on the screen in sequence according to the time sequence, the first electronic device stops playing the current target video, and then re-executes step S502, that is, displays the play button interface as shown in fig. 4, to prepare for the next test.
Step S510: the first electronic equipment sends the acquired and stored N images to the second electronic equipment;
specifically, after the first electronic device sends the N images to the second electronic device, the N stored images may be deleted; it is understood that the N images sent by the first electronic device may also carry the timestamp T0 that triggers the playing of the target video.
Step S512: the second electronic equipment receives the N images sent by the first electronic equipment;
step S514: the second electronic equipment sequentially identifies the N images according to the acquisition sequence through an image identification technology;
specifically, the second electronic device may crop each image to crop a video playing area displayed on the screen, and then identify the video playing area through an image identification technology to identify whether the target feature appears. As shown in fig. 7, which is a schematic diagram of the principle of cropping an image according to the embodiment of the present invention, the second electronic device can crop and identify the region for playing the target video alone, so as to remove other content information irrelevant to the target video in the display screen, thereby greatly improving the efficiency of image identification.
Step S516: under the condition that the target feature appears in the target image, acquiring the file name of the target image, obtaining a timestamp T1 when the target image is displayed on a screen, subtracting T0 from T1, and calculating the time length required by the target video from being triggered to play to the time when the first video frame of the target video is displayed on the screen;
specifically, when the screenshot program in the embodiment of the present invention names a file of the image after screenshot, the image may be named by using timestamp information, that is, the file name of the image includes the timestamp information, for example, the file name of the target image is 1482390273939.png, and 1482390273939 is the timestamp information T1. And the second electronic equipment subtracts the timestamp T0 of the target video triggered to be played, which is obtained before, from the T1, so that the time length required by the target video from the time when the target video is triggered to be played to the time when the first video frame of the target video is displayed on the screen can be calculated, and the time consumed by the first frame of the test can be obtained.
Step S518: the second electronic equipment sends the first result information to the first electronic equipment;
specifically, the first result information in the embodiment of the present invention may be the duration calculated in step S516, or may also be a specific identifier to represent that the second electronic device recognizes the target feature in the video test, and calculate the time consumed by the first frame of this time.
Step S520: under the condition that the target features are not recognized in the N images, the second electronic equipment sends second result information to the first electronic equipment;
specifically, the second result information may be another specific identifier to represent that the second electronic device does not recognize the target feature in the current video test, and the time consumed by the first frame of the current time cannot be calculated, that is, the current test is invalid.
Step S522: the first electronic equipment receives the second calculation result information;
specifically, the first electronic device receives the second calculation result information, analyzes the second calculation result information to know that the second electronic device does not identify the target feature in the video test, and continues to execute step S502 after the time consumed by the first frame of the current time is not calculated.
Step S524: after receiving the first calculation result information, the first electronic equipment updates a result list according to the calculation result information;
specifically, the first calculation result information is the test result, and if the first calculation result information is the time length calculated in step S516, the first electronic device may accumulate and store the time length in the result list. If the first calculation result information is only a certain specific identifier to represent that the second electronic device identifies the target feature in the video test, and the time consumed by the first frame of the current time is calculated, the first electronic device may accumulate the number of times or the number of the calculated time consumed by the first frame in the result list.
Step S526: the first electronic equipment judges whether the number of results in the result list is accumulated to a preset threshold value or not;
specifically, if the number of the accumulated results in the result list reaches the preset threshold, step S528 is executed, and if the number of the accumulated results in the result list does not reach the preset threshold, step S502 is triggered to be executed until the number of the accumulated results in the result list reaches the preset threshold. The preset threshold in the embodiment of the present invention may include 10, 15, and the like, and a developer or a tester may set the threshold according to actual situations or experience, which is not limited in the embodiment of the present invention.
Step S528: and averaging all the calculated time lengths to obtain a time length result.
Specifically, the execution of step S528 may be performed on the first electronic device or the second electronic device. That is, after obtaining the results (first frame elapsed time) of the preset threshold number, the first electronic device may average to calculate the final first frame elapsed time. The second electronic device may also calculate the result of the preset threshold number (the time consumption of the first frame), and then average the result to calculate the final time consumption of the first frame. By averaging, the time consumed by the first frame can be calculated more objectively and more accurately.
By implementing the embodiment of the invention, the images are sequentially identified according to the acquisition sequence by the image identification technology. Under the condition that the target characteristics appear in the target image, calculating the time length (namely the time consumed by the first frame) required by the target video from the moment that the target video is triggered to start playing to the moment that the screen displays the target image according to the moment that the target video is triggered to start playing, so as to automatically find out the first frame of the video and calculate the time consumed by the first frame; the technical problems that time is consumed for finding the image of the first frame of the video through manual work and the testing efficiency is low in the prior art are solved, especially when multiple APPs or video software or browsers need to be tested for multiple times, repetitive operations are greatly reduced, and the testing efficiency is improved.
In order to better implement the above scheme of the embodiment of the present invention, the present invention further provides an electronic device, which is described in detail below with reference to the accompanying drawings:
as shown in fig. 8, which is a schematic structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 80 may include a triggering module 800, an image obtaining module 802, a first image recognition module 804, and a first duration calculation module 806, wherein,
the triggering module 800 is configured to enter a target interface and trigger a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics;
the image obtaining module 802 is configured to sequentially obtain images displayed on a screen according to a time sequence;
the first image recognition module 804 is configured to sequentially recognize the images according to an acquisition order through an image recognition technology;
the first time length calculating module 806 is configured to, when the target feature appears in the target image, calculate a time length required by the target video from being triggered to start playing to the screen displaying a first video frame of the target video according to a time from the time when the target video is triggered to start playing to the time when the target image is displayed on the screen.
Specifically, as shown in fig. 9, which is a schematic structural diagram of an image capturing module provided by an embodiment of the present invention, the image capturing module 802 may include a capturing unit 8020 and a stopping and retracting unit 8022, wherein,
the acquiring unit 8020 is configured to sequentially acquire N images displayed on a screen in a time sequence, where N is a positive integer greater than 0;
the stop-and-go-back unit 8022 is used to stop playing the target video and re-trigger the trigger module 800 to enter the target interface.
The capture unit 8020 may further include a capture unit and a capture save unit, wherein,
the screen capture unit is used for triggering a screen capture program to capture the screen of the content displayed on the screen according to a preset screen capture interval;
and the acquisition and storage unit is used for acquiring and storing the N images of the screenshot.
Alternatively, the acquiring unit 8020 may further include a recording unit and a framing processing unit, wherein,
the recording unit is used for triggering a video recording program to record the video of the content displayed on the screen;
and the framing processing unit is used for framing the recorded video and acquiring and storing the first N frames of images of the recorded video.
Further, the first image recognition module 804 in the electronic device 80 may include a first cropping unit and a first recognition unit, wherein:
the first clipping unit is used for clipping each image to clip a video playing area displayed on a screen;
and the first identification unit is used for identifying the video playing area through an image identification technology so as to identify whether the target characteristic appears.
Still further, as shown in fig. 10, the electronic device 80 according to another embodiment of the present invention includes a triggering module 800, an image obtaining module 802, a first image recognizing module 804, a first time period calculating module 806, a re-triggering module 808, and a first average calculating module 8010, wherein,
the re-triggering module 808 is configured to, after the first image recognition module 804 sequentially recognizes the images according to the acquisition order through the image recognition technology, re-trigger the triggering module 800 to execute the step of entering the target interface when the target feature appears in the target image or when none of the N images recognizes the target feature.
The first average calculating module 8010 is configured to, when the number of the durations required from when the target video is triggered to be played to when the first video frame of the target video is displayed on the screen is accumulatively calculated and reaches a preset threshold, average all the calculated durations to obtain a duration result.
Specifically, the file name of the image in the embodiment of the present invention includes time stamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
the first time length calculating module 806 may be specifically configured to subtract the T0 from the T1 to obtain a time length required by the target video from being triggered to start playing to the time when the first video frame of the target video is displayed on the screen.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an electronic device according to another embodiment of the present invention. As shown in fig. 11, the electronic device 110 may include: at least one processor 1101, e.g., a CPU, at least one network interface 1104, a user interface 1103, a memory 1105, at least one communication bus 1102, a display screen 1106. Wherein a communication bus 1102 is used to enable connective communication between these components. The user interface 1103 may include a touch screen or the like, among others. The network interface 1104 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1105 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory), and the memory 1105 includes a flash in an embodiment of the present invention and stores a plurality of video playback test instructions. The memory 1105 may alternatively be at least one memory system located remotely from the processor 1101 as previously described. As shown in fig. 11, the memory 1105, which is a type of computer storage medium, may include an operating system, a network communication module, a user interface module, and video playback test instructions.
In the electronic device 110 shown in fig. 11, the processor 1101 may be configured to call up the video playback test instruction stored in the memory 1105 and perform the following operations:
entering a target interface, and triggering a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics;
sequentially acquiring images displayed on a display screen 1106 according to a time sequence, and sequentially identifying the images according to the acquisition sequence by an image identification technology;
under the condition that the target feature appears in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the display screen 1106 displays the target image, wherein the time length is from the time when the target video is triggered to start playing to the time when the display screen 1106 displays the first video frame of the target video.
Specifically, the processor 1101 sequentially acquiring the images displayed by the display screen 1106 in time sequence may include:
sequentially acquiring N images displayed on a display screen 1106 according to a time sequence, wherein N is a positive integer greater than 0;
and stopping playing the target video, and re-executing the step of entering the target interface.
Specifically, the processor 1101 sequentially acquiring N images displayed by the display screen 1106 in time sequence may include:
triggering a screenshot program to screenshot the content displayed on the display screen 1106 according to a preset screenshot interval;
and acquiring and storing the N images of the screenshot.
Specifically, the processor 1101 sequentially acquiring N images displayed by the display screen 1106 in time sequence may include:
triggering a video recording program to record the video of the content displayed on the display screen 1106;
and performing frame division processing on the recorded video, and acquiring and storing the first N frames of images of the recorded video.
Specifically, after the processor 1101 sequentially identifies the images in the acquisition order through the image identification technology, the following steps may be further performed:
and in the case that the target feature appears in the target image or the target feature is not recognized in the N images, re-executing the step of entering the target interface.
Specifically, the processor 1101 may further perform:
under the condition that the number of the time lengths required from the time when the target video is triggered to start playing to the time when the display screen 1106 displays the first video frame of the target video reaches a preset threshold value is calculated in an accumulated mode, averaging all the calculated time lengths to obtain a time length result.
Specifically, the file name of the image includes time stamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the display screen 1106 displays the target image comprises a time stamp T1;
the method for calculating the time length required by the target video to display the first video frame of the target video on the display screen 1106 from the time when the target video is triggered to start playing to the time when the display screen 1106 displays the target image by the processor 1101 includes:
subtracting the T0 from the T1 to obtain the time length required by the target video from being triggered to play to the display screen 1106 to display the first video frame of the target video.
Specifically, the processor 1101 sequentially identifying the images in the acquisition order by an image identification technique includes:
cropping each image to crop out the video playback area displayed on the display screen 1106;
and identifying the video playing area through an image identification technology so as to identify whether target characteristics appear.
It should be noted that, the electronic device 80 or the electronic device 110 in the embodiment of the present invention is a device that can sequentially recognize the images according to the acquisition sequence through an image recognition technology, and the functions of each module in the electronic device 80 or the electronic device 110 may refer to the specific implementation manner of any embodiment in fig. 1 to fig. 7 in each method embodiment, which is not described herein again. The electronic device 80 or the electronic device 110 may include, but is not limited to, a personal computer, a smart mobile terminal (e.g., a mobile phone, a mobile computer, a tablet computer), and the like.
In order to better implement the above scheme of the embodiment of the present invention, the present invention further provides another electronic device, which is described in detail below with reference to the accompanying drawings:
as shown in fig. 12, which is a schematic structural diagram of another embodiment of the electronic device provided by the present invention, the electronic device 120 may include an image receiving module 1200, and second image recognition modules 1202 and 1204, wherein,
the image receiving module 1200 is configured to receive an image sent by an external device; the image is the image which is displayed on a screen and is sequentially obtained according to the time sequence after the external equipment enters a target interface and triggers a target video to start playing on the target interface, wherein the initial playing content of the target video comprises target characteristics;
the second image recognition module 1202 is configured to sequentially recognize the images according to an acquisition order through an image recognition technology;
the second duration calculation module 1204 is configured to, when the second image recognition module 1202 recognizes that the target feature appears in the target image, calculate, according to a time from a time when the target video is triggered to start playing to a time when the target image is displayed on the screen, a duration required from when the target video is triggered to start playing to when the first video frame of the target video is displayed on the screen.
Specifically, the images received by the image receiving module 1200 include N images, where N is a positive integer greater than 0;
as shown in fig. 13, which is a schematic structural diagram of another embodiment of the electronic device provided by the present invention, the electronic device 120 may further include a retrigger playing module 1206 and a second average calculating module 1208, in addition to the image receiving module 1200, the second image recognition module 1202 and the second duration calculating module 1204, wherein,
and a retriggering and playing module 1206, configured to retrigger the external device to execute the step of entering the target interface when the target feature appears in the target image or when none of the N images identifies the target feature after the second image identifying module 1202 sequentially identifies the images in the acquiring order through the image identifying technology.
The second average calculating module 1208 is configured to, under the condition that the number of the durations required from the time when the target video is triggered to start playing to the time when the first video frame of the target video is displayed on the screen is accumulatively calculated and reaches a preset threshold, average all the calculated durations to obtain a duration result.
Specifically, the file name of the image includes time stamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
the second duration calculating module 1208 may be specifically configured to subtract the T0 from the T1 to obtain a duration required by the target video from being triggered to start playing to the first video frame of the target video displayed on the screen.
The second duration calculation module 1208 may further include a second cropping unit and a second identification unit, wherein,
the second clipping unit is used for clipping each image to clip a video playing area displayed on a screen;
and the second identification unit is used for identifying the video playing area through an image identification technology so as to identify whether the target characteristics appear.
Referring to fig. 14, fig. 14 is a schematic structural diagram of an electronic device according to another embodiment of the present invention. As shown in fig. 14, the electronic device 140 may include: at least one processor 1401, e.g. a CPU, at least one network interface 1404, a user interface 1403, a memory 1405, at least one communication bus 1402, a display 1406. The communication bus 1402 is used to realize connection communication between these components. The user interface 1403 may include a touch screen or the like, among others. The network interface 1404 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1405 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory, and the memory 1405 includes a flash memory for storing a plurality of video playback test instructions according to an embodiment of the present invention. Memory 1405 may alternatively be at least one memory system located remotely from processor 1401 as described above. As shown in fig. 14, the memory 1405, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a video playback test instruction.
In the electronic device 140 shown in fig. 14, the processor 1401 may be configured to invoke the video playback test instruction stored in the memory 1405 and perform the following operations:
receiving an image transmitted from an external device through the network interface 1404; the image is the image which is displayed on a screen and is sequentially obtained according to the time sequence after the external equipment enters a target interface and triggers a target video to start playing on the target interface, wherein the initial playing content of the target video comprises target characteristics;
sequentially identifying the images according to the acquisition sequence by an image identification technology;
and under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image.
Specifically, the images received by the image receiving module comprise N images, wherein N is a positive integer greater than 0;
the processor 1401 may further perform the step of re-triggering the external device to enter the target interface after sequentially recognizing the images in the acquisition order by the image recognition technique, in case the target feature is recognized to appear in the target image, or in case the target feature is not recognized in any of the N images.
Specifically, the processor 1401 may further perform averaging all the calculated time lengths to obtain a time length result, when the number of the time lengths required from the time when the target video is triggered to start playing to the time when the first video frame of the target video is displayed on the screen is accumulatively calculated and reaches a preset threshold.
Specifically, the file name of the image includes time stamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
the processor 1401 calculates, according to the time from the time when the target video is triggered to start playing to the time when the screen displays the target image, a time length required from when the target video is triggered to start playing to when the screen displays a first video frame of the target video, and may specifically include:
subtracting the T0 from the T1 to obtain the time length required by the target video from the time of being triggered to play to the time when the screen displays the first video frame of the target video.
Specifically, the processor 1401 sequentially identifies the images according to the acquisition order through an image identification technology, and may specifically include:
clipping each image to clip a video playing area displayed on a screen;
and identifying the video playing area through an image identification technology so as to identify whether target characteristics appear.
It should be noted that the electronic device 120 or the electronic device 140 in the embodiment of the present invention is the second electronic device in any embodiment of fig. 1 to 7, and functions of each module in the electronic device 120 or the electronic device 140 may refer to a specific implementation manner of any embodiment of fig. 1 to 7 in each method embodiment, which is not described herein again. The electronic device 120 or the electronic device 140 may include, but is not limited to, a personal computer, a smart mobile terminal (e.g., a mobile phone, a mobile computer, a tablet computer), and the like.
By implementing the embodiment of the invention, the images are sequentially identified according to the acquisition sequence by the image identification technology. Under the condition that the target characteristics appear in the target image, calculating the time length (namely the time consumed by the first frame) required by the target video from the moment that the target video is triggered to start playing to the moment that the screen displays the target image according to the moment that the target video is triggered to start playing, so as to automatically find out the first frame of the video and calculate the time consumed by the first frame; the technical problems that time is consumed for finding the image of the first frame of the video through manual work and the testing efficiency is low in the prior art are solved, especially when multiple APPs or video software or browsers need to be tested for multiple times, repetitive operations are greatly reduced, and the testing efficiency is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (19)

1. A video playing test method is characterized by comprising the following steps:
initializing an empty result list, entering a target interface, and triggering a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics, and the empty result list is used for storing effective test results;
sequentially acquiring images displayed on a screen according to a time sequence, and sequentially identifying the images according to the acquisition sequence by an image identification technology;
under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image according to the time when the target video is triggered to start playing to the time when the screen displays the target image, and obtaining first result information;
and updating the result list according to the first result information, and averaging all the time lengths recorded in the result list when the number of accumulated results in the result list reaches a preset threshold value to obtain a time length result as the final first frame time consumption.
2. The method of claim 1, wherein said chronologically sequentially acquiring the screen-displayed images comprises:
sequentially acquiring N images displayed on a screen according to a time sequence, wherein N is a positive integer greater than 0;
and stopping playing the target video, and re-executing the step of entering the target interface.
3. The method of claim 2, wherein said sequentially capturing N images of the screen display in time sequence comprises:
triggering a screenshot program to screenshot the content displayed on the screen according to a preset screenshot interval;
and acquiring and storing the N images of the screenshot.
4. The method of claim 2, wherein said sequentially capturing N images of the screen display in time sequence comprises:
triggering a video recording program to record the video of the content displayed on the screen;
and performing frame division processing on the recorded video, and acquiring and storing the first N frames of images of the recorded video.
5. The method of claim 2, wherein after sequentially identifying the images in acquisition order by image recognition techniques, further comprising:
and in the case that the target feature is identified to appear in the target image, or in the case that the target feature is not identified in any of the N images, re-executing the step of entering the target interface.
6. The method of claim 5, further comprising:
and under the condition that the number of the time lengths required from the triggering of the target video to the display of the first video frame of the target video on the screen is calculated in an accumulated manner to reach a preset threshold value, averaging all the calculated time lengths to obtain a time length result.
7. The method of any of claims 1-6, wherein a filename of the image comprises timestamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
the calculating a time length required by the target video from the moment when the target video is triggered to start playing to the moment when the screen displays the target image according to the moment when the target video is triggered to start playing to the moment when the screen displays the target image includes:
subtracting the T0 from the T1 to obtain the time length required by the target video from the time of being triggered to play to the time when the screen displays the first video frame of the target video.
8. The method of any one of claims 1-6, wherein the sequentially identifying the images in acquisition order by an image recognition technique comprises:
clipping each image to clip a video playing area displayed on a screen;
and identifying the video playing area through an image identification technology so as to identify whether target characteristics appear.
9. An electronic device comprising a memory and a processor, wherein the memory is configured to store a plurality of video playback test instructions, and the processor is configured to load the video playback test instructions and perform:
initializing an empty result list, entering a target interface, and triggering a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics, and the empty result list is used for storing effective test results;
sequentially acquiring images displayed on a screen according to a time sequence, and sequentially identifying the images according to the acquisition sequence by an image identification technology;
under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image according to the time when the target video is triggered to start playing to the time when the screen displays the target image, and obtaining first result information;
and updating the result list according to the first result information, and averaging all the time lengths recorded in the result list when the number of accumulated results in the result list reaches a preset threshold value to obtain a time length result as the final first frame time consumption.
10. The electronic device of claim 9, wherein the processor loading the video playback test instructions further performs steps to implement the method of any of claims 2-8.
11. An electronic device comprising a memory and a processor, wherein the memory is configured to store a plurality of video playback test instructions, and the processor is configured to load the video playback test instructions and perform:
receiving an image sent by an external device; the images are an empty result list initialized by the external equipment, enter a target interface, and sequentially acquire images displayed on a screen according to a time sequence after a target video is triggered to start playing on the target interface, wherein the initial playing content of the target video comprises target characteristics, and the empty result list is used for storing effective test results;
sequentially identifying the images according to the acquisition sequence by an image identification technology;
under the condition that the target characteristics appear in the target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image according to the time when the target video is triggered to start playing to the time when the screen displays the target image, and obtaining first result information;
and updating the result list according to the first result information, and averaging all the time lengths recorded in the result list when the number of accumulated results in the result list reaches a preset threshold value to obtain a time length result as the final first frame time consumption.
12. The electronic device of claim 11, wherein the images received by the image receiving module comprise N images, wherein N is a positive integer greater than 0;
the processor loads the video playing test instruction to further execute: and after the images are sequentially identified according to the acquisition sequence by an image identification technology, under the condition that the target features appear in the target images or under the condition that the target features are not identified in the N images, triggering the external equipment to execute the step of entering the target interface again.
13. The electronic device according to claim 11 or 12, wherein a file name of the image includes time stamp information; the time when the target video is triggered to start playing comprises a time stamp T0, and the time when the target image is displayed on the screen comprises a time stamp T1;
specifically, the calculating, by the processor, a time period required by the target video to start playing from being triggered to the screen displaying the first video frame of the target video includes subtracting the T0 from the T1 to obtain a time period required by the target video to start playing from being triggered to the screen displaying the first video frame of the target video.
14. The electronic device of claim 11 or 12, wherein the processor sequentially identifies the images in the acquisition order by image recognition techniques specifically comprises: clipping each image to clip a video playing area displayed on a screen; and identifying the video playing area through an image identification technology so as to identify whether target characteristics appear.
15. A video playing test system is characterized by comprising a first electronic device and a second electronic device, wherein;
the first electronic equipment initializes an empty result list, enters a target interface and triggers a target video to start playing on the target interface; the initial playing content of the target video comprises target characteristics, and the empty result list is used for storing effective test results; the first electronic equipment sequentially acquires images displayed on a screen according to a time sequence and sends the acquired images to the second electronic equipment;
the second electronic equipment receives the images sent by the external equipment and sequentially identifies the images according to the acquisition sequence by an image identification technology; under the condition that the image recognition module recognizes that the target feature appears in a target image, calculating the time length required by the target video from the time when the target video is triggered to start playing to the time when the screen displays the target image, and obtaining first result information;
and the first electronic equipment updates the result list according to the first result information, and averages all the time lengths recorded in the result list when the number of accumulated results in the result list reaches a preset threshold value to obtain a time length result which is used as the final first frame time consumption.
16. The system of claim 15, wherein the second electronic device comprises the electronic device of any of claims 11-14.
17. The system of claim 15, wherein the first electronic device comprises a first memory and a first processor, wherein the first memory is configured to store a plurality of video playback test instructions, and wherein the first processor is configured to load the video playback test instructions and perform:
entering a target interface, triggering a target video to start playing on the target interface, and sequentially acquiring N images displayed on a screen according to a time sequence, wherein N is a positive integer greater than 0;
and stopping playing the target video, and re-executing the step of entering the target interface.
18. The system of claim 17, wherein the first processor acquiring N images displayed on the screen in chronological order comprises: triggering a screenshot program to screenshot the content displayed on the screen according to a preset screenshot interval; and acquiring and storing the N images of the screenshot.
19. The system of claim 17, wherein the first processor acquiring N images displayed on the screen in chronological order comprises: triggering a video recording program to record the video of the content displayed on the screen; and performing frame division processing on the recorded video, and acquiring and storing the first N frames of images of the recorded video.
CN201710322491.5A 2017-05-09 2017-05-09 Video playing test method, electronic equipment and system Active CN108882019B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710322491.5A CN108882019B (en) 2017-05-09 2017-05-09 Video playing test method, electronic equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710322491.5A CN108882019B (en) 2017-05-09 2017-05-09 Video playing test method, electronic equipment and system

Publications (2)

Publication Number Publication Date
CN108882019A CN108882019A (en) 2018-11-23
CN108882019B true CN108882019B (en) 2021-12-10

Family

ID=64287508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710322491.5A Active CN108882019B (en) 2017-05-09 2017-05-09 Video playing test method, electronic equipment and system

Country Status (1)

Country Link
CN (1) CN108882019B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110177270A (en) * 2019-06-05 2019-08-27 北京字节跳动网络技术有限公司 Video head frame test method and device
CN112055258B (en) * 2019-06-06 2023-01-31 腾讯科技(深圳)有限公司 Time delay testing method and device for loading live broadcast picture, electronic equipment and storage medium
CN110891173B (en) * 2019-06-27 2021-06-11 研祥智能科技股份有限公司 Dynamic image detection method and system
CN110324707B (en) * 2019-07-12 2021-12-10 北京奇艺世纪科技有限公司 Video playing time consumption testing method and device
CN113495833B (en) * 2020-04-03 2024-02-23 杭州海康威视系统技术有限公司 Software testing method, device and system based on video event and storage medium
CN111798358B (en) * 2020-07-01 2024-05-31 北京梧桐车联科技有限责任公司 Method and device for determining path time, electronic equipment and readable storage medium
CN113297065B (en) * 2020-11-16 2024-11-29 灵犀互动娱乐控股有限公司 Data processing method, game-based processing method and device and electronic equipment
CN112511818B (en) * 2020-11-24 2022-08-19 上海哔哩哔哩科技有限公司 Video playing quality detection method and device
CN112579420A (en) * 2020-12-30 2021-03-30 杭州视洞科技有限公司 Automatic dialing and testing scheme and flow for mobile client application of intelligent camera
CN114827712B (en) * 2021-01-18 2025-03-21 中国移动通信有限公司研究院 Video playback detection method, device and electronic equipment
CN115484492B (en) * 2022-11-11 2023-05-30 荣耀终端有限公司 Method and device for acquiring interface delay

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056026A (en) * 2009-11-06 2011-05-11 中国移动通信集团设计院有限公司 Audio/video synchronization detection method and system, and voice detection method and system
CN104754373A (en) * 2013-12-27 2015-07-01 联想(北京)有限公司 Video acquisition method and electronic device
CN104902229A (en) * 2015-05-19 2015-09-09 吴晗 Video monitoring method, system and camera shooting monitoring system
CN105721953A (en) * 2016-04-28 2016-06-29 乐视控股(北京)有限公司 Stream media video start playing abnormity analyzing method and system
CN106415698A (en) * 2014-06-27 2017-02-15 英特尔公司 Power optimization with dynamic frame rate support
CN106412674A (en) * 2016-10-08 2017-02-15 广州华多网络科技有限公司 Screenshot method and device for dynamic video
CN106535353A (en) * 2015-09-10 2017-03-22 华为技术有限公司 Random backoff method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3709513B2 (en) * 1997-04-24 2005-10-26 株式会社セガ GAME DEVICE, GAME PROCESSING METHOD, AND RECORDING MEDIUM
JP4039386B2 (en) * 2004-04-21 2008-01-30 コニカミノルタオプト株式会社 Imaging sensor and imaging apparatus
US8120675B2 (en) * 2006-10-17 2012-02-21 Panasonic Corporation Moving image recording/playback device
JP2011004015A (en) * 2009-06-16 2011-01-06 Panasonic Corp Playback device and content playback method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056026A (en) * 2009-11-06 2011-05-11 中国移动通信集团设计院有限公司 Audio/video synchronization detection method and system, and voice detection method and system
CN104754373A (en) * 2013-12-27 2015-07-01 联想(北京)有限公司 Video acquisition method and electronic device
CN106415698A (en) * 2014-06-27 2017-02-15 英特尔公司 Power optimization with dynamic frame rate support
CN104902229A (en) * 2015-05-19 2015-09-09 吴晗 Video monitoring method, system and camera shooting monitoring system
CN106535353A (en) * 2015-09-10 2017-03-22 华为技术有限公司 Random backoff method and device
CN105721953A (en) * 2016-04-28 2016-06-29 乐视控股(北京)有限公司 Stream media video start playing abnormity analyzing method and system
CN106412674A (en) * 2016-10-08 2017-02-15 广州华多网络科技有限公司 Screenshot method and device for dynamic video

Also Published As

Publication number Publication date
CN108882019A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108882019B (en) Video playing test method, electronic equipment and system
CN110062284A (en) Video broadcasting method, device and electronic equipment
EP3193509A1 (en) Video advertisement filtering method, device and equipment
CN112118395B (en) Video processing method, terminal and computer readable storage medium
CN112492294B (en) Application program testing method, device, system, network camera and medium
CN112055237A (en) Method, system, apparatus, device and storage medium for determining screen-to-screen delay
CN108874673B (en) Application program testing method and device
CN108196904A (en) Calculate the method, apparatus and computer storage media of page response duration
CN113824987B (en) Method, medium, device and computing equipment for determining time consumption of first frame of live broadcasting room
CN111475756B (en) Information traceless exposure acquisition method and device
CN112698983B (en) A data processing method and related device
CN113730923A (en) Anchor input operation sharing and displaying method and device based on live game
CN112843736A (en) Method and device for shooting image, electronic equipment and storage medium
CN115348476B (en) Voice instruction execution time identification method and device and electronic equipment
CN108572985B (en) Page display method and device
CN117421242A (en) Application detection method, apparatus, computer device and computer readable storage medium
CN114039890B (en) Voice recognition time delay testing method, system and storage medium
CN115346558B (en) Voice response time recognition method and device
CN111782202B (en) Editing method and device for application data
CN112437224B (en) Camera data processing method and device, computer equipment and storage medium
CN111612986A (en) Monitoring method and device, storage cabinet and storage medium
CN108881984B (en) Method and system for storing screenshot of digital television equipment
CN112861612A (en) Method and device for shooting image, electronic equipment and storage medium
CN115914665B (en) Live client freeze detection method and system
CN104796753A (en) TV program picture frame capturing device and system, TV program picture frame obtaining device, and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant