WO2018223670A1 - Voltage acquisition method and device, and storage medium - Google Patents
Voltage acquisition method and device, and storage medium Download PDFInfo
- Publication number
- WO2018223670A1 WO2018223670A1 PCT/CN2017/118959 CN2017118959W WO2018223670A1 WO 2018223670 A1 WO2018223670 A1 WO 2018223670A1 CN 2017118959 W CN2017118959 W CN 2017118959W WO 2018223670 A1 WO2018223670 A1 WO 2018223670A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- video stream
- voltage
- playing state
- picture
- preset
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000012544 monitoring process Methods 0.000 claims abstract description 10
- 230000002159 abnormal effect Effects 0.000 claims description 11
- 238000012360 testing method Methods 0.000 description 16
- 230000035945 sensitivity Effects 0.000 description 6
- 239000007787 solid Substances 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000007704 transition Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012356 Product development Methods 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/44204—Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/4424—Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/4425—Monitoring of client processing errors or hardware failure
Definitions
- the present disclosure relates to the field of set top boxes, for example, to a voltage collection method, device, and storage medium.
- the set-top box tuner module is a very important part of the set-top box hardware, also known as the low-noise amplifier.
- the sensitivity indicator is an important indicator in the set-top box. There are two methods for collecting the voltage of the video stream signal received by the set-top box tuner module, manual test acquisition and passing the bit error rate test index.
- the method of collecting voltage by manual testing has a long time period and is prone to error in the case of human fatigue.
- the threshold voltage collection results need to be manually input into the spreadsheet, which affects work efficiency, increases human resource consumption, and increases product development costs.
- the error is tested by the bit error rate test (ie, the maximum test voltage and the minimum test voltage), and the error is unacceptable.
- the present disclosure provides a voltage collection method, device, and storage medium to solve the problem of low voltage collection efficiency, large error, and high cost of signals received by the set top box high frequency head module.
- a voltage collection method includes:
- the voltage value of the modulator is cyclically executed and the next playing state is monitored in real time, and the current playing state and the next playing state are compared to determine whether the playing state is changed. Steps, until the playing state is changed twice and separately recording the two voltage values corresponding to the two changes to obtain a corresponding first voltage threshold and a second voltage threshold at the preset frequency value.
- the voltage collection method further includes:
- the voltage collection method wherein the determining, according to the picture, a play status of the video includes:
- determining whether the video stream is black according to the picture comprises:
- the counter is incremented by one
- the voltage collection method wherein the determining, according to the picture, whether a video stream is stuck comprises:
- the voltage collecting method wherein the determining, according to the picture, whether the video stream has noise includes:
- the voltage collecting method wherein when the set-top box is detected to output the video stream, intercepting a picture of the first preset number of frames in the video stream and saving includes:
- the second preset frame number is read by a frame of a preset size and the number of intercepted frames is recorded;
- the voltage collecting method wherein the adjusting the voltage value of the modulator and monitoring the next playing state in real time, and comparing the current playing state with the next playing state to determine whether the playing state is changed includes:
- a voltage collecting device comprising:
- processor adapted to implement a plurality of instructions
- a storage device adapted to store a plurality of instructions adapted to be loaded by a processor and to perform a voltage acquisition method as described above.
- a storage medium storing computer executable instructions arranged to perform a voltage collection method as described above.
- a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to execute Any of the above methods.
- the voltage collection method, device and storage medium provided by the present disclosure automatically acquire the maximum voltage threshold value and the minimum voltage threshold value by monitoring whether the playback state of the video changes in real time, thereby liberating the work of manually collecting the threshold voltage and reducing the collection cost.
- FIG. 1 is a flowchart of a voltage collecting method provided by this embodiment.
- FIG. 2 is a flowchart of step 200 in the voltage collection method provided by this embodiment.
- FIG. 3 is a flowchart of step 300 in the voltage collection method provided by this embodiment.
- FIG. 4 is a flowchart of step 301 in the voltage collecting method provided by this embodiment.
- FIG. 5 is a flowchart of determining a black screen of a video stream in the voltage collecting method provided in the embodiment.
- FIG. 6 is a flowchart of determining a video stream jam in the voltage collection method according to the embodiment.
- FIG. 7 is a flowchart of determining noise in a video stream in the voltage collecting method provided in the embodiment.
- FIG. 8 is a flowchart of step 400 in the voltage collecting method provided by this embodiment.
- FIG. 9 is a flowchart of another voltage collecting method provided by this embodiment.
- FIG. 10 is a schematic structural diagram of a voltage collecting device according to an embodiment of the present invention.
- FIG. 11 is a schematic structural diagram of hardware of a voltage collecting device according to an embodiment of the present invention.
- FIG. 1 is a flowchart of a voltage collection method according to an embodiment. The method includes the following steps.
- step 100 the modulator voltage value is set to a preset initial voltage value and the video stream at the preset frequency point value is sent to the set top box, wherein the initial voltage value corresponds to the preset frequency point value.
- the voltage value is a voltage value of the modulator itself, the voltage value determining a signal strength of a video stream transmitted by the modulator.
- the voltage value is used to determine whether the hardware of the set-top box product meets the requirements of the product specification. If the requirements are not met, the received code stream is unstable due to hardware reasons, and the voltage value is determined according to the hardware value.
- the preset frequency point value is a preset frequency point value, and the frequency point value may be one or more.
- the initial voltage value corresponds to the frequency point value, that is, the initial voltage values corresponding to different frequency point values may be the same or different, and the initial voltage value is set according to the product specification of the set top box to start the collecting process.
- step 200 when the set top box is monitored to output the video stream, the picture of the first preset number of frames in the video stream is intercepted and saved.
- the set top box receives the video stream data at the frequency point value sent by the modulator by using a radio frequency (RF) receiving head, and passes through a high-definition multimedia interface (HDMI).
- the interface outputs the video stream data to a display interface to play the video.
- intercepting the picture of the first preset number of frames in the video stream and saving may include the following steps.
- step 201 when the set top box is monitored to output the video stream, a second preset frame number is read at intervals of one frame and the number of intercepted frames is recorded.
- step 202 when the number of intercepted frames reaches the first preset number of frames, the interception is stopped and all the pictures are saved in the jpg format.
- the interception frequency may be intercepted for each frame of data, or may be intercepted once by the second preset number of frames. Since the human eye can distinguish the video difference in 4-6 frames, in the present embodiment, the data can be intercepted once every 4 frames. In this way, when reading picture data, it is not necessary to read every frame, so as to effectively save memory space and reduce the workload of image processing.
- the preset size is a size (for example, width and height) of a picture to be read that is set in advance.
- the size of the picture data is the same as the video source width or the resolution of the set-top box settings.
- the first preset frame number refers to the number of frames of the picture data to be intercepted, and the total number of pictures to be captured may be calculated according to the frame rate and time of the video.
- the process of reading a frame of preset frame size and recording the number of intercepted frames by the second preset frame number may be the following content.
- step 300 the current play state of the video stream is determined according to the picture, where the play status includes normal play and abnormal play.
- the play status refers to the image quality of video playback.
- the normal play means that there is no black screen, jam and noise when the video is played.
- the playback abnormality refers to a phenomenon in which a black screen, a card is stuck, or a noise occurs during video playback, and the video cannot be viewed normally.
- a black screen refers to a black screen with no video signal on the display interface.
- the video card dead refers to the phenomenon that the played video is frozen due to the unstable code stream, that is, the intercepted multi-frame pictures are the same.
- Video presence noise refers to the presence of mosaics in the pictures. Since the noise detection core algorithm determines whether the intercepted picture contains lines, if the video is not a solid color or a transition color, the detection will be misjudged. Therefore, in the present embodiment, the video stream played by the modulator is composed of pictures of a solid color or a transition color.
- determining the current playing state of the video stream according to the picture may include the following steps.
- step 301 it is determined whether the video stream is black, stuck, or has noise according to the picture.
- step 302 when the video stream is not black, is not stuck, and there is no noise, it is determined that the video stream playing state is normal.
- step 303 when the video stream has a black screen, a stuck or a noise, it is determined that the playing state of the video stream is a play exception.
- the step 301 since there is a possibility that the signal is not received during the test, the received signal is displayed as a black screen, and the voltage at this time is also unsatisfactory. Therefore, it is determined whether the video is Before the card is stuck or there is noise, it also includes a process of judging whether it is a black screen. Only when the video is not black, it is judged whether it is stuck or there is noise, which can save the steps of image processing and save test resources. Therefore, as shown in FIG. 4, the step 301 can include the following steps.
- step 3011 it is determined whether the video stream is black based on the picture.
- step 3012 when the video stream is not a black screen, it is determined whether the video stream is stuck or there is noise according to the picture.
- the black screen determines the number of bright pixels of the picture. If the number of bright pixels of all the pictures is less than the height (width) of the picture, the video is black.
- the process of determining whether the video stream is a black screen may include the following steps.
- step H10 the picture is converted to a grayscale image, and the grayscale image is binarized.
- step H20 the number of bright points in the grayscale image after binarization of the grayscale image is counted, and the number of bright spots is compared with a preset number threshold.
- step H30 when the number of bright spots is less than the number threshold, the counter is incremented by one.
- step H40 when the value of the counter is equal to the first preset number of frames, it is determined that the video stream is black.
- the binarization is also called a grayscale division (Threshold), and the gray scale of the general image is divided into two gray values, that is, a gray value is set, and the gray scale of the image itself is greater than its If it is a bright spot and the gray value is lower than the set value, it will be a dark spot.
- the preset number threshold is a preset number of bright spots, for example, 1000. That is, when the number of bright spots is less than 1000, it is determined that the grayscale image is a black screen. When all the pictures intercepted are black screens, that is, the value of the counter is equal to the number of all pictures, it is determined that the video stream is a black screen.
- the set-top box has no signal output to the test terminal.
- it is a black screen, it indicates that the set-top box has no signal output to the display interface, and determines that the current playing state is abnormal for playing; when it is not black, it indicates that the set-top box has a signal output to the display interface, and step 3012 is performed.
- the possible cause of the jam is that the received code stream signal is poor under the voltage value, so that the code stream is unstable, causing the play to be abnormal.
- the noise directly affects the picture quality. Therefore, after determining that the set-top box has a signal output, it is determined whether the video is stuck or there is noise.
- determining whether the video stream is stuck according to the picture may include the following steps.
- step M10 the picture is loaded in a grayscale manner, and the size of the picture is reduced to a preset second size.
- step M20 the picture of the second size is converted into a histogram, and the similarity between the two pictures is compared.
- step M30 when the similarity is greater than a preset value, it is determined that the video stream is stuck.
- the preset second size is a preset reduced size, for example, 256*256. Reducing the picture to the second size uniformly can speed up the calculation and improve the processing efficiency.
- the preset value is a preset similarity threshold, for example, 0.9, 0.95, and the like. Reading the picture into the memory as a grayscale image, and reducing the size of the image to the second size; calculating the histogram data of the reduced image, and comparing the histogram data of the two images; if the similarity is greater than 0.9, determining The two pictures are similar; repeat the above steps, and compare the preset frame pictures in the order of the screenshots. When all the similarities are greater than 0.9, that is, all the captured pictures are similar, the video stream card is determined. dead.
- determining whether the video stream has noise according to the preset frame picture may include the following steps.
- step N10 the picture is converted into a grayscale image and the grayscale image is binarized, and it is determined whether the binarized grayscale image has a mosaic.
- step N20 the picture in which the mosaic exists is recorded, and all the pictures in which the mosaic exists are traversed.
- step N30 when two consecutive mosaic pictures appear more than two times or three consecutive pictures have mosaics, it is determined that there is noise in the video stream.
- the grayscale image is edged and binarized. If the image is a solid color or a transition color, the data will be black after the completion of the data, if there is a mosaic or other lines, There is noise.
- the representation of the mosaic is a color block. The color block is surrounded by lines. The color of the pixel is adjusted to a single channel 0-255 through the grayscale image, and the line is outlined as white by the edge of the image, and the non-line portion is black.
- the number of bright spots is greater than 100, it indicates that there is a mosaic, and the map is recorded. At this moment, it is not directly judged that there is noise because it is possible to capture the interframe, so multiple sheets are needed. It can be judged as noise in succession for several times.
- the picture counted in the N10 is traversed, and three or more consecutive pictures or two consecutive pictures are displayed for two or more times.
- the picture indicates that there is noise in the test.
- the picture is captured at intervals of 4 frames, two times appear that there are two pictures in the 8 frames of the picture as mosaic, and the mosaic must be continuous multiple times.
- the reason why a single sheet cannot be judged is that the video is a dynamic video and consists of different pictures.
- the acquisition card may take an interframe picture (the upper part or the left part is the previous frame picture, the lower part) Part or half of the picture is the next frame. At this time, the noise judgment will be misjudged. Therefore, by judging three or more consecutive pictures or two consecutive pictures, the accuracy of noise determination can be improved, and false positives can be avoided.
- step 400 the voltage value of the modulator is adjusted and the next play state is monitored in real time, and the current play state is compared with the next play state to determine whether the play state is changed.
- the step 400 may include the following steps.
- step 401 the voltage value of the modulator is adjusted according to a preset rule and the next play state is monitored in real time.
- step 402 the current play state and the next play state are compared.
- step 403 if the current play state and the next play state are both abnormal playback or normal playback, it is determined that the play state does not change.
- the preset rule refers to a preset rule for adjusting a voltage.
- the voltage value can be adjusted at a certain interval, that is, 0.5V can be adjusted up/down each time, so that the voltage value of the modulator is sequentially adjusted.
- 0.5V can be adjusted up/down each time, so that the voltage value of the modulator is sequentially adjusted.
- it can also be adjusted according to the empirical value.
- the voltage collecting device monitors the next playing state of the video stream sent after the modulator voltage is adjusted in real time. After receiving the next play state, the current play state is compared with the next acquired play state. If the two are the same, the play state is determined to be unchanged; if the two are different, the play state is determined to be changed. For example, the current playing state is a play exception, and the next played state monitored is a play exception, and the second detected play state is the same, indicating that the current video stream voltage does not reach the voltage that the set box's tuner can normally process. Therefore, it is necessary to continue to adjust the voltage of the video stream input to the set top box.
- step 500 if the playing state is unchanged, the step 400 is performed cyclically until the playing state is changed twice, and the two voltage values corresponding to the two changes are respectively recorded to obtain the preset frequency point.
- the first voltage threshold and the second voltage threshold corresponding to the value.
- the first threshold voltage value and the second threshold voltage value are voltage values of the adjusted modulator at a certain point, and the two form a voltage interval, in which the set top box can acquire the modulator at the location
- the video signal at the frequency point value is output, and the noise-free video is output for playing, so the first voltage threshold and the second voltage threshold can reflect the sensitivity of the set-top box tuner module.
- the playing state does not change, it indicates that the current playing state and the next playing state are both normal playing or abnormal playing, then continue to adjust the voltage value of the modulator and continuously monitor the adjusted playing state (ie, next play) State) until the first change occurs, and the corresponding adjusted voltage when the first change is recorded, that is, the first voltage threshold; continue to adjust the voltage value of the modulator until the monitored play state changes again, Then, a corresponding second voltage threshold value is recorded when the second change is made, and the first voltage threshold value and the second voltage threshold value are two voltage threshold values at the frequency point value.
- testing the threshold voltage value at the plurality of frequency point values may include the following steps.
- step M1 when a plurality of preset frequency point values are detected, the initial voltage values corresponding to the plurality of preset frequency point values are respectively acquired, and the plurality of preset frequency point values are The initial voltage value corresponding to the preset frequency point value is introduced into the modulator.
- step M2 setting a modulator set voltage value to a preset first initial voltage value and transmitting the video stream at the preset first frequency point value to the set top box, wherein the first initial voltage value and the first A frequency point value corresponds.
- step M3 when the set top box is monitored to output the video stream, the picture of the first preset number of frames in the video stream is intercepted and saved.
- step M4 the current play state of the video stream is determined according to the picture, where the play status includes normal play and abnormal play.
- step M5 the voltage value of the modulator is adjusted and the next play state is monitored in real time, and the current play state and the next play state are compared to determine whether the play state is changed.
- step M6 if the playing state is unchanged, the step M5 is cyclically executed until the playing state is changed twice, and the two voltage values corresponding to the two changes are respectively recorded to obtain the preset frequency point.
- the first voltage threshold and the second voltage threshold corresponding to the value.
- step M7 the steps M2-M6 are sequentially executed in sequence according to the sequence of the plurality of frequency point values to respectively acquire the first threshold voltage value and the second threshold voltage value at the plurality of preset frequency point values.
- the process of importing and setting the frequency point value may also be included, the process may be: controlling the modulator to play the video stream to be sent and setting multiple a frequency point value; sending a setting command to the set top box to cause the set top box to set the frequency point value to the preset frequency point value and searching for the channel; and transmitting the video stream at the preset frequency point value according to the channel control modulator of the set top box search To the set top box.
- the plurality of frequency points are frequency point data set according to a product specification of the set top box, and may be stored in an Excel table and then loaded into the modulator.
- the setting instruction may be a frequency setting instruction sent by the collecting device to drive a set top box remote control device (for example, an infrared remote controller, a Bluetooth remote controller, etc.), or may be used to directly operate a frequency point setting instruction generated by the set top box. .
- the voltage collecting device includes a processor 100 and a memory 200.
- the processor 100 is adapted to implement a plurality of instructions; and the memory 200 is adapted to store a plurality of instructions adapted to be loaded by the processor 100 and to perform the voltage acquisition method as described above.
- the instructions are adapted to be loaded by the processor 100 and perform the following steps.
- step H1 the modulator voltage value is set to a preset initial voltage value and the video stream at the preset frequency point value is sent to the set top box, wherein the initial voltage value corresponds to the preset frequency point value.
- step H2 when the set top box is monitored to output the video stream, the picture of the first preset number of frames in the video stream is intercepted and saved.
- step H3 the current play state of the video stream is determined according to the picture, where the play status includes normal play and abnormal play.
- step H4 the voltage value of the modulator is adjusted and the next play state is monitored in real time, and the current play state is compared with the next play state to determine whether the play state is changed.
- step H5 if the playing state is unchanged, the step H4 is performed cyclically until the playing state is changed twice, and the two voltage values corresponding to the two changes are respectively recorded to obtain the preset frequency point.
- the first voltage threshold and the second voltage threshold corresponding to the value.
- the voltage collecting device may further include: an input device 300 and an output device 400.
- the processor 100, the memory 200, the input device 300, and the output device 400 in the voltage collecting device may be connected by a bus or other means, and the bus connection is taken as an example in FIG.
- the input device 300 can receive input digital or character information
- the output device 400 can include a display device such as a display screen.
- the memory 200 is a computer readable storage medium that can be used to store software programs, computer executable programs, and modules.
- the processor 100 executes a plurality of functional applications and data processing by executing software programs, instructions, and modules stored in the memory 200 to implement any of the above embodiments.
- the memory 200 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the electronic device, and the like. Further, the memory may include volatile memory such as random access memory (RAM), and may also include non-volatile memory such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
- RAM random access memory
- non-volatile memory such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
- Memory 200 can be a non-transitory computer storage medium or a transitory computer storage medium.
- the non-transitory computer storage medium such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
- the memory 200 can optionally include memory remotely located relative to the processor 100, which can be connected to the voltage collection device via a network. Examples of the above networks may include the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
- the input device 300 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the electronic device.
- the output device 400 can include a display device such as a display screen.
- the implementation of all or part of the processes in the foregoing embodiment may be performed by a computer program executing related hardware, and the program may be stored in a non-transitory computer readable storage medium, and the program may include, when executed, A flow of an embodiment of the method, wherein the non-transitory computer readable storage medium is a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory (RAM).
- the non-transitory computer readable storage medium is a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory (RAM).
- the present embodiment provides a storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform a voltage acquisition method as described above.
- the voltage collection method, device and storage medium provided by the present disclosure automatically acquire the maximum voltage threshold value and the minimum voltage threshold value by monitoring whether the playback state of the video changes in real time, thereby liberating the work of manually collecting the threshold voltage and reducing the collection cost.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
A voltage acquisition method and device, and a storage medium. The method comprises: setting a voltage value of a modulator to be a pre-set initial voltage value and sending a video stream at a pre-set frequency point value to a set top box; when it is monitored that the set top box outputs the video stream, intercepting and saving a first pre-set number of frames of pictures from the video stream; determining the current playing state of the video stream according to the pictures; adjusting the voltage value of the modulator and monitoring the next playing state in real time, and determining whether the playing state has changed; and if the playing state has not changed, cyclically executing the step of adjusting the voltage value of the modulator and monitoring the next playing state in real time, and comparing the current playing state with the next playing state to determine whether the playing state has changed, until the playing state has changed twice, and respectively recording two voltage values corresponding to the two changes as a first voltage threshold and a second voltage threshold corresponding to the pre-set frequency point value.
Description
本公开涉及机顶盒技术领域,例如涉及一种电压采集方法、设备及存储介质。The present disclosure relates to the field of set top boxes, for example, to a voltage collection method, device, and storage medium.
机顶盒高频头模块是机顶盒硬件中很重要的部分,又称低噪声放大变频器。灵敏度指标是机顶盒内重要的指标。采集机顶盒高频头模块接收的视频流信号的电压的方法,主要有两种采集方式,手动测试采集及通过误码率测试指标。The set-top box tuner module is a very important part of the set-top box hardware, also known as the low-noise amplifier. The sensitivity indicator is an important indicator in the set-top box. There are two methods for collecting the voltage of the video stream signal received by the set-top box tuner module, manual test acquisition and passing the bit error rate test index.
通过手动测试来采集电压的方法,时间周期较长,并且在人力疲劳情况下容易出错。临界值电压采集结果需要人工输入电子表格中,影响工作效率,增加人力资源消耗,增加了产品的开发成本。The method of collecting voltage by manual testing has a long time period and is prone to error in the case of human fatigue. The threshold voltage collection results need to be manually input into the spreadsheet, which affects work efficiency, increases human resource consumption, and increases product development costs.
通过误码率测试灵敏度(即最大测试电压和最小测试电压)的方法,容易出现误差,且误差为不可接受。The error is tested by the bit error rate test (ie, the maximum test voltage and the minimum test voltage), and the error is unacceptable.
发明内容Summary of the invention
本公开提供一种电压采集方法、设备及存储介质,以解决机顶盒高频头模块接收的信号的电压采集效率低下,误差大以及成本高的问题。The present disclosure provides a voltage collection method, device, and storage medium to solve the problem of low voltage collection efficiency, large error, and high cost of signals received by the set top box high frequency head module.
一种电压采集方法,包括:A voltage collection method includes:
设置调制器电压值为预设的初始电压值并将预设频点值处的视频流发送至机顶盒,其中,所述初始电压值与所述预设频点值相对应;Setting a modulator voltage value to a preset initial voltage value and transmitting the video stream at the preset frequency point value to the set top box, wherein the initial voltage value corresponds to the preset frequency point value;
当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存;When the set top box is monitored to output the video stream, intercepting a picture of the first preset number of frames in the video stream and saving the image;
根据所述图片判断所述视频流的当前播放状态,其中,所述播放状态包括播放正常和播放异常;Determining, according to the picture, a current playing state of the video stream, where the playing state includes normal playing and abnormal playing;
调整所述调制器的电压值并实时监听下一次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变;Adjusting the voltage value of the modulator and monitoring the next playing state in real time, and comparing the current playing state with the next playing state to determine whether the playing state is changed;
若所述播放状态不变,则循环执行所述调整所述调制器的电压值并实时监听下一次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变的步骤,直至所述播放状态改变两次并分别记录所述两次改变对应的两个电压值以获得所述预设频点值处对应的第一电压临界值和第二电压临界值。If the playing state is unchanged, the voltage value of the modulator is cyclically executed and the next playing state is monitored in real time, and the current playing state and the next playing state are compared to determine whether the playing state is changed. Steps, until the playing state is changed twice and separately recording the two voltage values corresponding to the two changes to obtain a corresponding first voltage threshold and a second voltage threshold at the preset frequency value.
所述电压采集方法,还包括:The voltage collection method further includes:
当检测到多个预设频点值时,分别获取所述多个预设频点值对应的初始电压值,并将所述多个预设频点值及与所述多个预设频点值对应的初始电压值导入所述调制器;When a plurality of preset frequency point values are detected, respectively acquiring initial voltage values corresponding to the plurality of preset frequency point values, and the plurality of preset frequency point values and the plurality of preset frequency points The initial voltage value corresponding to the value is introduced into the modulator;
按照所述多个频点值的顺序,分别获取所述多个预设频点值处的第一临界电压值和第二临界电压值。Obtaining a first threshold voltage value and a second threshold voltage value at the plurality of preset frequency point values according to the sequence of the plurality of frequency point values.
所述电压采集方法,其中,所述根据所述图片判断视频的播放状态包括:The voltage collection method, wherein the determining, according to the picture, a play status of the video includes:
根据所述图片判断所述视频流是否黑屏、卡死或者存在噪声;Determining, according to the picture, whether the video stream is black, stuck, or has noise;
当所述视频流不黑屏、不卡死并且不存在噪声时,判定视频流播放状态为播放正常;When the video stream is not black, is not stuck, and there is no noise, it is determined that the video stream playing state is normal playing;
当所述视频流出现黑屏、卡死或者噪声时,判定所述视频流的播放状态为播放异常。When a black screen, a stuck or a noise occurs in the video stream, it is determined that the playing state of the video stream is a play exception.
所述电压采集方法,其中,所述根据所述图片判断视频流是否黑屏包括:The voltage collection method, wherein determining whether the video stream is black according to the picture comprises:
将所述图片转为灰度图,并将所述灰度图二值化;Converting the picture into a grayscale image and binarizing the grayscale image;
统计灰度图二值化后的灰度图中的亮点个数,并将所述亮点个数与预设的个数阈值进行比较;Counting the number of bright points in the grayscale image after binarization of the grayscale image, and comparing the number of the bright spots with a preset number threshold;
当所述亮点个数小于所述个数阈值时,计数器加1;When the number of bright spots is less than the threshold number, the counter is incremented by one;
当所述计数器的值等于所述第一预设帧数时,判定所述视频流黑屏。When the value of the counter is equal to the first preset number of frames, it is determined that the video stream is black.
所述电压采集方法,其中,所述根据所述图片判断视频流是否卡死包括:The voltage collection method, wherein the determining, according to the picture, whether a video stream is stuck comprises:
以灰度图方式加载所述图片,并将所述图片的尺寸缩小到预设的第二尺寸;Loading the picture in a grayscale manner and reducing the size of the picture to a preset second size;
将所述第二尺寸的图片转化为直方图,并比较所述图片两两之间的相似度;Converting the picture of the second size into a histogram and comparing the similarity between the two pictures;
当所述相似度均大于预设值时,判定所述视频流卡死。When the similarity is greater than a preset value, it is determined that the video stream is stuck.
所述电压采集方法,其中,所述根据所述图片判断所述视频流是否存在噪声包括:The voltage collecting method, wherein the determining, according to the picture, whether the video stream has noise includes:
将图片转为灰度图并将所述灰度图二值化,并判断二值化后的灰度图是否存在马赛克;Converting the picture into a grayscale image and binarizing the grayscale image, and determining whether the binarized grayscale image has a mosaic;
记录存在马赛克的图片,并遍历所有存在马赛克的图片;Record the mosaiced picture and traverse all the images with mosaics;
当连续两张存在马赛克的图片出现2次以上或者连续3张图片存在马赛克,则判定所述视频流存在噪声。When two consecutive mosaic pictures appear more than two times or three consecutive pictures have mosaics, it is determined that there is noise in the video stream.
所述电压采集方法,其中,所述当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存包括:The voltage collecting method, wherein when the set-top box is detected to output the video stream, intercepting a picture of the first preset number of frames in the video stream and saving includes:
当监听到机顶盒输出所述视频流时,间隔第二预设帧数读取一帧预设尺寸的图片并记录截取帧数;When the set-top box is monitored to output the video stream, the second preset frame number is read by a frame of a preset size and the number of intercepted frames is recorded;
当所述截取帧数达到第一预设帧数时,停止截取并保存所有的图片。When the number of intercepted frames reaches the first preset number of frames, stop capturing and saving all the pictures.
所述电压采集方法,其中,所述调整所述调制器的电压值并实时监听下一 次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变包括:The voltage collecting method, wherein the adjusting the voltage value of the modulator and monitoring the next playing state in real time, and comparing the current playing state with the next playing state to determine whether the playing state is changed includes:
按照预设规则调整所述调制器的电压值并实时监听下一次播放状态;Adjusting the voltage value of the modulator according to a preset rule and monitoring the next play state in real time;
将所述当前播放状态和下一次播放状态进行比较;Comparing the current play state with the next play state;
若所述当前播放状态和下一次播放状态均为播放异常或者播放正常,则判定播放状态不变。If the current playing state and the next playing state are both abnormal playback or normal playback, it is determined that the playing state does not change.
一种电压采集设备,包括:A voltage collecting device comprising:
处理器,适于实现多条指令;以及a processor adapted to implement a plurality of instructions;
存储设备,适于存储多条指令,所述指令适于由处理器加载并执行如上任一所述的电压采集方法。A storage device adapted to store a plurality of instructions adapted to be loaded by a processor and to perform a voltage acquisition method as described above.
一种存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行如上任一所述的电压采集方法。A storage medium storing computer executable instructions arranged to perform a voltage collection method as described above.
一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任意一种方法。A computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to execute Any of the above methods.
本公开提供的电压采集方法、装置及存储介质,通过实时监听视频的播放状态是否改变来自动获取最大电压临界值和最小电压临界值,解放了人工采集临界电压的工作,并且减少了采集成本。The voltage collection method, device and storage medium provided by the present disclosure automatically acquire the maximum voltage threshold value and the minimum voltage threshold value by monitoring whether the playback state of the video changes in real time, thereby liberating the work of manually collecting the threshold voltage and reducing the collection cost.
图1为本实施例提供的电压采集方法的流程图。FIG. 1 is a flowchart of a voltage collecting method provided by this embodiment.
图2为本实施例提供的电压采集方法中步骤200的流程图。FIG. 2 is a flowchart of step 200 in the voltage collection method provided by this embodiment.
图3为本实施例提供的电压采集方法中步骤300的流程图。FIG. 3 is a flowchart of step 300 in the voltage collection method provided by this embodiment.
图4为本实施例提供的电压采集方法中步骤301的流程图。FIG. 4 is a flowchart of step 301 in the voltage collecting method provided by this embodiment.
图5为本实施例提供的电压采集方法中判断视频流黑屏的流程图。FIG. 5 is a flowchart of determining a black screen of a video stream in the voltage collecting method provided in the embodiment.
图6为本实施例提供的电压采集方法中判断视频流卡死的流程图。FIG. 6 is a flowchart of determining a video stream jam in the voltage collection method according to the embodiment.
图7为本实施例提供的电压采集方法中判断视频流存在噪声的流程图。FIG. 7 is a flowchart of determining noise in a video stream in the voltage collecting method provided in the embodiment.
图8为本实施例提供的电压采集方法中步骤400的流程图。FIG. 8 is a flowchart of step 400 in the voltage collecting method provided by this embodiment.
图9为本实施例提供的另一种电压采集方法的流程图。FIG. 9 is a flowchart of another voltage collecting method provided by this embodiment.
图10为本实施例提供的电压采集设备的结构原理图;FIG. 10 is a schematic structural diagram of a voltage collecting device according to an embodiment of the present invention;
图11为本实施例提供的电压采集设备的硬件结构示意图。FIG. 11 is a schematic structural diagram of hardware of a voltage collecting device according to an embodiment of the present invention.
下面结合附图,通过对实施例的描述,对本公开内容进行说明。The present disclosure will be described below by way of a description of embodiments with reference to the accompanying drawings.
请参照图1,图1为本实施例提供的电压采集方法的流程图。所述方法包括以下步骤。Please refer to FIG. 1. FIG. 1 is a flowchart of a voltage collection method according to an embodiment. The method includes the following steps.
在步骤100中,设置调制器电压值为预设的初始电压值并将预设频点值处的视频流发送至机顶盒,其中,所述初始电压值与所述预设频点值相对应。In step 100, the modulator voltage value is set to a preset initial voltage value and the video stream at the preset frequency point value is sent to the set top box, wherein the initial voltage value corresponds to the preset frequency point value.
可选地,所述电压值为所述调制器本身的电压值,该电压值决定了调制器发送的视频流的信号强度。在后续机顶盒高频头灵敏度的判断中,所述电压值用来判定机顶盒产品硬件是否达到产品规格书要求,若不符合要求,则因为硬件原因导致接收码流的不稳定,所述电压值根据机顶盒的产品规格书进行设置。所述预设频点值为预先设置的频点值,所述频点值可以为1个也可以为多个。所述初始电压值与所述频点值相对应,即不同的频点值对应的初始电压值可能相同也可能不同,根据机顶盒的产品规格书设置所述初始电压值来开始采集工序。Optionally, the voltage value is a voltage value of the modulator itself, the voltage value determining a signal strength of a video stream transmitted by the modulator. In the judgment of the sensitivity of the set-top box high-frequency head, the voltage value is used to determine whether the hardware of the set-top box product meets the requirements of the product specification. If the requirements are not met, the received code stream is unstable due to hardware reasons, and the voltage value is determined according to the hardware value. Set the product specifications of the set-top box. The preset frequency point value is a preset frequency point value, and the frequency point value may be one or more. The initial voltage value corresponds to the frequency point value, that is, the initial voltage values corresponding to different frequency point values may be the same or different, and the initial voltage value is set according to the product specification of the set top box to start the collecting process.
在步骤200中,当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存。In step 200, when the set top box is monitored to output the video stream, the picture of the first preset number of frames in the video stream is intercepted and saved.
可选地,所述机顶盒通过射频(Radio Frequency,RF)接收头接收所述调制器发送的所述频点值处的视频流数据,并通过高清晰度多媒体接口(High-Definition Multimedia Interface,HDMI)接口将所述视频流数据输出至显示界面以播放视频。Optionally, the set top box receives the video stream data at the frequency point value sent by the modulator by using a radio frequency (RF) receiving head, and passes through a high-definition multimedia interface (HDMI). The interface outputs the video stream data to a display interface to play the video.
在本实施例中,所述当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存可以包括以下步骤。In this embodiment, when the set top box outputs the video stream, intercepting the picture of the first preset number of frames in the video stream and saving may include the following steps.
在步骤201中,当监听到机顶盒输出所述视频流时,间隔第二预设帧数读取一帧预设尺寸的图片并记录截取帧数。In step 201, when the set top box is monitored to output the video stream, a second preset frame number is read at intervals of one frame and the number of intercepted frames is recorded.
在步骤202中,当所述截取帧数达到第一预设帧数时,停止截取并以jpg格式保存所有的图片。In step 202, when the number of intercepted frames reaches the first preset number of frames, the interception is stopped and all the pictures are saved in the jpg format.
可选地,在所述步骤201中,截取频率可以为每一帧数据都截取,也可以间隔第二预设帧数截取一次。由于人眼能分辨视频差异在4-6帧,因此在本实施例中,可以间隔4帧截取一次数据。这样就在读取图片数据时,不需要每一帧都读取,以有效节约内存空间,减少图片处理的工作量。所述预设尺寸为预先设置的所要读取的图片的尺寸(例如,宽度和高度)。图片数据的尺寸与视频源宽高一致或和机顶盒设置播放时分辨率一致。这样,可以保证不存在黑边补偿,因为若有黑边存在,则截取的图片进行马赛克判断时会检测出线条,导致判断出错。所述第一预设帧数指的是要截取的图片数据的帧数,可以根据视频的帧率和时间计算出需要抓取的图片总数。Optionally, in the step 201, the interception frequency may be intercepted for each frame of data, or may be intercepted once by the second preset number of frames. Since the human eye can distinguish the video difference in 4-6 frames, in the present embodiment, the data can be intercepted once every 4 frames. In this way, when reading picture data, it is not necessary to read every frame, so as to effectively save memory space and reduce the workload of image processing. The preset size is a size (for example, width and height) of a picture to be read that is set in advance. The size of the picture data is the same as the video source width or the resolution of the set-top box settings. In this way, it can be ensured that there is no black edge compensation, because if there is a black edge, the captured picture will detect the line when the mosaic is judged, resulting in an error. The first preset frame number refers to the number of frames of the picture data to be intercepted, and the total number of pictures to be captured may be calculated according to the frame rate and time of the video.
在实际应用中,所述当监听到机顶盒输出所述视频流时,间隔第二预设帧数读取一帧预设尺寸的图片数据并记录截取帧数的过程可以为以下内容。In an actual application, when the set top box outputs the video stream, the process of reading a frame of preset frame size and recording the number of intercepted frames by the second preset frame number may be the following content.
初始化安装于测试端内的采集卡;向所述采集卡设置需要采集的图片的宽度和高度;采集卡间隔4帧读取一帧数据并将读取到的数据保存为jpg格式;采集卡循环读取图片数据直至读取的图片数量达到预设值;关闭采集卡。Initializing the acquisition card installed in the test end; setting the width and height of the picture to be collected to the acquisition card; reading the frame data by 4 frames at intervals of the acquisition card and saving the read data as jpg format; collecting card cycle Read the picture data until the number of pictures read reaches the preset value; close the capture card.
在步骤300中,根据所述图片判断所述视频流的当前播放状态,其中,所述播放状态包括播放正常和播放异常。In step 300, the current play state of the video stream is determined according to the picture, where the play status includes normal play and abnormal play.
可选地,所述播放状态指的是视频播放的图像质量。所述播放正常指的是视频播放时不存在黑屏、卡死以及噪声。所述播放异常指的视频播放时出现黑屏、卡死或者噪声等现象而无法正常观看。黑屏指的是显示界面没有视频信号而出现黑屏图。所述视频卡死指的是播放的视频由于码流不稳定而出现定格的现象,即截取的多帧图片均相同。视频存在噪声指的是其中的图片存在马赛克。由于噪声检测核心算法是判断截取的图片中是否包含线条,视频若不为纯色或过渡色则检测会出现误判。因此,在本实施例中,调制器播放的视频流为由纯色或者过渡色的图片组成的。Optionally, the play status refers to the image quality of video playback. The normal play means that there is no black screen, jam and noise when the video is played. The playback abnormality refers to a phenomenon in which a black screen, a card is stuck, or a noise occurs during video playback, and the video cannot be viewed normally. A black screen refers to a black screen with no video signal on the display interface. The video card dead refers to the phenomenon that the played video is frozen due to the unstable code stream, that is, the intercepted multi-frame pictures are the same. Video presence noise refers to the presence of mosaics in the pictures. Since the noise detection core algorithm determines whether the intercepted picture contains lines, if the video is not a solid color or a transition color, the detection will be misjudged. Therefore, in the present embodiment, the video stream played by the modulator is composed of pictures of a solid color or a transition color.
示例性的,根据所述图片判断所述视频流的当前播放状态可以包括以下步骤。Exemplarily, determining the current playing state of the video stream according to the picture may include the following steps.
在步骤301中,根据所述图片判断所述视频流是否黑屏、卡死或者存在噪声。In step 301, it is determined whether the video stream is black, stuck, or has noise according to the picture.
在步骤302中,当所述视频流不黑屏、不卡死并且不存在噪声时,判定视频流播放状态为播放正常。In step 302, when the video stream is not black, is not stuck, and there is no noise, it is determined that the video stream playing state is normal.
在步骤303中,当所述视频流出现黑屏、卡死或者噪声时,判定所述视频流的播放状态为播放异常。In step 303, when the video stream has a black screen, a stuck or a noise, it is determined that the playing state of the video stream is a play exception.
可选地,在所述步骤301中,由于在测试中可能会存在接收不到信号的情况,接收不到信号表现为黑屏,此时的电压也是不符合要求的,因此在判断所 述视频是否卡死或者存在噪声之前还包括一个判断是否黑屏的过程,只有当视频播放时不黑屏,才判断其是否为卡死或者存在噪声,这样还可以节省了图片处理的步骤,节约了测试资源。因此,如图4所示,所述步骤301可以包括以下步骤。Optionally, in the step 301, since there is a possibility that the signal is not received during the test, the received signal is displayed as a black screen, and the voltage at this time is also unsatisfactory. Therefore, it is determined whether the video is Before the card is stuck or there is noise, it also includes a process of judging whether it is a black screen. Only when the video is not black, it is judged whether it is stuck or there is noise, which can save the steps of image processing and save test resources. Therefore, as shown in FIG. 4, the step 301 can include the following steps.
在步骤3011中,根据所述图片判断所述视频流是否黑屏。In step 3011, it is determined whether the video stream is black based on the picture.
在步骤3012中,当所述视频流不为黑屏时,根据所述图片判断所述视频流是否卡死或者存在噪声。In step 3012, when the video stream is not a black screen, it is determined whether the video stream is stuck or there is noise according to the picture.
可选地,在所述步骤3011中,黑屏是通过判断图片的亮点像素个数,若截取的所有图片的亮点像素个数都小于该图片高度(宽度)则表示此段视频为黑屏。如图5所示,判断视频流是否为黑屏的过程可以包括以下步骤。Optionally, in the step 3011, the black screen determines the number of bright pixels of the picture. If the number of bright pixels of all the pictures is less than the height (width) of the picture, the video is black. As shown in FIG. 5, the process of determining whether the video stream is a black screen may include the following steps.
在步骤H10中,将所述图片转为灰度图,并将所述灰度图二值化。In step H10, the picture is converted to a grayscale image, and the grayscale image is binarized.
在步骤H20中,统计灰度图二值化后的灰度图中的亮点个数,并将所述亮点个数与预设的个数阈值进行比较。In step H20, the number of bright points in the grayscale image after binarization of the grayscale image is counted, and the number of bright spots is compared with a preset number threshold.
在步骤H30中,当所述亮点个数小于所述个数阈值时,计数器加1。In step H30, when the number of bright spots is less than the number threshold, the counter is incremented by one.
在步骤H40中,当所述计数器的值等于所述第一预设帧数时,判定所述视频流黑屏。In step H40, when the value of the counter is equal to the first preset number of frames, it is determined that the video stream is black.
可选地,二值化又称为灰度分划(Threshold),一般影像的灰度分划成只有两种灰度值,亦即设定一个灰度值,凡是影像本身灰度大于它的便令其为亮点而灰度值低于设定值的,便令其为暗点。所述预设的个数阈值为预先设置亮点个数,例如1000。即当亮点个数小于1000时,判定所述灰度图为黑屏图。当所截取的所有图片均为黑屏图,即所述计数器的值等于所有图片的个数时,判定所述视频流为黑屏。这说明在本次测试中,机顶盒没有信号输出至测试端。当为黑屏时,说明机顶盒没有信号输出至显示界面,判定当前播放状态为播放异 常;当不为黑屏时,说明此时机顶盒有信号输出至显示界面,执行步骤3012。Optionally, the binarization is also called a grayscale division (Threshold), and the gray scale of the general image is divided into two gray values, that is, a gray value is set, and the gray scale of the image itself is greater than its If it is a bright spot and the gray value is lower than the set value, it will be a dark spot. The preset number threshold is a preset number of bright spots, for example, 1000. That is, when the number of bright spots is less than 1000, it is determined that the grayscale image is a black screen. When all the pictures intercepted are black screens, that is, the value of the counter is equal to the number of all pictures, it is determined that the video stream is a black screen. This shows that in this test, the set-top box has no signal output to the test terminal. When it is a black screen, it indicates that the set-top box has no signal output to the display interface, and determines that the current playing state is abnormal for playing; when it is not black, it indicates that the set-top box has a signal output to the display interface, and step 3012 is performed.
在所述步骤303中,由于出现卡死的可能原因为该电压值下接收码流信号差,使得码流播出不稳定,导致播放异常。而噪声直接影响画质,因此在确定机顶盒有信号输出后,才判定视频是否卡死或者存在噪声。In the step 303, the possible cause of the jam is that the received code stream signal is poor under the voltage value, so that the code stream is unstable, causing the play to be abnormal. The noise directly affects the picture quality. Therefore, after determining that the set-top box has a signal output, it is determined whether the video is stuck or there is noise.
在本实施例中,如图6所示,所述根据所述图片判断所述视频流是否卡死可以包括以下步骤。In this embodiment, as shown in FIG. 6, determining whether the video stream is stuck according to the picture may include the following steps.
在步骤M10中,以灰度图方式加载所述图片,并将所述图片的尺寸缩小到预设的第二尺寸。In step M10, the picture is loaded in a grayscale manner, and the size of the picture is reduced to a preset second size.
在步骤M20中,将所述第二尺寸的图片转化为直方图,并比较所述图片两两之间的相似度。In step M20, the picture of the second size is converted into a histogram, and the similarity between the two pictures is compared.
在步骤M30中,当所述相似度均大于预设值时,判定所述视频流卡死。In step M30, when the similarity is greater than a preset value, it is determined that the video stream is stuck.
可选地,所述预设的第二尺寸为预先设置的缩小尺寸,例如,256*256。将图片统一缩小为所述第二尺寸可以加快运算速率,提高处理效率。所述预设值为预设的相似度阈值,例如,0.9,0.95等。将图片以灰度图形式读入内存,并缩小图片大小至所述第二尺寸;计算缩小后的图片的直方图数据,并比较两个图片的直方图数据;若相似度大于0.9,则判定两张图片相似;重复执行上述步骤,并按照截图先后顺序将所述预设帧图片两两对比,当所有的相似度均大于0.9时,即所有截取的图片均为相似时,判定视频流卡死。Optionally, the preset second size is a preset reduced size, for example, 256*256. Reducing the picture to the second size uniformly can speed up the calculation and improve the processing efficiency. The preset value is a preset similarity threshold, for example, 0.9, 0.95, and the like. Reading the picture into the memory as a grayscale image, and reducing the size of the image to the second size; calculating the histogram data of the reduced image, and comparing the histogram data of the two images; if the similarity is greater than 0.9, determining The two pictures are similar; repeat the above steps, and compare the preset frame pictures in the order of the screenshots. When all the similarities are greater than 0.9, that is, all the captured pictures are similar, the video stream card is determined. dead.
在本实施例中,如图7所示,所述根据所述预设帧图片判断所述视频流是否存在噪声可以包括以下步骤。In this embodiment, as shown in FIG. 7, determining whether the video stream has noise according to the preset frame picture may include the following steps.
在步骤N10中,将图片转为灰度图并将所述灰度图二值化,并判断二值化后的灰度图是否存在马赛克。In step N10, the picture is converted into a grayscale image and the grayscale image is binarized, and it is determined whether the binarized grayscale image has a mosaic.
在步骤N20中,记录存在马赛克的图片,并遍历所有存在马赛克的图片。In step N20, the picture in which the mosaic exists is recorded, and all the pictures in which the mosaic exists are traversed.
在步骤N30中,当连续两张存在马赛克的图片出现2次以上或者连续3张图片存在马赛克,则判定所述视频流存在噪声。In step N30, when two consecutive mosaic pictures appear more than two times or three consecutive pictures have mosaics, it is determined that there is noise in the video stream.
可选地,在所述步骤N10中,将灰度图边缘化,二值化,如果图片为纯色或者过渡色,做完此项数据均会变成黑色,如果有马赛克或者其他线条出现,说明其中有噪声。马赛克的表现形式为色块,色块由线条围成,通过灰度图将像素颜色调整到单通道0-255,再通过图片边缘化将线条勾勒为白色,非线条部分为黑色。在本实施例中,通过统计亮点个数来判定是否出现马赛克,其中,亮点个数为图片边缘化后的马赛克色块的边框的像素点个数。判定是否存在噪声的过程为:统计亮点个数,如果亮点个数大于100说明有马赛克出现,记录该图,此刻不直接判断为存在噪声是因为可能抓取到帧间图,所以需要多张,连续多次才能判断为存在噪声。Optionally, in the step N10, the grayscale image is edged and binarized. If the image is a solid color or a transition color, the data will be black after the completion of the data, if there is a mosaic or other lines, There is noise. The representation of the mosaic is a color block. The color block is surrounded by lines. The color of the pixel is adjusted to a single channel 0-255 through the grayscale image, and the line is outlined as white by the edge of the image, and the non-line portion is black. In this embodiment, it is determined whether the mosaic appears by counting the number of bright spots, wherein the number of bright spots is the number of pixels of the border of the mosaic color block after the image is edged. The process of judging whether there is noise is: counting the number of bright spots. If the number of bright spots is greater than 100, it indicates that there is a mosaic, and the map is recorded. At this moment, it is not directly judged that there is noise because it is possible to capture the interframe, so multiple sheets are needed. It can be judged as noise in succession for several times.
可选地,在所述步骤N20中,遍历N10中统计的图片,将连续3张以上或连续2张出现2次以上的图片进行判断,成立则表示本次测试存在噪声。因为截取图片的时候是间隔4帧抓取一张,出现两次则表示在8帧图片中存在两张图片为马赛克,而马赛克一旦出现必然是连续多张。单张不能判断的原因是视频为动态视频,由不同的图片组成,两张图片进行刷新的时候,采集卡可能采取到帧间图(上半部分或左半部分为前一帧图,下半部分或由半部分为后一帧图),此时进行噪声判断会出现误判。因此,通过将连续3张以上或连续2张出现2次以上的图片进行判断可以提高噪声判定的准确性,避免误判。Optionally, in the step N20, the picture counted in the N10 is traversed, and three or more consecutive pictures or two consecutive pictures are displayed for two or more times. When the picture is established, it indicates that there is noise in the test. Because the picture is captured at intervals of 4 frames, two times appear that there are two pictures in the 8 frames of the picture as mosaic, and the mosaic must be continuous multiple times. The reason why a single sheet cannot be judged is that the video is a dynamic video and consists of different pictures. When two pictures are refreshed, the acquisition card may take an interframe picture (the upper part or the left part is the previous frame picture, the lower part) Part or half of the picture is the next frame. At this time, the noise judgment will be misjudged. Therefore, by judging three or more consecutive pictures or two consecutive pictures, the accuracy of noise determination can be improved, and false positives can be avoided.
在步骤400中,调整所述调制器的电压值并实时监听下一次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变。In step 400, the voltage value of the modulator is adjusted and the next play state is monitored in real time, and the current play state is compared with the next play state to determine whether the play state is changed.
示例性的,如图8所示,所述步骤400可以包括以下步骤。Illustratively, as shown in FIG. 8, the step 400 may include the following steps.
在步骤401中,按照预设规则调整所述调制器的电压值并实时监听下一次 播放状态。In step 401, the voltage value of the modulator is adjusted according to a preset rule and the next play state is monitored in real time.
在步骤402中,将所述当前播放状态和下一次播放状态进行比较。In step 402, the current play state and the next play state are compared.
在步骤403中,若所述当前播放状态和下一次播放状态均为播放异常或者播放正常,则判定播放状态不变。In step 403, if the current play state and the next play state are both abnormal playback or normal playback, it is determined that the play state does not change.
可选地,所述预设规则指的是预先设置的调整电压的规则。例如,可以按照一定的间隔来调整电压值,即可以每一次调大/调小0.5V,这样依次调整调制器的电压值。当然,还可以根据经验值进行调整。Optionally, the preset rule refers to a preset rule for adjusting a voltage. For example, the voltage value can be adjusted at a certain interval, that is, 0.5V can be adjusted up/down each time, so that the voltage value of the modulator is sequentially adjusted. Of course, it can also be adjusted according to the empirical value.
电压采集装置实时监听调制器电压调整后发送的视频流的下一次播放状态。当接收到下一次播放状态后,将所述当前播放状态与下一次获取的播放状态进行比较,若二者相同,则判定播放状态不变;若二者不同,则判断播放状态改变。例如,当前播放状态为播放异常,而监听到的下一次播放状态为播放异常,二次检测到的播放状态相同,则说明当前视频流的电压没有达到机顶盒的高频头能够正常处理的电压,因此需要继续调整输入机顶盒的视频流的电压。The voltage collecting device monitors the next playing state of the video stream sent after the modulator voltage is adjusted in real time. After receiving the next play state, the current play state is compared with the next acquired play state. If the two are the same, the play state is determined to be unchanged; if the two are different, the play state is determined to be changed. For example, the current playing state is a play exception, and the next played state monitored is a play exception, and the second detected play state is the same, indicating that the current video stream voltage does not reach the voltage that the set box's tuner can normally process. Therefore, it is necessary to continue to adjust the voltage of the video stream input to the set top box.
在步骤500中,若所述播放状态不变,则循环执行所述步骤400直至所述播放状态改变两次并分别记录所述两次改变对应的两个电压值以获得所述预设频点值处对应的第一电压临界值和第二电压临界值。In step 500, if the playing state is unchanged, the step 400 is performed cyclically until the playing state is changed twice, and the two voltage values corresponding to the two changes are respectively recorded to obtain the preset frequency point. The first voltage threshold and the second voltage threshold corresponding to the value.
可选地,所述第一临界电压值和第二临界电压值均为调整后的调制器在某点的电压值,二者组成一个电压区间,在所述区间内机顶盒能够获取调制器在所述频点值下的视频信号,并输出无噪声的视频进行播放,因此所述第一电压临界值和第二电压临界值可以反应所述机顶盒高频头模块的灵敏度。若所述播放状态不改变,则说明所述当前播放状态和下一次播放状态均为播放正常或者播放异常,那么,继续调整调制器的电压值并持续监听调整后的播放状态(即下一次播放状态)直至发生第一次改变,并记录所述第一次改变时其对应的调 整后电压,即为第一电压临界值;继续调整调制器的电压值直至监听到的播放状态再一次改变,则记录第二次改变时对应的第二电压临界值,所述第一电压临界值和第二电压临界值即为在所述频点值处的两个电压临界值。Optionally, the first threshold voltage value and the second threshold voltage value are voltage values of the adjusted modulator at a certain point, and the two form a voltage interval, in which the set top box can acquire the modulator at the location The video signal at the frequency point value is output, and the noise-free video is output for playing, so the first voltage threshold and the second voltage threshold can reflect the sensitivity of the set-top box tuner module. If the playing state does not change, it indicates that the current playing state and the next playing state are both normal playing or abnormal playing, then continue to adjust the voltage value of the modulator and continuously monitor the adjusted playing state (ie, next play) State) until the first change occurs, and the corresponding adjusted voltage when the first change is recorded, that is, the first voltage threshold; continue to adjust the voltage value of the modulator until the monitored play state changes again, Then, a corresponding second voltage threshold value is recorded when the second change is made, and the first voltage threshold value and the second voltage threshold value are two voltage threshold values at the frequency point value.
后续可以根据所述两个电压临界值来判断所述机顶盒的高频头模块的灵敏度是否达到产品规格书的要求。这样,通过自动采集机顶盒高频头处理后能够正常播放的视频流的临界电压值,以达到解放测试人员的目的,使得对机顶盒高频头灵敏度测试业务不是很熟悉的测试工程师也可以测试机顶盒高频头灵敏度指标。并且自动化采集可以覆盖所有数字视频广播(Digital Video Broadcasting,DVB)盒子,扩大覆盖率和适用范围,节约了临界电压值的采集成本。Subsequently, it can be determined according to the two voltage thresholds whether the sensitivity of the high frequency head module of the set top box meets the requirements of the product specification. In this way, by automatically collecting the threshold voltage value of the video stream that can be normally played after the high-frequency head of the set-top box is processed, the purpose of liberating the tester is achieved, so that the tester of the set-top box high-frequency head sensitivity test is not very familiar, and the test set can also test the set-top box height. Frequency sensitivity indicator. And automated acquisition can cover all Digital Video Broadcasting (DVB) boxes, increasing coverage and scope, saving the cost of collecting critical voltage values.
在另一个实施例中,当需要测试的所述频点值为多个时,如图9所示,测试所述多个频点值处的临界电压值的可以包括以下步骤。在步骤M1中,当检测到多个预设频点值时,分别获取所述多个预设频点值对应的初始电压值,并将所述多个预设频点值及与所述多个预设频点值对应的初始电压值导入所述调制器。In another embodiment, when the frequency value to be tested is a plurality of values, as shown in FIG. 9, testing the threshold voltage value at the plurality of frequency point values may include the following steps. In step M1, when a plurality of preset frequency point values are detected, the initial voltage values corresponding to the plurality of preset frequency point values are respectively acquired, and the plurality of preset frequency point values are The initial voltage value corresponding to the preset frequency point value is introduced into the modulator.
在步骤M2中,设置调制器设置电压值为预设的第一初始电压值并将预设第一频点值处的视频流发送至机顶盒,其中,所述第一初始电压值与所述第一频点值相对应。In step M2, setting a modulator set voltage value to a preset first initial voltage value and transmitting the video stream at the preset first frequency point value to the set top box, wherein the first initial voltage value and the first A frequency point value corresponds.
在步骤M3中,当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存。In step M3, when the set top box is monitored to output the video stream, the picture of the first preset number of frames in the video stream is intercepted and saved.
在步骤M4中,根据所述图片判断所述视频流的当前播放状态,其中,所述播放状态包括播放正常和播放异常。In step M4, the current play state of the video stream is determined according to the picture, where the play status includes normal play and abnormal play.
在步骤M5中,调整所述调制器的电压值并实时监听下一次播放状态,并将 所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变。In step M5, the voltage value of the modulator is adjusted and the next play state is monitored in real time, and the current play state and the next play state are compared to determine whether the play state is changed.
在步骤M6中,若所述播放状态不变,则循环执行所述步骤M5直至所述播放状态改变两次并分别记录所述两次改变对应的两个电压值以获得所述预设频点值处对应的第一电压临界值和第二电压临界值。In step M6, if the playing state is unchanged, the step M5 is cyclically executed until the playing state is changed twice, and the two voltage values corresponding to the two changes are respectively recorded to obtain the preset frequency point. The first voltage threshold and the second voltage threshold corresponding to the value.
在步骤M7中,按照所述多个频点值的顺序,依次循环执行所述步骤M2-M6以分别获取所述多个预设频点值处的第一临界电压值和第二临界电压值。In step M7, the steps M2-M6 are sequentially executed in sequence according to the sequence of the plurality of frequency point values to respectively acquire the first threshold voltage value and the second threshold voltage value at the plurality of preset frequency point values. .
在本实施例中,由于存在多个待测频点值,因此需要控制所述调制器发射不同频点值处的调制后的视频流信号至机顶盒,因此在所述调制器设置自身电压为预设的初始电压值并发送预设频点值处的视频流至机顶盒之前还可以包括一个导入和设置频点值的过程,其过程可以为:控制调制器播放待发送的视频流并设置多个频点值;发送设置指令至机顶盒以使得机顶盒将频点值设为所述预设频点值并搜所频道;根据机顶盒搜索的频道控制调制器发送所述预设频点值处的视频流至所述机顶盒。其中,所述多个频点值为根据所述机顶盒的产品规格书设置的频点数据,其可以保存于Excel表格中,然后再加载至所述调制器中。所述设置指令可以为所述采集装置驱动机顶盒遥控设备(例如,红外遥控器,蓝牙遥控器等)发出的频点设置指令,也可以为直接操作所述机顶盒产生的频点设置指令进行搜台。In this embodiment, since there are a plurality of frequency points to be measured, it is necessary to control the modulator to transmit the modulated video stream signal at different frequency point values to the set top box, so setting the voltage of the modulator to the preset Before the initial voltage value is set and the video stream at the preset frequency point value is sent to the set top box, the process of importing and setting the frequency point value may also be included, the process may be: controlling the modulator to play the video stream to be sent and setting multiple a frequency point value; sending a setting command to the set top box to cause the set top box to set the frequency point value to the preset frequency point value and searching for the channel; and transmitting the video stream at the preset frequency point value according to the channel control modulator of the set top box search To the set top box. The plurality of frequency points are frequency point data set according to a product specification of the set top box, and may be stored in an Excel table and then loaded into the modulator. The setting instruction may be a frequency setting instruction sent by the collecting device to drive a set top box remote control device (for example, an infrared remote controller, a Bluetooth remote controller, etc.), or may be used to directly operate a frequency point setting instruction generated by the set top box. .
本实施例提供了一种电压采集设备,如图10所示,该电压采集设备包括处理器100和存储器200。This embodiment provides a voltage collecting device. As shown in FIG. 10, the voltage collecting device includes a processor 100 and a memory 200.
其中,处理器100适于实现多条指令;以及存储器200适于存储多条指令,所述指令适于由处理器100加载并执行如上任一所述的电压采集方法。The processor 100 is adapted to implement a plurality of instructions; and the memory 200 is adapted to store a plurality of instructions adapted to be loaded by the processor 100 and to perform the voltage acquisition method as described above.
可选地,所述指令适于由处理器100加载并执行以下步骤。Optionally, the instructions are adapted to be loaded by the processor 100 and perform the following steps.
在步骤H1中,设置调制器电压值为预设的初始电压值并将预设频点值处的 视频流发送至机顶盒,其中,所述初始电压值与所述预设频点值相对应。In step H1, the modulator voltage value is set to a preset initial voltage value and the video stream at the preset frequency point value is sent to the set top box, wherein the initial voltage value corresponds to the preset frequency point value.
在步骤H2中,当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存。In step H2, when the set top box is monitored to output the video stream, the picture of the first preset number of frames in the video stream is intercepted and saved.
在步骤H3中,根据所述图片判断所述视频流的当前播放状态,其中,所述播放状态包括播放正常和播放异常。In step H3, the current play state of the video stream is determined according to the picture, where the play status includes normal play and abnormal play.
在步骤H4中,调整所述调制器的电压值并实时监听下一次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变。In step H4, the voltage value of the modulator is adjusted and the next play state is monitored in real time, and the current play state is compared with the next play state to determine whether the play state is changed.
在步骤H5中,若所述播放状态不变,则循环执行所述步骤H4直至所述播放状态改变两次并分别记录所述两次改变对应的两个电压值以获得所述预设频点值处对应的第一电压临界值和第二电压临界值。In step H5, if the playing state is unchanged, the step H4 is performed cyclically until the playing state is changed twice, and the two voltage values corresponding to the two changes are respectively recorded to obtain the preset frequency point. The first voltage threshold and the second voltage threshold corresponding to the value.
如图11所示,所述电压采集设备还可以包括:输入装置300和输出装置400。As shown in FIG. 11, the voltage collecting device may further include: an input device 300 and an output device 400.
所述电压采集设备中的处理器100、存储器200、输入装置300和输出装置400可以通过总线或者其他方式连接,图11中以通过总线连接为例。The processor 100, the memory 200, the input device 300, and the output device 400 in the voltage collecting device may be connected by a bus or other means, and the bus connection is taken as an example in FIG.
输入装置300可以接收输入的数字或字符信息,输出装置400可以包括显示屏等显示设备。The input device 300 can receive input digital or character information, and the output device 400 can include a display device such as a display screen.
存储器200作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块。处理器100通过运行存储在存储器200中的软件程序、指令以及模块,从而执行多种功能应用以及数据处理,以实现上述实施例中的任意一种方法。The memory 200 is a computer readable storage medium that can be used to store software programs, computer executable programs, and modules. The processor 100 executes a plurality of functional applications and data processing by executing software programs, instructions, and modules stored in the memory 200 to implement any of the above embodiments.
存储器200可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器可以包括随机存取存储器(Random Access Memory,RAM)等易失性存储器,还可以包括非易失性存储器,例如至少一个 磁盘存储器件、闪存器件或者其他非暂态固态存储器件。The memory 200 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the electronic device, and the like. Further, the memory may include volatile memory such as random access memory (RAM), and may also include non-volatile memory such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
存储器200可以是非暂态计算机存储介质或暂态计算机存储介质。该非暂态计算机存储介质,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器200可选包括相对于处理器100远程设置的存储器,这些远程存储器可以通过网络连接至电压采集设备。上述网络的实例可以包括互联网、企业内部网、局域网、移动通信网及其组合。 Memory 200 can be a non-transitory computer storage medium or a transitory computer storage medium. The non-transitory computer storage medium, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 200 can optionally include memory remotely located relative to the processor 100, which can be connected to the voltage collection device via a network. Examples of the above networks may include the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
输入装置300可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。输出装置400可包括显示屏等显示设备。The input device 300 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the electronic device. The output device 400 can include a display device such as a display screen.
实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来执行相关的硬件来完成的,该程序可存储于一个非暂态计算机可读存储介质中,该程序在执行时,可包括如上述方法的实施例的流程,其中,该非暂态计算机可读存储介质可以为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。The implementation of all or part of the processes in the foregoing embodiment may be performed by a computer program executing related hardware, and the program may be stored in a non-transitory computer readable storage medium, and the program may include, when executed, A flow of an embodiment of the method, wherein the non-transitory computer readable storage medium is a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory (RAM).
本实施例提供了一种存储介质,其存储有多条指令,所述指令适于由处理器加载并执行如上任一所述的电压采集方法。The present embodiment provides a storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform a voltage acquisition method as described above.
上述存储介质以及电压采集装置中的指令的功能在上述方法中已经进行说明。The functions of the above described storage medium and instructions in the voltage collection device have been described in the above methods.
本公开提供的电压采集方法、装置及存储介质,通过实时监听视频的播放状态是否改变来自动获取最大电压临界值和最小电压临界值,解放了人工采集临界电压的工作,并且减少了采集成本。The voltage collection method, device and storage medium provided by the present disclosure automatically acquire the maximum voltage threshold value and the minimum voltage threshold value by monitoring whether the playback state of the video changes in real time, thereby liberating the work of manually collecting the threshold voltage and reducing the collection cost.
Claims (10)
- 一种电压采集方法,包括:A voltage collection method includes:设置调制器电压值为预设的初始电压值并将预设频点值处的视频流发送至机顶盒,其中,所述初始电压值与所述预设频点值相对应;Setting a modulator voltage value to a preset initial voltage value and transmitting the video stream at the preset frequency point value to the set top box, wherein the initial voltage value corresponds to the preset frequency point value;当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存;When the set top box is monitored to output the video stream, intercepting a picture of the first preset number of frames in the video stream and saving the image;根据所述图片判断所述视频流的当前播放状态,其中,所述播放状态包括播放正常和播放异常;Determining, according to the picture, a current playing state of the video stream, where the playing state includes normal playing and abnormal playing;调整所述调制器的电压值并实时监听下一次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变;Adjusting the voltage value of the modulator and monitoring the next playing state in real time, and comparing the current playing state with the next playing state to determine whether the playing state is changed;若所述播放状态不变,则循环执行所述调整所述调制器的电压值并实时监听下一次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变的步骤,直至所述播放状态改变两次并分别记录所述两次改变对应的两个电压值以获得所述预设频点值处对应的第一电压临界值和第二电压临界值。If the playing state is unchanged, the voltage value of the modulator is cyclically executed and the next playing state is monitored in real time, and the current playing state and the next playing state are compared to determine whether the playing state is changed. Steps, until the playing state is changed twice and separately recording the two voltage values corresponding to the two changes to obtain a corresponding first voltage threshold and a second voltage threshold at the preset frequency value.
- 根据权利要求1所述电压采集方法,还包括:The voltage collecting method according to claim 1, further comprising:当检测到多个预设频点值时,分别获取所述多个预设频点值对应的初始电压值,并将所述多个预设频点值及与所述多个预设频点值对应的初始电压值导入所述调制器;When a plurality of preset frequency point values are detected, respectively acquiring initial voltage values corresponding to the plurality of preset frequency point values, and the plurality of preset frequency point values and the plurality of preset frequency points The initial voltage value corresponding to the value is introduced into the modulator;按照所述多个频点值的顺序,分别获取所述多个预设频点值处的第一临界电压值和第二临界电压值。Obtaining a first threshold voltage value and a second threshold voltage value at the plurality of preset frequency point values according to the sequence of the plurality of frequency point values.
- 根据权利要求1所述电压采集方法,其中,所述根据所述图片判断所述视频流的播放状态包括:The voltage collecting method according to claim 1, wherein the determining, according to the picture, the playing status of the video stream comprises:根据所述图片判断所述视频流是否黑屏、卡死或者存在噪声;Determining, according to the picture, whether the video stream is black, stuck, or has noise;当所述视频流不黑屏、不卡死并且不存在噪声时,判定视频流播放状态为播放正常;When the video stream is not black, is not stuck, and there is no noise, it is determined that the video stream playing state is normal playing;当所述视频流出现黑屏、卡死或者噪声时,判定所述视频流的播放状态为播放异常。When a black screen, a stuck or a noise occurs in the video stream, it is determined that the playing state of the video stream is a play exception.
- 根据权利要求3所述电压采集方法,其中,所述根据所述图片判断所述视频流是否黑屏包括:The voltage collecting method according to claim 3, wherein the determining, according to the picture, whether the video stream is black or not comprises:将所述图片转为灰度图,并将所述灰度图二值化;Converting the picture into a grayscale image and binarizing the grayscale image;统计灰度图二值化后的灰度图中的亮点个数,并将所述亮点个数与预设的个数阈值进行比较;Counting the number of bright points in the grayscale image after binarization of the grayscale image, and comparing the number of the bright spots with a preset number threshold;当所述亮点个数小于所述个数阈值时,计数器加1;When the number of bright spots is less than the threshold number, the counter is incremented by one;当所述计数器的值等于所述第一预设帧数时,判定所述视频流黑屏。When the value of the counter is equal to the first preset number of frames, it is determined that the video stream is black.
- 根据权利要求3所述电压采集方法,其中,所述根据所述图片判断所述视频流是否卡死包括:The voltage collecting method according to claim 3, wherein said determining, according to said picture, whether said video stream is stuck comprises:以灰度图方式加载所述图片,并将所述图片的尺寸缩小到预设的第二尺寸;Loading the picture in a grayscale manner and reducing the size of the picture to a preset second size;将所述第二尺寸的图片转化为直方图,并比较所述图片两两之间的相似度;Converting the picture of the second size into a histogram and comparing the similarity between the two pictures;当所述相似度均大于预设值时,判定所述视频流卡死。When the similarity is greater than a preset value, it is determined that the video stream is stuck.
- 根据权利要求3所述电压采集方法,其中,所述根据所述图片判断所述视频流是否存在噪声包括:The voltage collecting method according to claim 3, wherein the determining whether the video stream has noise according to the picture comprises:将图片转为灰度图并将所述灰度图二值化,并判断二值化后的灰度图是否存在马赛克;Converting the picture into a grayscale image and binarizing the grayscale image, and determining whether the binarized grayscale image has a mosaic;记录存在马赛克的图片,并遍历所有存在马赛克的图片;Record the mosaiced picture and traverse all the images with mosaics;当连续两张存在马赛克的图片出现2次以上或者连续3张图片存在马赛克,则判定所述视频流存在噪声。When two consecutive mosaic pictures appear more than two times or three consecutive pictures have mosaics, it is determined that there is noise in the video stream.
- 根据权利要求1所述电压采集方法,其中,所述当监听到机顶盒输出所述视频流时,截取所述视频流中的第一预设帧数的图片并保存包括:The voltage collecting method according to claim 1, wherein when the set-top box is detected to output the video stream, intercepting a picture of the first preset number of frames in the video stream and saving comprises:当监听到机顶盒输出所述视频流时,间隔第二预设帧数读取一帧预设尺寸的图片并记录截取帧数;When the set-top box is monitored to output the video stream, the second preset frame number is read by a frame of a preset size and the number of intercepted frames is recorded;当所述截取帧数达到第一预设帧数时,停止截取并保存所有的图片。When the number of intercepted frames reaches the first preset number of frames, stop capturing and saving all the pictures.
- 根据权利要求1所述电压采集方法,其中,所述调整所述调制器的电压值并实时监听下一次播放状态,并将所述当前播放状态和下一次播放状态进行比较以判断播放状态是否改变包括:The voltage collecting method according to claim 1, wherein said adjusting said voltage value of said modulator and monitoring the next playing state in real time, and comparing said current playing state with a next playing state to determine whether said playing state is changed include:按照预设规则调整所述调制器的电压值并实时监听下一次播放状态;Adjusting the voltage value of the modulator according to a preset rule and monitoring the next play state in real time;将所述当前播放状态和下一次播放状态进行比较;Comparing the current play state with the next play state;若所述当前播放状态和下一次播放状态均为播放异常或者播放正常,则判定播放状态不变。If the current playing state and the next playing state are both abnormal playback or normal playback, it is determined that the playing state does not change.
- 一种电压采集设备,包括:A voltage collecting device comprising:处理器,适于实现多条指令;以及a processor adapted to implement a plurality of instructions;存储器,适于存储多条指令,所述指令适于由处理器加载并执行如权利要求1-8任一所述的电压采集方法。A memory adapted to store a plurality of instructions adapted to be loaded by a processor and to perform the voltage acquisition method of any of claims 1-8.
- 一种存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-8中任一所述的电压采集方法。A storage medium storing computer executable instructions arranged to perform the voltage collection method of any of claims 1-8.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710419801.5 | 2017-06-06 | ||
CN201710419801.5A CN107318048B (en) | 2017-06-06 | 2017-06-06 | A voltage acquisition method, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018223670A1 true WO2018223670A1 (en) | 2018-12-13 |
Family
ID=60183663
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/118959 WO2018223670A1 (en) | 2017-06-06 | 2017-12-27 | Voltage acquisition method and device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107318048B (en) |
WO (1) | WO2018223670A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107318048B (en) * | 2017-06-06 | 2019-12-10 | 深圳市创维软件有限公司 | A voltage acquisition method, device and storage medium |
CN112911394B (en) * | 2021-01-28 | 2023-05-02 | 湖南国科微电子股份有限公司 | Dead halt judging method, device, equipment and medium of set top box |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120144418A1 (en) * | 2010-12-07 | 2012-06-07 | At&T Intellectual Property I, L.P. | System for presenting collateral information to mobile devices |
CN102944730A (en) * | 2012-11-05 | 2013-02-27 | 深圳创维-Rgb电子有限公司 | Automatic detection device for voltage abnormal state |
CN103957405A (en) * | 2014-04-24 | 2014-07-30 | 深圳创维数字技术股份有限公司 | Set top box test method, device and system |
CN105657548A (en) * | 2016-01-07 | 2016-06-08 | Tcl通力电子(惠州)有限公司 | Fault test method and system for video playing equipment |
CN107318048A (en) * | 2017-06-06 | 2017-11-03 | 深圳市创维软件有限公司 | A kind of voltage acquiring method, device and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101816505B1 (en) * | 2010-01-20 | 2018-01-09 | 가부시키가이샤 한도오따이 에네루기 켄큐쇼 | Display method of display device |
CN106155263B (en) * | 2015-04-14 | 2021-07-20 | 华为技术有限公司 | A kind of parameter adjustment method and device |
-
2017
- 2017-06-06 CN CN201710419801.5A patent/CN107318048B/en not_active Expired - Fee Related
- 2017-12-27 WO PCT/CN2017/118959 patent/WO2018223670A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120144418A1 (en) * | 2010-12-07 | 2012-06-07 | At&T Intellectual Property I, L.P. | System for presenting collateral information to mobile devices |
CN102944730A (en) * | 2012-11-05 | 2013-02-27 | 深圳创维-Rgb电子有限公司 | Automatic detection device for voltage abnormal state |
CN103957405A (en) * | 2014-04-24 | 2014-07-30 | 深圳创维数字技术股份有限公司 | Set top box test method, device and system |
CN105657548A (en) * | 2016-01-07 | 2016-06-08 | Tcl通力电子(惠州)有限公司 | Fault test method and system for video playing equipment |
CN107318048A (en) * | 2017-06-06 | 2017-11-03 | 深圳市创维软件有限公司 | A kind of voltage acquiring method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107318048B (en) | 2019-12-10 |
CN107318048A (en) | 2017-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9875409B2 (en) | Abnormality detection apparatus, abnormality detection method, and recording medium storing abnormality detection program | |
US9158993B2 (en) | Video comparison using color histograms | |
US8897553B2 (en) | Image comparison using color histograms | |
US9667920B2 (en) | Hybrid active and passive people metering for audience measurement | |
WO2017092343A1 (en) | Video data detection method and device | |
US20170048519A1 (en) | System and method for improved optical character recognition for automated set-top box testing | |
US8655060B2 (en) | Night-scene light source detecting device and night-scene light source detecting method | |
WO2018223670A1 (en) | Voltage acquisition method and device, and storage medium | |
CN113886273A (en) | Application performance testing method, device, testing equipment and medium | |
WO2015168893A1 (en) | Video quality detection method and device | |
CN113362270A (en) | Method and device for monitoring abnormal display of display screen picture | |
WO2020135097A1 (en) | Method and apparatus for channel switch detection of display terminal | |
CN110581988B (en) | Signal quality detection method and device, electronic equipment and storage medium | |
CN118348016B (en) | LED panel defect detection method, device and electronic equipment | |
US8374483B2 (en) | Apparatus and method for testing signal channels of DVR | |
US20120127326A1 (en) | Image optimization system and method for optimizing images | |
CN113691803A (en) | Method, device, equipment and medium for testing audio and video interface function | |
JP7610521B2 (en) | High Dynamic Range Video Format Detection | |
CN116109817A (en) | Identification method and identification device for display screen icon flickering and electronic equipment | |
WO2021008187A1 (en) | Detection method and system for display interface switching function | |
CN113923450A (en) | Image automatic detection method, device, equipment and storage medium | |
CN114630112B (en) | Video playing test method, device and system | |
CN112118439B (en) | Video quality detection method and image processing circuit | |
US10666935B2 (en) | Method for parallel detection of disparities in a high resolution video | |
US20200310616A1 (en) | Fine adjustment of a linear control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17912397 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17912397 Country of ref document: EP Kind code of ref document: A1 |