Video picture lag monitoring method and device, storage medium and set top box
Acquisition and comparison of image data of set-top boxes through shell scripts, and secondary judgment is made by combining log and message data, solving the universality and convenience of existing APK monitoring methods, and achieving high accuracy and low cost video picture cards Monitor.
Patent Information
- Application Number
- CN202411837524.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-01-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Most of the existing set-top box video screen lag monitoring methods rely on APK, lack universality, and the detected screen stuck events are difficult to view easily, with high design cost and complex structure.
Use shell script to obtain image data from the set-top box, use diff command to compare image data at adjacent time points, if there is no difference, it will be determined as a stuttering state, and make secondary judgments through log and message data to ensure the accuracy and convenience of monitoring. sex.
It realizes universality, accuracy and convenience of monitoring of set-top box video lag, reduces design costs, and simplifies the operation of staff to view lag results.
Smart Images

Figure CN119316667A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of set-top boxes, and in particular to a method, device, storage medium and set-top box for monitoring video freezes. Background Art
[0002] Currently, most of the monitoring methods for set-top box video screen freezing are to use additional APK (Android Package Kit, Android application package) to achieve monitoring. This monitoring technology is also relatively mature and complete.
[0003] However, APK is not necessarily applicable to all set-top boxes. It is only valid for specific chips, players, and firmware versions that have been adapted to the APK interface. Therefore, using APK to monitor whether the set-top box video screen is stuck is not universal, and some stuck screen events monitored by APK can only be viewed on the platform side, which is not convenient for research, testing, and debugging staff to view. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, storage medium and set-top box for monitoring video freezes, so as to improve the universality and accuracy of set-top box video freeze monitoring and the convenience for test staff to view freeze results.
[0005] To achieve the above object, the present application provides a method for monitoring video freeze, which is applied to a set-top box and includes: Obtaining image data of a video played by a set-top box at preset intervals; Using a diff command to compare the image data at two adjacent time points, and if no difference information is output based on the comparison result, determining that the set-top box is in a suspected stuck state; Obtain log data and / or message data of the set-top box at a time point corresponding to the suspected freeze state, and determine the playback state of the set-top box according to the log data and / or the message data.
[0006] Optionally, the message data includes video stream response data and a video stream address; determining the playback status of the set-top box based on the log data and / or the message data includes: determining the playback status of the set-top box based on the log data and a preset standard playback log; or, determining the playback status of the set-top box based on the video stream response data and the video stream address; or, determining the playback status of the set-top box based on the log data, the preset standard playback log, the video stream response data and the video stream address.
[0007] Optionally, the playback status includes a freeze state; determining the playback status of the set-top box according to the log data and the preset standard playback log includes: when the similarity between the log data and the preset standard playback log is lower than a preset threshold, determining that the playback status of the set-top box is a freeze state; determining the playback status of the set-top box according to the video stream response data and the video stream address includes: if it is determined according to the video stream response data that the stream server is not responding, and / or the video stream downloaded according to the video stream address does not have a still picture at the time point corresponding to the suspected freeze state, then determining that the playback status of the set-top box is a freeze state.
[0008] Optionally, the playback status includes a freeze state; determining the playback status of the set-top box based on the log data, the preset standard playback log, the video stream response data and the video stream address includes: if the similarity between the log data and the preset standard playback log is lower than a preset threshold, and it is determined according to the video stream response data that the stream server is not responding, and the video stream downloaded according to the video stream address does not have a still picture at the time point corresponding to the suspected freeze state, then determining that the playback status of the set-top box is a freeze state.
[0009] Optionally, after determining that the set-top box is in a suspected stuck state, the method further includes: redefining the difference information, wherein the difference information includes the playback status, two compared image data and the corresponding time point; and importing the redefined difference information into a pre-created monitoring log.
[0010] Optionally, acquiring the image data of the video played by the set-top box at preset time intervals includes: acquiring the image data of the video played by the set-top box at preset time intervals using a screencap command.
[0011] In addition, to achieve the above-mentioned purpose, the present application also provides a monitoring device for video freezes, including: an acquisition module, used to obtain image data of a set-top box playing a video at preset intervals; a first determination module, used to compare the image data at two adjacent time points using a diff command, and determine that the set-top box is in a suspected freeze state if no difference information is output based on the comparison result; a second determination module, used to obtain log data and / or message data of the set-top box at the time point corresponding to the suspected freeze state, and determine the playback status of the set-top box based on the log data and / or the message data.
[0012] Optionally, the message data includes video stream response data and a video stream address; the second determination module is specifically used to: determine the playback status of the set-top box according to the log data and a preset standard playback log; or, determine the playback status of the set-top box according to the video stream response data and the video stream address; or, determine the playback status of the set-top box according to the log data, the preset standard playback log, the video stream response data and the video stream address.
[0013] The present application also provides a set-top box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for monitoring video freeze as described in any one of the above is implemented.
[0014] The present application also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for monitoring video freeze as described in any one of the above is implemented.
[0015] The video screen freeze monitoring method of the present application obtains image data of the video played by the set-top box at each preset time interval; then uses the diff command to compare the image data of two adjacent time points, and determines that the set-top box is in a suspected freeze state when no difference information is output based on the comparison result; finally, obtains the log data and / or message data of the set-top box at the time point corresponding to the suspected freeze state, and determines the playback state of the set-top box according to the log data and / or message data; thus, the set-top box video screen freeze detection is realized by adopting a shell script, and the shell script can be configured in any set-top box. Secondly, the playback state of the set-top box is re-judged through the log data and the message data, thereby ensuring the accuracy of the monitoring. The staff can directly view the freeze results from the log generated by the shell script, thereby improving the universality and accuracy of the set-top box video screen freeze monitoring and the convenience of the test staff to view the freeze results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is one of the flow charts of the method for monitoring video freezes in an embodiment of the present application; Figure 2 This is the second flowchart of the method for monitoring video freezes in an embodiment of the present application; Figure 3 is a schematic diagram of a device for monitoring video freezes according to an embodiment of the present application; Figure 4 An example of a schematic diagram of the physical structure of a set-top box is provided; In the figure, 300 is a monitoring device for video freeze; 310 is an acquisition module; 320 is a first determination module; 330 is a second determination module; 410 is a processor; 420 is a communication interface; 430 is a memory; and 440 is a communication bus.
[0017] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] Currently, the method of detecting stuck screen of set-top box video screen is mostly to use additional APK (Android PackageKit, Android application package) to achieve monitoring. APK can detect stuck screen, black screen, flowery screen and other events. In addition, there is a matching probe platform. After APK reports stuck screen and other events, the stuck screen related data can be viewed on the platform side.
[0020] However, APK is not applicable to all set-top box devices. It is usually only valid for certain chips, players, and firmware versions that have been adapted to the APK interface, so it is not universal. Secondly, the use of APK to monitor the stuck screen has high design costs, complex structures, and low utilization rates. Finally, some stuck screen events detected by APK can only be viewed on the platform side, and for research and testing staff, it is less convenient to view the monitoring results.
[0021] To this end, the embodiments of the present application provide a method, device, storage medium and set-top box for monitoring video freezes. Starting from the Linux system layer, a set-top box freeze monitoring program is designed using shell language, which can not only be applied to various different Linux systems and terminals, including various chips and Android set-top boxes with different system firmware; the program is simple to implement, with high monitoring accuracy, strong operability and low design cost. There is no need to deploy a separate platform server to report freeze data. The freeze data can be directly viewed from the log generated by the shell script, which simplifies the operation of the staff to view the freeze data.
[0022] Figure 1 FIG. 1 is one of the flow charts of the method for monitoring video freeze in an embodiment of the present application. The method for monitoring video freeze can be executed by a processor in a set-top box, such as Figure 1 As shown, the method for monitoring video freeze may include the following steps: Step 110: Obtain image data of the video played by the set-top box at preset time intervals.
[0023] Step 120: using a diff command to compare the image data at two adjacent time points, and if no difference information is output based on the comparison result, determining that the set-top box is in a suspected stuck state.
[0024] Step 130: Obtain log data and / or message data of the set-top box at a time point corresponding to the suspected freeze state, and determine the playback state of the set-top box according to the log data and / or message data.
[0025] First of all, it should be noted that the preset time can be set by the staff according to actual needs, and no specific limitation is made here. For example, the preset time can be set to 1 minute, that is, the image data of the playing video is obtained once every 1 minute; however, if the preset time is set to a larger value, the video freeze event with a shorter duration may not be detected. Therefore, the preset time can be set to a smaller value to increase the detection frequency, so that most freeze events can be detected and the monitoring accuracy can be improved.
[0026] In addition, the program code corresponding to the method for monitoring video freezes in the embodiment of the present application can be written in shell language. In this embodiment, the program code corresponding to the method for monitoring video freezes can be first written on other terminal devices, and then the program code can be stored in a portable storage device (for example: a USB flash drive, a mobile hard disk, a memory card, etc.), and the portable storage device can be further connected to a set-top box, so that the set-top box copies the program code, and the processor of the set-top box can execute the application to monitor freeze events.
[0027] In step 110, when the set-top box is turned on and plays a video, image data of the video played by the set-top box may be acquired once at a preset interval, and the image data may be acquired by taking a screenshot, capturing a video frame, or the like.
[0028] In some embodiments, obtaining the image data of the video played by the set-top box at a preset interval may include: obtaining the image data of the video played by the set-top box at a preset interval and using the screencap command. Specifically, before obtaining new image data, the folder previously storing the image data may be deleted, and a new folder may be recreated to avoid using the previous image data. Further, the screencap command in the shell language may be used to take a screenshot of the played video and output the image data in PNG format. The output image data may be saved in chronological order and may be viewed and called from a pre-created folder.
[0029] In step 120, each time after the image data of the current time point is obtained, the diff command can be used to compare the current image data with the image data obtained at the previous time point. If there is a difference between the two image data, it indicates that the current set-top box is in a normal playback state. If there is no difference between the two image data, it indicates that the video played by the current set-top box may be stuck, thereby preliminarily monitoring the playback status of the set-top box in real time.
[0030] It should be noted that the diff command is a shell command line utility. Its principle is to compare two files line by line. If there is a difference, the corresponding difference information will be output. If there is no difference, no information will be printed. The diff command can also compare the contents of the directory.
[0031] In this embodiment, the PNG image can be regarded as an alternative text, and the PNG images (i.e., image data) at two adjacent time points can be compared line by line using the diff command. If the two image data are different, difference information will be output, and at this time, it can be roughly determined that the set-top box is in a playing state; if the two image data are not different, no difference information will be output, and at this time, it can be roughly determined that the set-top box is in a stuck state.
[0032] Figure 2 This is the second flowchart of the method for monitoring video freezes according to an embodiment of the present application.
[0033] like Figure 2 As shown, in some implementations, after determining that the set-top box is in a suspected stuck state, the video picture stuck monitoring method may further include the following steps: Step 210: Redefine the difference information, wherein the difference information includes the play status, two compared image data and the corresponding time point.
[0034] Step 220: Import the redefined difference information into the pre-created monitoring log.
[0035] Specifically, when the set-top box is determined to be in a playing state, the output difference information can be redefined, and the difference information can be specifically defined as: playing state + time point + image data 1 + image data 2; the redefined difference information can be further stored in a pre-created monitoring log. When the set-top box is determined to be in a stuck state, the difference information can also be redefined, and the difference information can be specifically defined as: stuck state + time point + image data 1 + image data 2; the redefined difference information can be further stored in a pre-created monitoring log. As a result, it is convenient for the staff to know at what point in time the stuck event occurred by checking the monitoring log later.
[0036] The implementation code for obtaining the image data of the video played by the set-top box at preset intervals and comparing the image data of two adjacent time points using the diff command can be: #! / bin / bash # Delete the folder and create a new one rm -fr / data / png mkdir / data / png #Whether / data / buffer.log exists or not, delete it rm -fr / data / buffer.log i=1 #Use the screencap command to take a screenshot and import it into / data / png to form image data screencap -p / data / png / $i.png #No processing for 1 minute sleep 60 :< <! Execute an infinite loop, take a screenshot every one minute to form a picture with an increasing name number, compare the latest picture with the picture taken one minute ago to see if there is any difference, and print it. If there is a difference, record "playing@current time-diff-latest screenshot name-screenshot name 1 minute ago" in the log file / data / buffer.log; if there is no difference, record "buffer@current time-diff-current screenshot name-screenshot name 1 minute ago" in the log file / data / buffer.log.
[0037] ! while true do i=$(($i+1)) j=$(($i-1)) screencap -p / data / png / $i.png output=`diff / data / png / $i.png / data / png / $j.png` if [ -n "$output" ];then echo "playing@`date`-diff-$i.png-$j.png">> / data / buffer.log else echo "buffer@`date`-diff-$i.png-$j.png">> / data / buffer.log fi sleep 60 done Therefore, a preliminary judgment on the playback status of the set-top box can be achieved through the shell script. If the staff believes that the preset time of 1 minute for the screenshot interval is too long or too short, the time after the two sleeps in the shell script can be rewritten (in seconds).
[0038] Since the video screen is still at some time and the still time is longer than the preset time, the state of the set-top box may be determined to be a stuck state, resulting in a misjudgment. Therefore, the embodiment of the present application analyzes the log data and the message data to determine the playback state of the set-top box again to ensure the accuracy of monitoring.
[0039] Specifically, when the set-top box is determined to be in a suspected stuck state through a shell script, the log data and message data corresponding to the time point of the suspected stuck state can be obtained; among which, the log data can be the player log of the set-top box and the log of the application to which the screen belongs, and the message data can include video stream response data and video stream address, etc.
[0040] In some embodiments, determining the playback status of a set-top box based on log data and / or message data may include: determining the playback status of a set-top box based on log data and a preset standard playback log; or, determining the playback status of a set-top box based on video stream response data and a video stream address; or, determining the playback status of a set-top box based on log data, a preset standard playback log, video stream response data, and a video stream address.
[0041] It should be noted that the preset standard play log may be a historical normal play log of the set-top box. A number of historical normal play logs may be acquired in advance and used as the preset standard play log.
[0042] In the embodiment of the present application, three methods of secondary detection of the set-top box playback state are provided. The first method is to determine the playback state of the set-top box only based on the log data and the preset standard playback log; the second method is to determine the playback state of the set-top box based on the video stream response data and the video stream address; the third method is to determine the playback state of the set-top box based on the log data, the preset standard playback log, the video stream response data and the video stream address.
[0043] In some embodiments, the playback status includes a stuck state and a normal playback state; the first method is to determine the playback status of the set-top box based on log data and a preset standard playback log, which may include: when the similarity between the log data and the preset standard playback log is lower than a preset threshold, determining that the playback status of the set-top box is a stuck state.
[0044] It should be noted that the preset threshold can be set by the staff according to actual needs and is not specifically limited here.
[0045] Specifically, the log data of the time point corresponding to the suspected stuck state can be obtained from the player log in the system log and the log of the application to which the screen belongs, that is, the player log data at the time point and the log data of the application to which the screen belongs are obtained; and then these two types of log data are compared with the corresponding preset standard playback logs, in other words, the player log of the time point corresponding to the suspected stuck state is compared with the player log during historical normal playback, and the application log of the time point corresponding to the suspected stuck state is compared with the application log during historical normal playback.
[0046] If the two compared log data prints are similar, it can be determined that the playback status of the set-top box is normal; if the log data corresponding to the time point of the suspected stuck state is disconnected, or the two compared log data prints are not similar, it can be determined that the playback status of the set-top box is stuck.
[0047] In this embodiment, the similarity of two log data can be calculated, and the obtained similarity value can be compared with a preset threshold to determine whether the two log data prints are similar; specifically, if the obtained similarity value is less than the preset threshold, it means that the two log data prints are not similar; if the obtained similarity value is greater than or equal to the preset threshold, it means that the two log data prints are similar.
[0048] In some embodiments, the second method of determining the playback status of the set-top box based on the video stream response data and the video stream address may include: if it is determined based on the video stream response data that the stream server is not responding, and / or there is no still image at the time point corresponding to the suspected stuck state in the video stream downloaded based on the video stream address, then determining that the playback status of the set-top box is a stuck state.
[0049] In this embodiment, for the message data, wireshark (packet capture tool) can be used to open the message data, and check whether the video stream at the corresponding time point responds normally. If the stream server does not respond, it can be determined that the play state of the set-top box is a stuck state. Alternatively, the address of the video stream can be accessed by a browser to download the video stream, and the downloaded video stream can be opened on other terminal devices to check whether the downloaded video stream also has a still picture. If there is a still picture, it means that the video stream itself has a still picture, and the set-top box screen does not actually freeze. At this time, it can be determined that the play state of the set-top box is a normal play state; if the downloaded video stream does not have a still picture, it can be determined that the play state of the set-top box is a stuck state.
[0050] In some embodiments, a third method, determining the playback status of a set-top box based on log data, a preset standard playback log, video stream response data, and a video stream address, may include: if the similarity between the log data and the preset standard playback log is lower than a preset threshold, and it is determined based on the video stream response data that the streaming server is not responding, and there is no still picture at the time point corresponding to the suspected stuck state in the video stream downloaded based on the video stream address, then determining that the playback status of the set-top box is a stuck state.
[0051] The third method is to combine log data and message data for secondary detection. Specifically, the similarity of the two log data is calculated, and the obtained similarity value is compared with the preset threshold; further, the message data is opened with wireshark (packet capture tool) to check whether the video stream at the corresponding time point responds normally, and the video stream is downloaded by using the browser to access the address of the video stream, and opened on other terminal devices to check whether the downloaded video stream also has a still picture.
[0052] If the similarity between the obtained log data and the preset standard playback log is less than the preset threshold, the streaming server does not respond normally, and the video stream downloaded through the video stream address does not have a static picture, the playback state of the set-top box is determined to be a stuck state. On the contrary, if one of the conditions is not met, the playback state of the set-top box is determined to be a normal playback state.
[0053] In this embodiment, after obtaining the program code corresponding to the above method using the shell language, the above shell script can be pasted into a text, keeping the above format, saved as 1.sh, and copied to the root directory of the USB flash drive; further, the USB flash drive is connected to the set-top box, and the shell script is copied to the / data directory of the set-top box through the serial port of the set-top box using the cp command, and the permission is given to 777. Then enter the / data path to execute the shell script.
[0054] The relevant commands on the set-top box are as follows: console: / # cp / mnt / media_rw / 56BC-8FDC / 1.sh / data / console: / # chmod 777 / data / 1.sh console: / # cd / data 143|console: / data # sh 1.sh& [2] 5334 When you need to stop running the shell script, just execute the command kill 5334. At this time, you can copy the / data / png (image data) and / data / buffer.log (difference information) generated by the shell script to view the freezing time point, and you can view the corresponding pictures for verification, or you can view the above content on the set-top box side.
[0055] The video freeze monitoring method provided in the embodiment of the present application implements the video freeze monitoring program code by writing in shell language, which is more rewritable than the APK method and has a relatively low design cost. It has the advantages of universality, convenience, and ease of operation; and the monitoring accuracy is high, and the monitoring results are easier to obtain and view.
[0056] Based on the above embodiments, the present invention further provides a device for monitoring video freezes. Figure 3 is a schematic diagram of a monitoring device for video freeze in an embodiment of the present application, such as Figure 3 As shown, the video freeze monitoring device 300 may include an acquisition module 310 , a first determination module 320 and a second determination module 330 .
[0057] Among them, the acquisition module 310 is used to obtain image data of the video played by the set-top box at every preset time interval; the first determination module 320 is used to use the diff command to compare the image data of two adjacent time points, and determine that the set-top box is in a suspected stuck state when no difference information is output based on the comparison result; the second determination module 330 is used to obtain the log data and / or message data of the set-top box at the time point corresponding to the suspected stuck state, and determine the playback status of the set-top box based on the log data and / or message data.
[0058] Thus, the image data of the video played by the set-top box is obtained at preset intervals through the acquisition module 310; the first determination module 320 then uses the diff command to compare the image data of two adjacent time points, and determines that the set-top box is in a suspected stuck state when no difference information is output based on the comparison result; finally, the second determination module 330 obtains the log data and / or message data of the set-top box at the time point corresponding to the suspected stuck state, and determines the playback state of the set-top box according to the log data and / or message data; the detection of set-top box video screen stuck is realized by adopting shell scripts, and the shell script can be configured in any set-top box. Secondly, the playback state of the set-top box is judged again through log data and message data, which ensures the accuracy of monitoring. The staff can directly view the stuck results from the logs produced by the shell script, which improves the universality and accuracy of the set-top box video screen stuck monitoring and the convenience of the test staff to view the stuck results.
[0059] In some embodiments, the message data includes video stream response data and a video stream address; the second determination module 330 is specifically used to: determine the playback status of the set-top box based on the log data and a preset standard playback log; or, determine the playback status of the set-top box based on the video stream response data and the video stream address; or, determine the playback status of the set-top box based on the log data, a preset standard playback log, the video stream response data, and the video stream address.
[0060] In some embodiments, the playback status includes a freeze state; the second determination module 330 is also specifically used to: determine that the playback status of the set-top box is a freeze state when the similarity between the log data and the preset standard playback log is lower than a preset threshold; determine the playback status of the set-top box according to the video stream response data and the video stream address, including: if it is determined according to the video stream response data that the stream server is not responding, and / or the video stream downloaded according to the video stream address does not have a still picture at the time point corresponding to the suspected freeze state, then determine that the playback status of the set-top box is a freeze state.
[0061] In some embodiments, the playback status includes a freeze state; the second determination module 330 is also specifically used for: if the similarity between the log data and the preset standard playback log is lower than a preset threshold, and it is determined based on the video stream response data that the streaming server is not responding, and the video stream downloaded based on the video stream address does not have a still picture at the time point corresponding to the suspected freeze state, then the playback status of the set-top box is determined to be a freeze state.
[0062] In some implementations, the first determination module 320 is further used to: redefine the difference information, where the difference information includes the playback status, two compared image data, and the corresponding time point; and import the redefined difference information into a pre-created monitoring log.
[0063] In some implementations, the acquisition module 310 is specifically used to: acquire the image data of the video played by the set-top box at preset intervals by using the screencap command.
[0064] It should be noted that for details not disclosed in the video image freeze monitoring device of this embodiment, please refer to the details disclosed in the embodiment of the video image freeze monitoring method in the embodiments of this specification, and no further details will be given here.
[0065] Figure 4 An example of a schematic diagram of the physical structure of a set-top box is shown in FIG. Figure 4 As shown, the set-top box may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a method for monitoring video freeze, the method comprising: obtaining image data of a video played by a set-top box at a preset interval; using a diff command to compare the image data of two adjacent time points, and determining that the set-top box is in a suspected freeze state when no difference information is output based on the comparison result; obtaining the log data and / or message data of the set-top box at the time point corresponding to the suspected freeze state, and determining the play state of the set-top box according to the log data and / or message data.
[0066] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0067] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the above-mentioned video screen freeze monitoring method, which includes: obtaining image data of a video played by a set-top box at every preset time interval; using a diff command to compare the image data of two adjacent time points, and determining that the set-top box is in a suspected freeze state when no difference information is output based on the comparison result; obtaining log data and / or message data of the set-top box at the time point corresponding to the suspected freeze state, and determining the playback status of the set-top box based on the log data and / or message data.
[0068] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned video screen freeze monitoring method, the method comprising: obtaining image data of a video played by a set-top box at preset time intervals; using a diff command to compare the image data of two adjacent time points, and determining that the set-top box is in a suspected freeze state when no difference information is output based on the comparison result; obtaining log data and / or message data of the set-top box at a time point corresponding to the suspected freeze state, and determining the playback status of the set-top box based on the log data and / or message data.
[0069] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for monitoring video freeze, applied to a set-top box, characterized in that: include: Obtaining image data of a video played by a set-top box at preset intervals; Using a diff command to compare the image data at two adjacent time points, and if no difference information is output based on the comparison result, determining that the set-top box is in a suspected stuck state; Obtain log data and / or message data of the set-top box at a time point corresponding to the suspected freeze state, and determine the playback state of the set-top box according to the log data and / or the message data.
2. The method for monitoring video freeze according to claim 1, characterized in that: The message data includes video stream response data and video stream address; Determining the playing state of the set-top box according to the log data and / or the message data includes: determining the playing state of the set-top box according to the log data and a preset standard playing log; or, determining the playing state of the set-top box according to the video stream response data and the video stream address; or, The play status of the set-top box is determined according to the log data, the preset standard play log, the video stream response data and the video stream address.
3. The method for monitoring video freeze according to claim 2, characterized in that: The playback state includes a freeze state; and determining the playback state of the set-top box according to the log data and a preset standard playback log includes: When the similarity between the log data and the preset standard playback log is lower than a preset threshold, determining that the playback state of the set-top box is the stuck state; Determining the playing state of the set-top box according to the video stream response data and the video stream address includes: If it is determined according to the video stream response data that the streaming server has not responded, and / or the video stream downloaded according to the video stream address does not have a still picture at the time point corresponding to the suspected stuck state, then the playback state of the set-top box is determined to be the stuck state.
4. The method for monitoring video freeze according to claim 2, characterized in that: The playback state includes a freeze state; and determining the playback state of the set-top box according to the log data, the preset standard playback log, the video stream response data, and the video stream address includes: If the similarity between the log data and the preset standard playback log is lower than a preset threshold, and it is determined according to the video stream response data that the streaming server is not responding, and the video stream downloaded according to the video stream address does not contain a still picture at the time point corresponding to the suspected stuck state, then it is determined that the playback state of the set-top box is the stuck state.
5. The method for monitoring video freeze according to claim 1, characterized in that: After determining that the set-top box is in a suspected stuck state, the method further includes: Redefine the difference information, wherein the difference information includes a playback state, two compared image data and a corresponding time point; Import the redefined difference information into the pre-created monitoring log.
6. The method for monitoring video freeze according to claim 1, characterized in that: The step of obtaining the image data of the video played by the set-top box at a preset time interval includes: At preset intervals, use the screencap command to obtain image data of the video played by the set-top box.
7. A device for monitoring video freeze, characterized in that: include: An acquisition module, used for acquiring image data of a video played by a set-top box at preset intervals; A first determination module, configured to compare the image data at two adjacent time points using a diff command, and determine that the set-top box is in a suspected stuck state if no difference information is output based on the comparison result; The second determination module is used to obtain the log data and / or message data of the set-top box at the time point corresponding to the suspected freeze state, and determine the playback state of the set-top box according to the log data and / or the message data.
8. The device for monitoring video freeze according to claim 7, characterized in that: The message data includes video stream response data and a video stream address; the second determination module is specifically used for: determining the playing state of the set-top box according to the log data and a preset standard playing log; or, Determining a play status of the set-top box according to the video stream response data and the video stream address; or, The play status of the set-top box is determined according to the log data, the preset standard play log, the video stream response data and the video stream address.
9. A set-top box, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for monitoring video freezes as described in any one of claims 1 to 6 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for monitoring video freeze as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Terminal exception processing method and device, terminal and storage medium
CN111897672A
Equipment performance analysis method and device
CN113419932A
Screen monitoring automatic test method and test system
CN114116511A
Video stream transmission quality information determination method, system, device and medium
CN114900662A
Set top box state monitoring method, apparatus and device, and storage medium
CN117793340A